WO2022127533A1 - 胶囊内窥镜图像三维重建方法、电子设备及可读存储介质 - Google Patents

胶囊内窥镜图像三维重建方法、电子设备及可读存储介质 Download PDF

Info

Publication number
WO2022127533A1
WO2022127533A1 PCT/CN2021/132433 CN2021132433W WO2022127533A1 WO 2022127533 A1 WO2022127533 A1 WO 2022127533A1 CN 2021132433 W CN2021132433 W CN 2021132433W WO 2022127533 A1 WO2022127533 A1 WO 2022127533A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
stable
point
depth information
points
Prior art date
Application number
PCT/CN2021/132433
Other languages
English (en)
French (fr)
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 安翰科技(武汉)股份有限公司
Priority to US18/268,239 priority Critical patent/US20240054662A1/en
Publication of WO2022127533A1 publication Critical patent/WO2022127533A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/275Image signal generators from 3D object models, e.g. computer-generated stereoscopic image signals
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/00002Operational features of endoscopes
    • A61B1/00004Operational features of endoscopes characterised by electronic signal processing
    • A61B1/00009Operational features of endoscopes characterised by electronic signal processing of image signals during a use of endoscope
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/00163Optical arrangements
    • A61B1/00194Optical arrangements adapted for three-dimensional imaging
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/04Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor combined with photographic or television appliances
    • A61B1/041Capsule endoscopes for imaging
    • 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
    • G06T7/0014Biomedical image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06T7/85Stereo camera calibration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/271Image signal generators wherein the generated image signals comprise depth maps or disparity maps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • 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/10004Still image; Photographic image
    • G06T2207/10012Stereo images
    • 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/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30028Colon; Small intestine
    • 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/30004Biomedical image processing
    • G06T2207/30092Stomach; Gastric
    • 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/30004Biomedical image processing
    • G06T2207/30096Tumor; Lesion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N2013/0074Stereoscopic image analysis
    • H04N2013/0081Depth or disparity estimation from stereoscopic image signals

Definitions

  • the present invention relates to the field of medical equipment imaging, in particular to a three-dimensional reconstruction method of capsule endoscope images, an electronic device and a readable storage medium.
  • Gastrointestinal endoscope is a medical device that integrates core components such as cameras and wireless transmission antennas; it collects images in the digestive tract in the body and transmits them to the outside of the body synchronously to perform medical examinations based on the obtained image data.
  • the monocular vision system has been widely used because of its simple structure and convenient application; specifically, the 3D reconstruction of monocular vision based on the shading restoration method is the most classic.
  • the monocular vision system continuously collects images through a camera, and then restores the relative depth and plane direction of each point on the surface through the brightness information of the object surface in a single image.
  • the binocular stereo vision simulates the function of the human eye, collects two simultaneous images through the left and right cameras, and uses the stereo image matching and parallax to calculate the depth information of the feature points in the image to complete the three-dimensional reconstruction of the image.
  • the calculation result of binocular vision system is more accurate, and it can perform 3D reconstruction of all the images in the image.
  • it is difficult to extract the feature points, which introduces a large error in the process of stereo matching calculation, resulting in unsatisfactory 3D reconstruction results.
  • the purpose of the present invention is to provide a three-dimensional reconstruction method of capsule endoscope image, an electronic device and a readable storage medium.
  • an embodiment of the present invention provides a three-dimensional reconstruction method of a capsule endoscope image, the method comprising: acquiring a first image and a second image synchronously through two sets of cameras arranged side by side;
  • each pixel in the comparison image is mapped to a three-dimensional space coordinate point in the camera coordinate system, and the attribute of each pixel in the comparison image is mapped to the corresponding three-dimensional space coordinate point , to complete the 3D reconstruction of the image.
  • matching the first image with the second image, and obtaining the corresponding stable homonymic points includes:
  • a non-rigid dense matching method is used to detect feature points, and the detected feature points are used as the stable homonymic points.
  • calculating the first depth information value corresponding to each pair of stable points with the same name includes:
  • obtaining the unique depth information value corresponding to each pixel point in the comparison image includes:
  • d(xm1,ym1)
  • (xm1, ym1) is the coordinate value of the pixel point in the comparison image corresponding to any stable point with the same name; d(xm1, ym1) represents the point corresponding to the stable point with the same name in the comparison image whose coordinate value is (xm1, ym1)
  • the depth residual of , depth(xm1, ym1) represents the first depth information value corresponding to the stable point with the same name whose coordinate value is (xm1, ym1) in the comparison image, and depth(xm2, ym2) represents the coordinate value in the comparison image is the second depth information value corresponding to the stable point with the same name of (xm1, ym1);
  • each pixel in the comparison image According to the depth residual of each pixel in the comparison image and the second depth information value corresponding to the pixel, obtain a unique depth information value corresponding to each pixel in the comparison image;
  • Z(xm,ym) depth(xm,ym)+d(xm,ym);
  • (xm, ym) is the coordinate value of any pixel in the comparison image
  • d(xm, ym) represents the depth residual corresponding to the pixel with the coordinate value (xm, ym) in the comparison image
  • depth ( xm, ym) represents the second depth information value corresponding to the pixel whose coordinate value is (xm, ym) in the comparison image
  • Z(xm, ym) represents the pixel whose coordinate value is (xm, ym) in the comparison image
  • the method before performing interpolation calculation on the basis of the obtained depth residual corresponding to each stable point with the same name, the method specifically includes:
  • M1 traverse the obtained depth residual d(xm1, ym1), and use the same parameter value to perform outlier analysis on it to filter out obvious abnormal points;
  • ⁇ d represents the mean value of the depth residuals corresponding to all stable points with the same name
  • ⁇ d represents the variance of the depth residuals corresponding to all stable points with the same name
  • T is a constant
  • step M1 after one traversal is completed, the method further includes:
  • step M2 If they are equal, go to step M2;
  • step M1 cyclically until a is equal to b.
  • performing interpolation calculation on the basis of the obtained depth residual corresponding to each stable point with the same name includes:
  • each stable homonymic point (x i , y i ) is assigned Q weights W i (j) respectively;
  • d(i) represents the depth residual of the stable homonymic point with the serial number i
  • Wi (j) represents the weight value formed by the stable homonymic point with the serial number i corresponding to the unstable homonymic point with the serial number j
  • e is to prevent the A constant value with a denominator of 0.
  • mapping each pixel in the comparison image to a three-dimensional space coordinate point in the camera coordinate system includes:
  • the two-dimensional coordinate value of any pixel point in the comparison image is represented by (xm, ym), and the three-dimensional space coordinate of the three-dimensional space coordinate point formed by mapping the two-dimensional pixel point (xm, ym) is represented by (Xm, Ym, Zm )express:
  • B represents the baseline distance between the two sets of cameras
  • f represents the focal length value formed between the cameras relative to the imaging plane
  • (xo, yo) represents the mapping point coordinate value of the optical center of the camera forming the comparison image on the imaging plane
  • the value of Zm is the unique depth information value corresponding to the two-dimensional coordinates (xm, ym).
  • an embodiment of the present invention provides an electronic device, including a memory and a processor, the memory stores a computer program that can be executed on the processor, and the processor executes the program The steps in the above-mentioned three-dimensional reconstruction method for capsule endoscope images are implemented.
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, realizes the above-mentioned three-dimensional reconstruction method for a capsule endoscope image steps in .
  • the beneficial effects of the present invention are: the capsule endoscope image three-dimensional reconstruction method, the electronic device and the readable storage medium of the present invention adopt the combination of two algorithms for acquiring the image depth information value to improve the image quality.
  • the calculation accuracy of the depth information value thereby improving the image 3D reconstruction rate and improving the image recognition accuracy.
  • FIG. 1 is a schematic flowchart of a method for three-dimensional reconstruction of a capsule endoscope image according to the first embodiment of the present invention
  • Fig. 2 is a schematic flowchart of a preferred implementation of one of the steps in Fig. 1;
  • FIG. 3 is a schematic flowchart of a preferred implementation of one of the steps in FIG. 2 .
  • a first embodiment of the present invention provides a three-dimensional reconstruction method for a capsule endoscope image, the method includes:
  • S1 obtain a first image and a second image synchronously through two sets of cameras arranged side by side;
  • steps S1-S6 are numbered in the above description, but it should be noted that in the above steps, the order of steps S2-S4 can be adjusted, as long as it is ensured that it is completed between steps S1 and S5, The change of the sequence will not affect the technical effect of the present invention.
  • a binocular system is used in the capsule endoscope to capture images, and the binocular system shown includes two sets of cameras set on the capsule.
  • the two sets of cameras have the same hardware setting parameters.
  • the two sets of cameras set on the left and right are used to capture two images synchronously, which are the first image and the second image of the present invention.
  • the two sets of cameras are calibrated to obtain the baseline distance B between them, and the focal length value f formed between the cameras relative to the imaging plane; it should be noted that in the specific implementation of the present invention, the two sets of cameras are arranged symmetrically and in parallel, and have the same focal length values from the respective imaging planes, which are denoted by f.
  • Zhang's calibration method can be used to calibrate the left and right cameras of the binocular vision system respectively, and obtain the internal and external parameter matrices cam of the two sets of cameras respectively. Further, the image captured by the corresponding camera is corrected by the internal and external parameter matrix cam to exclude the influence of distortion.
  • Zhang's calibration method is not the only camera calibration method, and an appropriate camera calibration method can be selected according to specific embodiments.
  • step S2 and the following steps the calculation may be performed on the basis of the corrected first image and the second image, or the calculation may be performed on the basis of the originally obtained first image and the second image, which will not be further described here. .
  • step S2 in the prior art, there are various ways to match the first image with the second image to obtain the corresponding stable homonymic points.
  • region-based matching method and feature-based matching method specific, feature-based matching methods such as: SIFT (Scale Invariant Feature Transform, scale invariant feature transformation), SURF (Speeded Up Robust Features, accelerated robust features), Feature matching methods such as Harris corner detection operator.
  • SIFT Scale Invariant Feature Transform, scale invariant feature transformation
  • SURF Speeded Up Robust Features, accelerated robust features
  • Feature matching methods such as Harris corner detection operator.
  • the method disclosed in the previous patent application is used to obtain the Stable namesake point. That is, a non-rigid dense matching method is used to detect feature points, and the detected feature points are used as the stable homonymic points.
  • the distance information of the camera relative to the target object that is, the first depth information value of the present invention, can be directly calculated through the parallax between the two cameras.
  • step S3 specifically includes: obtaining the baseline distance B between the two groups of cameras, the focal length value f formed between the cameras relative to the imaging plane, and obtaining the two pixel points with a unique matching relationship in each stable point with the same name.
  • each coordinate information (X, Y) can specifically express three meanings, specifically, it represents the coordinate value (xm1, ym1) of the first image, or the coordinate value (xn1, yn1) of the second image, or Two coordinates ((xm1, ym1), (xn1, yn1)) representing the first image and the second image.
  • step S4 one of the first image and the second image is used as the comparison image
  • the present invention takes the first image as the comparison image as an example to make a specific introduction, and similarly, the second image is used as the comparison image,
  • the final result is the same as the result of using the first image as the comparison image, so we will not give too many examples.
  • the depth information value of an image that is, the second depth information value of the comparison image of the present invention
  • SFS shape-from-shading, light and shadow
  • the SFS method can obtain the depth information value of all pixels by estimating the grayscale image, the grayscale image can be obtained by directly performing grayscale transformation on the comparison image, and the depth information value obtained by the SFS method is the present application The second depth information value of .
  • the specific implementation process thereof is in the prior art, and details are not described here.
  • the method disclosed in the previous patent application (patent application number: 201910347966.5, application name: a method for measuring objects in the digestive tract based on a camera system) is used to obtain the corresponding pixel point in the comparison image.
  • the second depth information value of is used to obtain the corresponding pixel point in the comparison image.
  • the earlier patent application passed the formula Calculate the depth image z(x,y), and the specific value of each pixel of the z(x,y) is the second depth information value of the present application.
  • img(x,y) is a grayscale image, which is obtained by grayscale conversion of the comparison image; is the mean value of the correction factor in the patent, in this embodiment, the empirical value is used; in addition, the selection method of the correction factor k is also given in Table 1 in the aforementioned cited patent specification; g() is the illumination estimation model, the model It is an illumination estimation model obtained through artificial calibration and can be generally applied to images in the digestive tract. In specific applications, the comparison image of the present invention can also be applied.
  • the second depth information values corresponding to all the pixels in the comparison image are represented by a (S*1)-dimensional array depth_S.
  • step S5 the first depth information value and the second depth information value corresponding to each other are matched with the coordinate value of each stable point with the same name corresponding to the pixel point in the comparison image. Specifically, based on the stable point of the same name, the corresponding pixel in the comparison image is obtained; the first depth information value and the second depth information value corresponding to the pixel in the obtained image are matched into a group, and matched to the current pixel.
  • by means of coordinate comparison find N pixel points where depth_S and depth_N are coincident, and represent all the matched pixels in a (N*1)-dimensional array depth_S1.
  • a unique depth information value corresponding to each pixel in the comparison image is obtained by combining the matched first depth information value and the second depth information value.
  • obtaining the unique depth information value corresponding to each pixel in the comparison image includes: S51 , obtaining mutually matching first depth information based on the pixel points in the comparison image corresponding to stable points with the same name value and the second depth information value, and obtain the depth residual between the two;
  • d(xm1,ym1)
  • (xm1, ym1) is the coordinate value of the pixel point in the comparison image corresponding to any stable point with the same name; d(xm1, ym1) represents the point corresponding to the stable point with the same name in the comparison image whose coordinate value is (xm1, ym1)
  • the depth residual of , depth(xm1, ym1) represents the first depth information value corresponding to the stable point with the same name whose coordinate value is (xm1, ym1) in the comparison image, and depth(xm2, ym2) represents the coordinate value in the comparison image is the second depth information value corresponding to the stable point with the same name of (xm1, ym1).
  • Z(xm,ym) depth(xm,ym)+d(xm,ym);
  • (xm, ym) is the coordinate value of any pixel in the comparison image
  • d(xm, ym) represents the depth residual corresponding to the pixel with the coordinate value (xm, ym) in the comparison image
  • depth ( xm, ym) represents the second depth information value corresponding to the pixel whose coordinate value is (xm, ym) in the comparison image
  • Z(xm, ym) represents the pixel whose coordinate value is (xm, ym) in the comparison image
  • step S52 interpolation calculation is performed based on the acquired depth residual of each stable point with the same name; in practical applications, in the process of calculating the second depth information value of each pixel Depth information value, in this way, in the calculation process, due to factors such as overexposure, reflection, etc., an erroneous estimate will be formed, forming an abnormal point; therefore, between step S51 and step S52, S51' is executed to filter obvious abnormality by using the outlier analysis method. point.
  • step S51' includes: M1, traversing the obtained depth residual d(xm1, ym1), and using the same parameter value to perform outlier analysis on it to filter out obvious abnormal points.
  • the traversed depth residual value d(xm1, ym1) satisfies the formula Then, the stable points with the same name corresponding to the traversed depth residual value d(xm1, ym1) are marked as outliers and eliminated.
  • ⁇ d represents the mean value of depth residuals corresponding to all stable homonymic points
  • ⁇ d represents the variance of depth residuals corresponding to all stable homonymic points
  • T is a constant.
  • step S52 Perform interpolation calculation on the basis of the depth residuals corresponding to the remaining stable points with the same name after the elimination is completed, that is, step S52 is started.
  • T ⁇ [2,4] is configured.
  • step M1 in step S51 ′ different cycle strategies can be adopted according to the requirements of the specific embodiment for accuracy and operation speed, that is, step M1 can be performed once or multiple times; The more execution times, the more complex the calculation and the more accurate the result.
  • the method further includes:
  • step M2 Obtain the total number a of stable homonymic points before traversal, and the total number b of stable homonymic points after traversal and elimination; judge whether a and b are equal, if they are equal, execute step M2; The new stable point with the same name formed later is the basic data, and step M1 is executed cyclically until a is equal to b.
  • step S52 when the depth residuals of some pixels in the compared image are known, various interpolation methods can be used to obtain the depth residuals of other pixels in the compared image.
  • an inverse distance weighted algorithm (Inverse Distance Weighted, IDW) is used for interpolation calculation;
  • step S52 specifically includes: N1, acquiring the coordinate values (x i , y i ) corresponding to the P stable points with the same name in the comparison image after processing, and dividing the corresponding coordinates in the comparison image
  • each stable homonymic point (x i , y i ) is assigned Q weights Wi ( j ) respectively.
  • d(i) represents the depth residual of the stable homonymic point with the serial number i
  • Wi (j) represents the weight value formed by the stable homonymic point with the serial number i corresponding to the unstable homonymic point with the serial number j
  • Dist i ( j) represents the distance between the stable homonymic point with the serial number i and the unstable homonymic point with the serial number j
  • e is a constant value that prevents the denominator from being 0.
  • the method further includes: performing filtering processing on the depth residual corresponding to each pixel in the image by comparison.
  • the filtering operator selects median filtering, and the depth residual of each pixel in the comparison image is set as the median of the depth residuals of all pixels in a certain neighborhood window of the point; Further, for step S53, the filtered depth residual can be used as the basis for calculating the unique depth information value, which will not be further described here.
  • step S6 the two-dimensional coordinate value of any pixel point in the comparison image is represented by (xm, ym), and the three-dimensional space coordinate of the three-dimensional space coordinate point formed by mapping the two-dimensional pixel point (xm, ym) is represented by (xm , Ym, Zm).
  • the mapping relationship between the three-dimensional space coordinate point and the two-dimensional coordinate point can be obtained through the triangular similarity principle
  • B represents the baseline distance between the two sets of cameras
  • f represents the focal length value formed between the cameras relative to the imaging plane
  • (xo, yo) represents the mapping point coordinate value of the optical center of the camera forming the comparison image on the imaging plane
  • the value of Zm is the unique depth information value corresponding to the two-dimensional coordinates (xm, ym).
  • the three-dimensional model can be reconstructed by coordinate transformation and comparing the unique depth information value corresponding to each pixel in the image.
  • each coordinate point of the initial 3D model only contains a single color tone, in order to make it realistic, the 3D model can be further texture mapped.
  • the color, texture and other information contained in the comparison image is mapped or covered to the reconstructed 3D model surface.
  • the color value of the image is directly assigned to the corresponding three-dimensional space point, and the three-dimensional image reconstruction is completed by smoothing it.
  • the simulated stomach experiment is performed by using the capsule endoscope image three-dimensional reconstruction method.
  • the error under the 6 mm baseline is 3.97%.
  • an embodiment of the present invention provides an electronic device, including a memory and a processor, the memory stores a computer program that can be executed on the processor, and the processor implements the above when executing the program Steps in a method for three-dimensional reconstruction of capsule endoscopy images.
  • an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps in the above-mentioned method for three-dimensional reconstruction of a capsule endoscope image.
  • the three-dimensional reconstruction method, electronic device and readable storage medium of capsule endoscope images of the present invention adopt a combination of two algorithms for acquiring image depth information value, so as to improve image depth information through mutual verification of the two algorithms
  • the calculation accuracy of the value is improved, thereby improving the 3D reconstruction rate of the image and improving the image recognition accuracy.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in One place, or it can be distributed over multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this implementation manner. Those of ordinary skill in the art can understand and implement it without creative effort.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Biophysics (AREA)
  • Optics & Photonics (AREA)
  • Pathology (AREA)
  • Veterinary Medicine (AREA)
  • Public Health (AREA)
  • Animal Behavior & Ethology (AREA)
  • Molecular Biology (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Endoscopes (AREA)
  • Image Processing (AREA)

Abstract

本发明提供了一种胶囊内窥镜图像三维重建方法、电子设备及可读存储介质,采用两种获取图像深度信息值算法相结合的方式,提升图像深度信息值的计算准确度,进而提升图像三维重建速率,提高图像识别精度。

Description

胶囊内窥镜图像三维重建方法、电子设备及可读存储介质
本申请要求了申请日为2020年12月18日,申请号为202011499202.7,发明名称为“胶囊内窥镜图像三维重建方法、电子设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及医疗设备成像领域,尤其涉及一种胶囊内窥镜图像三维重建方法、电子设备及可读存储介质。
背景技术
消化道内窥镜是一种医疗设备,其将摄像头、无线传输天线等核心器件集成;并在体内的消化道内采集图像并同步传送到体外,以根据获得的图像数据进行医疗检查。
消化道内窥镜图像因其独特的采集环境,所呈现的图像视野往往有限,因此,在使用过程中,很难根据单张二维图像识别病灶所在位置、形态及体积大小。
为了解决上述问题,现有技术中,单目视觉系统因其结构简单、应用方便,得到了广泛的应用;具体的,基于明暗恢复法的单目视觉三维重建最为经典。单目视觉系统通过一个摄像头连续采集图像,之后,通过单幅图像中物体表面的亮度信息恢复为表面各点的相对深度和平面方向等参数值。
然而对于实际图像尤其是胶囊内窥镜采集的消化道内图像来说,其表面点图像亮度受到如液面反射、投射阴影等许多因素的影响。因此,通过单目视觉系统进行三维结构重建往往难以满足需求,病灶尺寸的测量也具有较大的误差。
双目立体视觉通过模拟人眼功能,通过左右两个摄像头采集两 幅同步图像,利用立体图像匹配和视差,计算图像中的特征点深度信息,完成图像的三维重建。与单目视觉相比,双目视觉系统的计算结果更为准确,能够对图像中所有图像进行三维重建。然而对于胶囊内窥镜采集的消化道内图像来说,特征点的提取较为困难,从而在立体匹配计算的过程中引入很大的误差,导致三维重建结果不理想。
发明内容
为解决上述技术问题,本发明的目的在于提供一种胶囊内窥镜图像三维重建方法、电子设备及可读存储介质。
为了实现上述发明目的之一,本发明一实施方式提供一种胶囊内窥镜图像三维重建方法,所述方法包括:通过并排设置的两组摄像头同步获取第一图像和第二图像;
将第一图像与第二图像进行匹配,获取其所对应的稳定同名点,所述稳定同名点为第一图像和第二图像中通过相同规则处理后具有唯一匹配关系的两个像素点;
计算每对稳定同名点对应的第一深度信息值;
以第一图像和第二图像其中之一作为比对图像,计算比对图像中每一像素点所对应的第二深度信息值;
以每一所述稳定同名点匹配的第一深度信息值和第二深度信息值,获取比对图像中每一像素点所对应的唯一深度信息值;
根据所述唯一深度信息值获取比对图像中的每一像素点映射到相机坐标系中的三维空间坐标点,并将比对图像中每一像素点的属性 映射到对应的三维空间坐标点上,以完成图像三维重建。
作为本发明一实施方式的进一步改进,将第一图像与第二图像进行匹配,获取其所对应的稳定同名点包括:
采用非刚性稠密匹配方法检测特征点,将检测到的特征点作为所述稳定同名点。
作为本发明一实施方式的进一步改进,计算每对稳定同名点对应的第一深度信息值包括:
获取两组摄像头之间的基线距离B,摄像头相对成像平面之间形成的焦距值f,以及获取每一稳定同名点中具有唯一匹配关系的两个像素点在其所对应图像中的坐标值(xm1,ym1)和(xn1,yn1);
则所述第一深度信息值depth(xm1,ym1)表示为:
Figure PCTCN2021132433-appb-000001
作为本发明一实施方式的进一步改进,以每一所述稳定同名点匹配的第一深度信息值和第二深度信息值,获取比对图像中每一像素点所对应的唯一深度信息值包括:
基于稳定同名点对应在比对图像中的像素点获取相互匹配的第一深度信息值和第二深度信息值,并获取两者之间的深度残差;
则,d(xm1,ym1)=|depth(xm1,ym1)-depth(xm2,ym2)|;
其中,(xm1,ym1)为任一稳定同名点对应在比对图像中的像素点坐标值;d(xm1,ym1)表示比对图像中坐标值为(xm1,ym1)的稳定同名点所对应的深度残差,depth(xm1,ym1)表示比对图像中坐标值为(xm1,ym1)的稳定同名点所对应的第一深度信息值,depth(xm2,ym2) 表示比对图像中坐标值为(xm1,ym1)的稳定同名点所对应的第二深度信息值;
以获取的每一稳定同名点对应的深度残差为基础进行插值计算,获取比对图像中的所有像素点的深度残差;
根据比对图像中每一像素点的深度残差和该像素点对应的第二深度信息值,获取比对图像中每一像素点对应的唯一深度信息值;
则,Z(xm,ym)=depth(xm,ym)+d(xm,ym);
其中,(xm,ym)为比对图像中任一像素的坐标值;d(xm,ym)表示比对图像中坐标值为(xm,ym)的像素点所对应的深度残差,depth(xm,ym)表示比对图像中坐标值为(xm,ym)的像素点所对应的第二深度信息值,Z(xm,ym)表示比对图像中坐标值为(xm,ym)的像素点所对应的唯一深度信息值。
作为本发明一实施方式的进一步改进,在以获取的每一稳定同名点对应的深度残差为基础进行插值计算之前,所述方法具体包括:
M1、遍历所获得的深度残差d(xm1,ym1),并采用同一参数值对其进行离群值分析,过滤明显异常点;
若遍历到的深度残差值d(xm1,ym1)满足公式
Figure PCTCN2021132433-appb-000002
Figure PCTCN2021132433-appb-000003
则将遍历到的深度残差值d(xm1,ym1)对应的稳定同名点标记为离群点,进行剔除;
其中,μ d表示对应所有稳定同名点的深度残差的均值,σ d表示对应所有稳定同名点的深度残差的方差,T为常数;
M2、以剔除完成后剩余的稳定同名点对应的深度残差为基础进行 插值计算。
作为本发明一实施方式的进一步改进,步骤M1中,一次遍历完成后,所述方法还包括:
获取遍历之前的稳定同名点的总数量a,以及遍历、且进行剔除处理后的稳定同名点的总数量b;
判断a与b是否相等,
若相等,执行步骤M2;
若不相等,以经过剔除后形成的新的稳定同名点为基础数据,循环执行步骤M1,直至a等于b。
作为本发明一实施方式的进一步改进,以获取的每一稳定同名点对应的深度残差为基础进行插值计算包括:
获取经过处理后对应在比对图像中P个稳定同名点的坐标值(x i,y i),以及比对图像中除对应的稳定同名点之外的Q个非稳定同名点的坐标值(x j,y j),比对图像中像素点的总数量为P+Q;其中,i=1,2……P;j=1,2……Q;
计算每一稳定同名点分别到每一非稳定同名点的距离Dist i(j);
根据Dist i(j)的值为每一稳定同名点(x i,y i)分别赋予Q个权重值W i(j);
通过加权求和的方式获取每一非稳定同名点的深度残差d(j);
Figure PCTCN2021132433-appb-000004
Figure PCTCN2021132433-appb-000005
Figure PCTCN2021132433-appb-000006
其中,d(i)表示序号为i的稳定同名点的深度残差,W i(j)表示序号为i的稳定同名点对应序号为j的非稳定同名点所形成的权重值;e为防止分母为0的常数值。
作为本发明一实施方式的进一步改进,根据所述唯一深度信息值获取比对图像中的每一像素点映射到相机坐标系中的三维空间坐标点包括:
将比对图像中任一像素点的二维坐标值以(xm,ym)表示,将二维像素点(xm,ym)映射形成的三维空间坐标点的三维空间坐标以(Xm,Ym,Zm)表示:
则:
Figure PCTCN2021132433-appb-000007
Figure PCTCN2021132433-appb-000008
其中,B表示两组摄像头之间的基线距离,f表示摄像头相对成像平面之间形成的焦距值,(xo,yo)表示形成比对图像的摄像头光心在成像平面上的映射点坐标值,Zm的值为二维坐标(xm,ym)所对应的唯一深度信息值。
为了解决上述发明目的之一,本发明一实施方式提供一种电子设备,包括存储器和处理器,所述存储器存储有可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现如上所述胶囊内窥镜图像三维重建方法中的步骤。
为了解决上述发明目的之一,本发明一实施方式提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执 行时实现如上所述胶囊内窥镜图像三维重建方法中的步骤。
与现有技术相比,本发明的有益效果是:本发明的胶囊内窥镜图像三维重建方法、电子设备及可读存储介质,采用两种获取图像深度信息值算法相结合的方式,提升图像深度信息值的计算准确度,进而提升图像三维重建速率,提高图像识别精度。
附图说明
图1是本发明第一实施方式胶囊内窥镜图像三维重建方法的流程示意图;
图2是图1中其中一个步骤较佳实现方式的流程示意图;
图3是图2中其中一个步骤较佳实现方式的流程示意图。
具体实施方式
以下将结合附图所示的具体实施方式对本发明进行详细描述。但这些实施方式并不限制本发明,本领域的普通技术人员根据这些实施方式所做出的结构、方法、或功能上的变换均包含在本发明的保护范围内。
如图1所示,本发明第一实施方式中提供一种胶囊内窥镜图像三维重建方法,所述方法包括:
S1、通过并排设置的两组摄像头同步获取第一图像和第二图像;
S2、将第一图像与第二图像进行匹配,获取其所对应的稳定同名点,所述稳定同名点为第一图像和第二图像中通过相同规则处理后具有唯一匹配关系的两个像素点;
S3、计算每对稳定同名点对应的第一深度信息值;
S4、以第一图像和第二图像其中之一作为比对图像,计算比对图 像中每一像素点所对应的第二深度信息值;
S5、以每一所述稳定同名点匹配的第一深度信息值和第二深度信息值,获取比对图像中每一像素点所对应的唯一深度信息值;
S6、根据所述唯一深度信息值获取比对图像中的每一像素点映射到相机坐标系中的三维空间坐标点,并将比对图像中每一像素点的属性映射到对应的三维空间坐标点上,以完成三维图像重建。
为了便于描述,上述描述中以步骤S1-S6进行编号,但需要说明的是,在上述步骤中,步骤S2-S4的顺序可以调整,只要保证其在步骤S1和步骤S5之间完成即可,其顺序的改变,不会影响本发明的技术效果。
对于步骤S1,胶囊内窥镜中采用双目系统进行图像拍摄,所示双目系统中包括设置在胶囊上的两组摄像头,通常情况下,两组摄像头具有相同的硬件设置参数,进一步的,通过左右设置的两组摄像头同步拍摄两幅图像,即为本发明的第一图像和第二图像。
较佳的,在拍摄图像之前,对两组摄像头进行标定,获取其之间的基线距离B,以及摄像头相对成像平面之间形成的焦距值f;需要说明的是,本发明具体实施方式中,两组摄像头对称、平行设置,且分别到成像平面之间的焦距值相同,均以f表示。
本发明具体示例中,可采用张氏标定法,分别对双目视觉系统左右摄像头进行标定,分别得到两组摄像头的内外参数矩阵cam。进一步的,通过内外参数矩阵cam对其所对应的摄像头所拍摄的图像进行校正,以排除畸变的影响。
当然,在本发明其他实施方式中,张氏标定法并不是唯一的相机标定方法,可根据具体实施例选择合适的相机标定方法。
相应的,步骤S2及以下步骤中,可以以校正后的第一图像和第二图像为基础进行计算,也可以以原始获得的第一图像和第二图像进行计算,在此不做进一步的赘述。
对于步骤S2,现有技术中,有多种方式均可以将第一图像与第二图像进行匹配,获取其所对应的稳定同名点。例如:基于区域的匹配方法和基于特征的匹配方法;具体的,基于特征的匹配方法例如:SIFT(Scale Invariant Feature Transform,尺度不变特征变换)、SURF(Speeded Up Robust Features,加速稳健特征)、Harris角点检测算子等特征匹配方法。
本发明较佳实施方式中,选用在先专利申请揭露的方法(专利申请号:202010330852.2,申请名称为:胶囊内窥镜图像拼接方法、电子设备及可读存储介质中的算法),获取所述稳定同名点。即,采用非刚性稠密匹配方法检测特征点,将检测到的特征点作为所述稳定同名点。
相应的,匹配后的第一图像和第二图像,获取的稳定同名点的数量有多组。
对于步骤S3,本发明具体实施方式中,可通过两个摄像头之间的视差,直接计算摄像头相对目标物体的距离信息,即本发明的第一深度信息值。
具体的,步骤S3具体包括:获取两组摄像头之间的基线距离 B,摄像头相对成像平面之间形成的焦距值f,以及获取每一稳定同名点中具有唯一匹配关系的两个像素点在其所对应图像中的坐标值(xm1,ym1)和(xn1,yn1)。
则所述第一深度信息值depth(xm1,ym1)表示为:
Figure PCTCN2021132433-appb-000009
相应的,因为稳定同名点具有多组,对于匹配的第一图像和第二图像,形成的第一深度信息值为多个。本发明具体示例中,可以将所有稳定同名点以数组表示,将其记作:depth_N,depth_N的维数为(N*1),其中每一个值代表了每一稳定同名点的第一深度信息值,为描述这种一一对应关系,引入稳定同名点位置信息,形成新的数组Dp_N=[X,Y,depth_N],其维数为(N*3),每一行由表示位置的坐标信息(X,Y)及其第一深度信息值组成。
在这里,每一坐标信息(X,Y)具体可以表达三种含义,具体的,表示第一图像的坐标值(xm1,ym1),或表示第二图像的坐标值(xn1,yn1),或表示第一图像和第二图像的两个坐标((xm1,ym1),(xn1,yn1))。
对于步骤S4,以第一图像和第二图像中的其中一幅作为比对图像,本发明以第一图像作为比对图像为例做具体介绍,同样的,以第二图像作为比对图像,其最终的结果与以第一图像作为比对图像的结果相同,因此,不做过多举例。
具体的,同样可以采用多种方式获取一幅图像的深度信息值,即本发明的比对图像的第二深度信息值。例如:SFS(shape-from- shading,光影)等。
所述SFS方法通过灰度图像即可估计得到所有像素点的深度信息值,所述比对图像直接进行灰度变换即可以得到灰度图像,所述SFS方法获得的深度信息值即为本申请的第二深度信息值。其具体实现过程为现有技术,在此不做具体赘述。本发明较佳实施方式中,选用在先申请专利揭露的方法(专利申请号:201910347966.5,申请名称为:一种基于摄像系统的消化道内物体测量方法),获取比对图像中每一像素点对应的第二深度信息值。
具体的,在先专利申请通过公式
Figure PCTCN2021132433-appb-000010
计算深度图像z(x,y),所述z(x,y)每一像素点的具体数值即为本申请的第二深度信息值。
在这里,img(x,y)为灰度图像,由比对图像进行灰度转换得到;
Figure PCTCN2021132433-appb-000011
为专利中的校正因子的均值,在本实施例中,采用经验值;另外,在前述引用专利说明书中表1也给出了校正因子k的选择方法;g()为光照估计模型,该模型是通过人为标定得到的一个可以普遍适用于消化道内图像的一个光照估计模型,在具体应用中,也可以适用本发明的比对图像。
相应的,将比对图像中所有像素点对应的第二深度信息值以(S*1)维数组depth_S表示。
对于步骤S5,以每一所述稳定同名点对应在所述比对图像中的像素点的坐标值,匹配相互对应的第一深度信息值和第二深度信息值。具体的,基于稳定同名点获取其对应在比对图像中的像素点;并将获 得的图像中的像素点所对应的第一深度信息值和第二深度信息值匹配为一组,匹配给当前像素点。具体实现过程中,通过坐标比对的方式,找到depth_S与depth_N相重合的N个像素点,并将匹配后的所有像素点以(N*1)维数组depth_S1表示。
进一步的,结合相互匹配的第一深度信息值和第二深度信息值,获取比对图像中每一像素点所对应的唯一深度信息值。
具体的,结合图2所示,获取比对图像中每一像素点所对应的唯一深度信息值包括:S51、基于稳定同名点对应在比对图像中的像素点获取相互匹配的第一深度信息值和第二深度信息值,并获取两者之间的深度残差;
则,
d(xm1,ym1)=|depth(xm1,ym1)-depth(xm2,ym2)|;
其中,(xm1,ym1)为任一稳定同名点对应在比对图像中的像素点坐标值;d(xm1,ym1)表示比对图像中坐标值为(xm1,ym1)的稳定同名点所对应的深度残差,depth(xm1,ym1)表示比对图像中坐标值为(xm1,ym1)的稳定同名点所对应的第一深度信息值,depth(xm2,ym2)表示比对图像中坐标值为(xm1,ym1)的稳定同名点所对应的第二深度信息值。
S52、以获取的每一稳定同名点对应的深度残差为基础进行插值计算,获取比对图像中的所有像素点的深度残差。
S53、根据比对图像中每一像素点的深度残差和该像素点对应的第二深度信息值,获取比对图像中每一像素点对应的唯一深度信息值;
则,Z(xm,ym)=depth(xm,ym)+d(xm,ym);
其中,(xm,ym)为比对图像中任一像素的坐标值;d(xm,ym)表示比对图像中坐标值为(xm,ym)的像素点所对应的深度残差,depth(xm,ym)表示比对图像中坐标值为(xm,ym)的像素点所对应的第二深度信息值,Z(xm,ym)表示比对图像中坐标值为(xm,ym)的像素点所对应的唯一深度信息值。
对于步骤S52,基于所获取的每一稳定同名点的深度残差为基础进行插值计算;在实际应用中,在计算每一像素点的第二深度信息值过程中,由于采用光照信息估计第二深度信息值,如此,在计算过程中会因过曝、反光等因素造成错误估计,形成异常点;因此,在步骤S51和步骤S52之间执行S51’,以采用离群值分析方法过滤明显异常点。
具体的,步骤S51’包括:M1、遍历所获得的深度残差d(xm1,ym1),并采用同一参数值对其进行离群值分析,过滤明显异常点。
若遍历到的深度残差值d(xm1,ym1)满足公式
Figure PCTCN2021132433-appb-000012
则将遍历到的深度残差值d(xm1,ym1)对应的稳定同名点标记为离群点,进行剔除。
其中,μ d表示对应所有稳定同名点的深度残差的均值,σ d表示对应所有稳定同名点的深度残差的方差,T为常数。
M2、以剔除完成后剩余的稳定同名点对应的深度残差为基础进行插值计算,即开始执行步骤S52。
对于步骤M1,本发明具体实施方式中,配置T∈[2,4]。
本发明较佳实施方式中,对于步骤S51’中的步骤M1,可以根据具体实施例对准确率和运算速度的要求,采用不同的循环策略,即步骤M1可以执行一次,也可以执行多次;执行次数越多,计算越复杂,结果越精准。
本发明较佳实施方式中,对于M1,一次遍历完成后,所述方法还包括:
获取遍历之前的稳定同名点的总数量a,以及遍历、且进行剔除处理后的稳定同名点的总数量b;判断a与b是否相等,若相等,执行步骤M2;若不相等,以经过剔除后形成的新的稳定同名点为基础数据,循环执行步骤M1,直至a等于b。
对于步骤S52,在比对图像中部分像素点的深度残差已知时,可以采用多种插值方式得到比对图像中其他像素点的深度残差。本发明较佳实施方式中,对于步骤S52,采用反距离加权算法(Inverse Distance Weighted,IDW)进行插值计算;
具体的,结合图3所示,步骤S52具体包括:N1、获取经过处理后对应在比对图像中P个稳定同名点的坐标值(x i,y i),以及比对图像中除对应的稳定同名点之外的Q个非稳定同名点的坐标值(x j,y j),比对图像中像素点的总数量为P+Q;其中,i=1,2……P;j=1,2……Q。
N2、计算每一稳定同名点分别到每一非稳定同名点的距离Dist i(j)。
N3、根据Dist i(j)的值为每一稳定同名点(x i,y i)分别赋予Q个 权重值W i(j)。
N4、通过加权求和的方式获取每一非稳定同名点的深度残差d(j)。
相应的,
Figure PCTCN2021132433-appb-000013
Figure PCTCN2021132433-appb-000014
Figure PCTCN2021132433-appb-000015
其中,d(i)表示序号为i的稳定同名点的深度残差,W i(j)表示序号为i的稳定同名点对应序号为j的非稳定同名点所形成的权重值,Dist i(j)表示序号为i的稳定同名点与序号为j的非稳定同名点之间的距离,e为防止分母为0的常数值。
较佳的,配置e∈[10 -2,10 -6]。
较佳的,在步骤S52后,为了排除局部噪点,所述方法还包括:对比对图像中每一像素点所对应的深度残差进行滤波处理。
本发明一可实施方式中,滤波算子选用中值滤波,将比对图像中每一像素点的深度残差设置为该点某邻域窗口内的所有像素点的深度残差的中值;进一步的,对于步骤S53,可采用滤波处理后的深度残差作为计算唯一深度信息值的基础,在此不做进一步赘述。
对于步骤S6,将比对图像中任一像素点的二维坐标值以(xm,ym)表示,将二维像素点(xm,ym)映射形成的三维空间坐标点的三维空间坐标以(Xm,Ym,Zm)表示。
以获取比对图像的摄像机的光心为三维空间的坐标系原点,通过三角相似原理即可得到三维空间坐标点和二位坐标点的映射关系;
即:
Figure PCTCN2021132433-appb-000016
Figure PCTCN2021132433-appb-000017
其中,B表示两组摄像头之间的基线距离,f表示摄像头相对成像平面之间形成的焦距值,(xo,yo)表示形成比对图像的摄像头光心在成像平面上的映射点坐标值,Zm的值为二维坐标(xm,ym)所对应的唯一深度信息值。
通过坐标变换,以及比对图像中每一像素点对应的唯一深度信息值,可重建三维模型。
进一步的,初始的三维模型的每一坐标点仅包含单一色调,为了使其具有真实感,可以进一步的对三维模型进行纹理映射。
具体的,根据三维空间坐标点和二维的比对图像中像素点之间的对应关系,将比对图像中所包含的色彩、纹理等信息映射或者覆盖到重建的三维模型表面。具体的,将图像的色彩值直接赋值到对应的三维空间点,并对其进行平滑处理,即完成三维图像重建。
本发明具体示例中,采用胶囊内窥镜图像三维重建方法进行模拟胃实验,在具体病灶的测量中,6mm基线下的误差为3.97%。
进一步的,本发明一实施方式提供一种电子设备,包括存储器和处理器,所述存储器存储有可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现如上所述胶囊内窥镜图像三维重建方法中的步骤。
进一步的,本发明一实施方式提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述 胶囊内窥镜图像三维重建方法中的步骤。
综上所述,本发明的胶囊内窥镜图像三维重建方法、电子设备及可读存储介质,采用两种获取图像深度信息值算法相结合的方式,以通过两种算法相互验证提升图像深度信息值的计算准确度,进而提升图像三维重建速率,提高图像识别精度。
为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本发明时可以把各模块的功能在同一个或多个软件和/或硬件中实现。
以上所描述的装置实施方式仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施方式方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
应当理解,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施方式中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。
上文所列出的一系列的详细说明仅仅是针对本发明的可行性实施方式的具体说明,它们并非用以限制本发明的保护范围,凡未脱离本发明技艺精神所作的等效实施方式或变更均应包含在本发明的保 护范围之内。

Claims (10)

  1. 一种胶囊内窥镜图像三维重建方法,其特征在于,所述方法包括:
    通过并排设置的两组摄像头同步获取第一图像和第二图像;
    将第一图像与第二图像进行匹配,获取其所对应的稳定同名点,所述稳定同名点为第一图像和第二图像中通过相同规则处理后具有唯一匹配关系的两个像素点;
    计算每对稳定同名点对应的第一深度信息值;
    以第一图像和第二图像其中之一作为比对图像,计算比对图像中每一像素点所对应的第二深度信息值;
    以每一所述稳定同名点匹配的第一深度信息值和第二深度信息值,获取比对图像中每一像素点所对应的唯一深度信息值;
    根据所述唯一深度信息值获取比对图像中的每一像素点映射到相机坐标系中的三维空间坐标点,并将比对图像中每一像素点的属性映射到对应的三维空间坐标点上,以完成图像三维重建。
  2. 根据权利要求1所述的胶囊内窥镜图像三维重建方法,其特征在于,将第一图像与第二图像进行匹配,获取其所对应的稳定同名点包括:
    采用非刚性稠密匹配方法检测特征点,将检测到的特征点作为所述稳定同名点。
  3. 根据权利要求1所述的胶囊内窥镜图像三维重建方法,其特征在于,计算每对稳定同名点对应的第一深度信息值包括:
    获取两组摄像头之间的基线距离B,摄像头相对成像平面之间形 成的焦距值f,以及获取每一稳定同名点中具有唯一匹配关系的两个像素点在其所对应图像中的坐标值(xm1,ym1)和(xn1,yn1);
    则所述第一深度信息值depth(xm1,ym1)表示为:
    Figure PCTCN2021132433-appb-100001
  4. 根据权利要求1所述的胶囊内窥镜图像三维重建方法,其特征在于,以每一所述稳定同名点匹配的第一深度信息值和第二深度信息值,获取比对图像中每一像素点所对应的唯一深度信息值包括:
    基于稳定同名点对应在比对图像中的像素点获取相互匹配的第一深度信息值和第二深度信息值,并获取两者之间的深度残差;
    则,d(xm1,ym1)=|depth(xm1,ym1)-depth(xm2,ym2)|;
    其中,(xm1,ym1)为任一稳定同名点对应在比对图像中的像素点坐标值;d(xm1,ym1)表示比对图像中坐标值为(xm1,ym1)的稳定同名点所对应的深度残差,depth(xm1,ym1)表示比对图像中坐标值为(xm1,ym1)的稳定同名点所对应的第一深度信息值,depth(xm2,ym2)表示比对图像中坐标值为(xm1,ym1)的稳定同名点所对应的第二深度信息值;
    以获取的每一稳定同名点对应的深度残差为基础进行插值计算,获取比对图像中的所有像素点的深度残差;
    根据比对图像中每一像素点的深度残差和该像素点对应的第二深度信息值,获取比对图像中每一像素点对应的唯一深度信息值;
    则,Z(xm,ym)=depth(xm,ym)+d(xm,ym);
    其中,(xm,ym)为比对图像中任一像素的坐标值;d(xm,ym)表 示比对图像中坐标值为(xm,ym)的像素点所对应的深度残差,depth(xm,ym)表示比对图像中坐标值为(xm,ym)的像素点所对应的第二深度信息值,Z(xm,ym)表示比对图像中坐标值为(xm,ym)的像素点所对应的唯一深度信息值。
  5. 根据权利要求4所述的胶囊内窥镜图像三维重建方法,其特征在于,在以获取的每一稳定同名点对应的深度残差为基础进行插值计算之前,所述方法具体包括:
    M1、遍历所获得的深度残差d(xm1,ym1),并采用同一参数值对其进行离群值分析,过滤明显异常点;
    若遍历到的深度残差值d(xm1,ym1)满足公式
    Figure PCTCN2021132433-appb-100002
    Figure PCTCN2021132433-appb-100003
    则将遍历到的深度残差值d(xm1,ym1)对应的稳定同名点标记为离群点,进行剔除;
    其中,μ d表示对应所有稳定同名点的深度残差的均值,σ d表示对应所有稳定同名点的深度残差的方差,T为常数;
    M2、以剔除完成后剩余的稳定同名点对应的深度残差为基础进行插值计算。
  6. 根据权利要求5所述的胶囊内窥镜图像三维重建方法,其特征在于,步骤M1中,一次遍历完成后,所述方法还包括:
    获取遍历之前的稳定同名点的总数量a,以及遍历、且进行剔除处理后的稳定同名点的总数量b;
    判断a与b是否相等,
    若相等,执行步骤M2;
    若不相等,以经过剔除后形成的新的稳定同名点为基础数据,循环执行步骤M1,直至a等于b。
  7. 根据权利要求4所述的胶囊内窥镜图像三维重建方法,其特征在于,以获取的每一稳定同名点对应的深度残差为基础进行插值计算包括:
    获取经过处理后对应在比对图像中P个稳定同名点的坐标值(x i,y i),以及比对图像中除对应的稳定同名点之外的Q个非稳定同名点的坐标值(x j,y j),比对图像中像素点的总数量为P+Q;其中,i=1,2……P;j=1,2……Q;
    计算每一稳定同名点分别到每一非稳定同名点的距离Dist i(j);
    根据Dist i(j)的值为每一稳定同名点(x i,y i)分别赋予Q个权重值W i(j);
    通过加权求和的方式获取每一非稳定同名点的深度残差d(j);
    Figure PCTCN2021132433-appb-100004
    Figure PCTCN2021132433-appb-100005
    Figure PCTCN2021132433-appb-100006
    其中,d(i)表示序号为i的稳定同名点的深度残差,W i(j)表示序号为i的稳定同名点对应序号为j的非稳定同名点所形成的权重值;e为防止分母为0的常数值。
  8. 根据权利要求1所述的胶囊内窥镜图像三维重建方法,其特征在于,根据所述唯一深度信息值获取比对图像中的每一像素点映射到相机坐标系中的三维空间坐标点包括:
    将比对图像中任一像素点的二维坐标值以(xm,ym)表示,将二维像素点(xm,ym)映射形成的三维空间坐标点的三维空间坐标以(Xm,Ym,Zm)表示:
    则:
    Figure PCTCN2021132433-appb-100007
    Figure PCTCN2021132433-appb-100008
    其中,B表示两组摄像头之间的基线距离,f表示摄像头相对成像平面之间形成的焦距值,(xo,yo)表示形成比对图像的摄像头光心在成像平面上的映射点坐标值,Zm的值为二维坐标(xm,ym)所对应的唯一深度信息值。
  9. 一种电子设备,包括存储器和处理器,所述存储器存储有可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现一种胶囊内窥镜图像三维重建方法中的步骤,其中,所述方法包括:
    通过并排设置的两组摄像头同步获取第一图像和第二图像;
    将第一图像与第二图像进行匹配,获取其所对应的稳定同名点,所述稳定同名点为第一图像和第二图像中通过相同规则处理后具有唯一匹配关系的两个像素点;
    计算每对稳定同名点对应的第一深度信息值;
    以第一图像和第二图像其中之一作为比对图像,计算比对图像中每一像素点所对应的第二深度信息值;
    以每一所述稳定同名点匹配的第一深度信息值和第二深度信息 值,获取比对图像中每一像素点所对应的唯一深度信息值;
    根据所述唯一深度信息值获取比对图像中的每一像素点映射到相机坐标系中的三维空间坐标点,并将比对图像中每一像素点的属性映射到对应的三维空间坐标点上,以完成图像三维重建。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现一种胶囊内窥镜图像三维重建方法中的步骤,其中,所述方法包括:
    通过并排设置的两组摄像头同步获取第一图像和第二图像;
    将第一图像与第二图像进行匹配,获取其所对应的稳定同名点,所述稳定同名点为第一图像和第二图像中通过相同规则处理后具有唯一匹配关系的两个像素点;
    计算每对稳定同名点对应的第一深度信息值;
    以第一图像和第二图像其中之一作为比对图像,计算比对图像中每一像素点所对应的第二深度信息值;
    以每一所述稳定同名点匹配的第一深度信息值和第二深度信息值,获取比对图像中每一像素点所对应的唯一深度信息值;
    根据所述唯一深度信息值获取比对图像中的每一像素点映射到相机坐标系中的三维空间坐标点,并将比对图像中每一像素点的属性映射到对应的三维空间坐标点上,以完成图像三维重建。
PCT/CN2021/132433 2020-12-18 2021-11-23 胶囊内窥镜图像三维重建方法、电子设备及可读存储介质 WO2022127533A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/268,239 US20240054662A1 (en) 2020-12-18 2021-11-23 Capsule endoscope image three-dimensional reconstruction method, electronic device, and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011499202.7 2020-12-18
CN202011499202.7A CN112261399B (zh) 2020-12-18 2020-12-18 胶囊内窥镜图像三维重建方法、电子设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2022127533A1 true WO2022127533A1 (zh) 2022-06-23

Family

ID=74224905

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/132433 WO2022127533A1 (zh) 2020-12-18 2021-11-23 胶囊内窥镜图像三维重建方法、电子设备及可读存储介质

Country Status (3)

Country Link
US (1) US20240054662A1 (zh)
CN (1) CN112261399B (zh)
WO (1) WO2022127533A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261399B (zh) * 2020-12-18 2021-03-16 安翰科技(武汉)股份有限公司 胶囊内窥镜图像三维重建方法、电子设备及可读存储介质
CN113052956B (zh) * 2021-03-19 2023-03-10 安翰科技(武汉)股份有限公司 基于胶囊内窥镜构建阅片模型的方法、设备及介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109377530A (zh) * 2018-11-30 2019-02-22 天津大学 一种基于深度神经网络的双目深度估计方法
CN110033465A (zh) * 2019-04-18 2019-07-19 天津工业大学 一种应用于双目内窥镜医学图像的实时三维重建方法
CN110335318A (zh) * 2019-04-28 2019-10-15 安翰科技(武汉)股份有限公司 一种基于摄像系统的消化道内物体测量方法
US20200082510A1 (en) * 2015-10-16 2020-03-12 Capso Vision, Inc. Method and Apparatus of Sharpening of Gastrointestinal Images Based on Depth Information
CN110992431A (zh) * 2019-12-16 2020-04-10 电子科技大学 一种双目内窥镜软组织图像的联合三维重建方法
US20200128225A1 (en) * 2018-10-23 2020-04-23 Xi'an Jiaotong University Depth Information Acquisition Method and Device
CN111210468A (zh) * 2018-11-22 2020-05-29 中移(杭州)信息技术有限公司 一种图像深度信息获取方法及装置
CN112261399A (zh) * 2020-12-18 2021-01-22 安翰科技(武汉)股份有限公司 胶囊内窥镜图像三维重建方法、电子设备及可读存储介质

Family Cites Families (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1973465A4 (en) * 2005-12-29 2009-12-16 Given Imaging Ltd SYSTEM, DEVICE AND METHOD FOR ESTIMATING THE SIZE OF AN OBJECT IN A BODY LIGHT
JP5000356B2 (ja) * 2007-03-30 2012-08-15 オリンパスメディカルシステムズ株式会社 カプセル型医療装置
US20090010507A1 (en) * 2007-07-02 2009-01-08 Zheng Jason Geng System and method for generating a 3d model of anatomical structure using a plurality of 2d images
US7995798B2 (en) * 2007-10-15 2011-08-09 Given Imaging Ltd. Device, system and method for estimating the size of an object in a body lumen
CN101716077B (zh) * 2009-12-03 2012-09-12 西交利物浦大学 基于无线胶囊内视镜或视频内窥镜体内摄像的图像处理方法及其系统
CN103300862B (zh) * 2013-05-24 2016-04-20 浙江大学宁波理工学院 一种胶囊内窥镜病灶组织深度和三维尺寸的测量方法
CN104042180A (zh) * 2014-06-11 2014-09-17 谢文胜 一种多功能电子胃镜系统
CN104720735B (zh) * 2014-12-02 2016-10-05 上海理鑫光学科技有限公司 虚拟现实胶囊内窥镜
EP3318173A4 (en) * 2015-06-30 2019-04-17 Olympus Corporation IMAGE PROCESSING DEVICE, MEASURING SYSTEM AND ENDOSCOPY SYSTEM
CN104939793A (zh) * 2015-07-06 2015-09-30 上海理工大学 基于液体透镜的可调焦3-d胶囊内窥镜系统
US10531074B2 (en) * 2015-10-16 2020-01-07 CapsoVision, Inc. Endoscope employing structured light providing physiological feature size measurement
CN107317954A (zh) * 2016-04-26 2017-11-03 深圳英伦科技股份有限公司 3d内窥胶囊镜检测方法和系统
CN105996961B (zh) * 2016-04-27 2018-05-11 安翰光电技术(武汉)有限公司 基于结构光的3d立体成像胶囊内窥镜系统及方法
CN205758500U (zh) * 2016-06-01 2016-12-07 安翰光电技术(武汉)有限公司 胶囊内窥镜系统
CN105942959B (zh) * 2016-06-01 2018-08-24 安翰光电技术(武汉)有限公司 胶囊内窥镜系统及其三维成像方法
CN105939451B (zh) * 2016-06-23 2018-10-02 安翰光电技术(武汉)有限公司 用于胶囊内窥镜系统的图像曝光处理系统及方法
CN106257497B (zh) * 2016-07-27 2020-05-08 中测高科(北京)测绘工程技术有限责任公司 一种图像同名点的匹配方法及装置
CN106308729B (zh) * 2016-10-13 2017-11-24 成都英赛景泰光电技术有限公司 用于内窥镜的成像方法、装置及胶囊型医疗设备
CN106618454B (zh) * 2016-11-21 2018-04-13 电子科技大学 一种胶囊式内窥镜系统
KR101921268B1 (ko) * 2016-12-21 2018-11-22 주식회사 인트로메딕 3d 영상을 재생을 위한 캡슐 내시경 장치, 상기 캡슐 내시경의 동작 방법, 캡슐 내시경과 연동하여 3d 영상을 재생하는 수신기, 캡슐 내시경과 연동하여 수신기의 3d 영상을 재생하는 방법, 및 캡슐 내시경 시스템
CN106983487B (zh) * 2017-03-14 2019-11-15 宜宾学院 无线胶囊内窥镜三维位置和三维姿态的定位系统及其定位方法
CN107657656B (zh) * 2017-08-31 2023-11-10 成都通甲优博科技有限责任公司 同名点匹配及三维重建方法、系统和光度立体摄像终端
CN108038902B (zh) * 2017-12-07 2021-08-27 合肥工业大学 一种面向深度相机的高精度三维重建方法和系统
KR102129168B1 (ko) * 2018-05-31 2020-07-01 전자부품연구원 직접 감쇄 모델을 이용한 내시경 영상 스테레오 정합 방법 및 장치
CN109448041B (zh) * 2018-10-29 2021-10-22 重庆金山医疗技术研究院有限公司 一种胶囊内镜图像三维重建方法及系统
CN110327046B (zh) * 2019-04-28 2022-03-25 安翰科技(武汉)股份有限公司 一种基于摄像系统的消化道内物体测量方法
CN110507276A (zh) * 2019-08-26 2019-11-29 珠海维尔康生物科技有限公司 一种双镜头全景成像的胶囊内窥镜系统
CN211511734U (zh) * 2019-09-22 2020-09-18 深圳硅基智控科技有限公司 具有双目测距系统的胶囊内窥镜
CN111308690B (zh) * 2019-12-04 2022-04-05 中国科学院大学 一种光场电子内窥设备及其成像方法
CN110811489A (zh) * 2019-12-11 2020-02-21 深圳先进技术研究院 一种具有3d测量功能的胶囊内窥镜及相应成像方法
CN111145238B (zh) * 2019-12-12 2023-09-22 中国科学院深圳先进技术研究院 单目内窥镜图像的三维重建方法、装置及终端设备
CN111524071B (zh) * 2020-04-24 2022-09-16 安翰科技(武汉)股份有限公司 胶囊内窥镜图像拼接方法、电子设备及可读存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200082510A1 (en) * 2015-10-16 2020-03-12 Capso Vision, Inc. Method and Apparatus of Sharpening of Gastrointestinal Images Based on Depth Information
US20200128225A1 (en) * 2018-10-23 2020-04-23 Xi'an Jiaotong University Depth Information Acquisition Method and Device
CN111210468A (zh) * 2018-11-22 2020-05-29 中移(杭州)信息技术有限公司 一种图像深度信息获取方法及装置
CN109377530A (zh) * 2018-11-30 2019-02-22 天津大学 一种基于深度神经网络的双目深度估计方法
CN110033465A (zh) * 2019-04-18 2019-07-19 天津工业大学 一种应用于双目内窥镜医学图像的实时三维重建方法
CN110335318A (zh) * 2019-04-28 2019-10-15 安翰科技(武汉)股份有限公司 一种基于摄像系统的消化道内物体测量方法
CN110992431A (zh) * 2019-12-16 2020-04-10 电子科技大学 一种双目内窥镜软组织图像的联合三维重建方法
CN112261399A (zh) * 2020-12-18 2021-01-22 安翰科技(武汉)股份有限公司 胶囊内窥镜图像三维重建方法、电子设备及可读存储介质

Also Published As

Publication number Publication date
US20240054662A1 (en) 2024-02-15
CN112261399A (zh) 2021-01-22
CN112261399B (zh) 2021-03-16

Similar Documents

Publication Publication Date Title
CN109949899B (zh) 图像三维测量方法、电子设备、存储介质及程序产品
WO2022127533A1 (zh) 胶囊内窥镜图像三维重建方法、电子设备及可读存储介质
US20200268339A1 (en) System and method for patient positioning
Mahmoud et al. SLAM based quasi dense reconstruction for minimally invasive surgery scenes
JP6304970B2 (ja) 画像処理装置、画像処理方法
EP3308323B1 (en) Method for reconstructing 3d scene as 3d model
CN110992431B (zh) 一种双目内窥镜软组织图像的联合三维重建方法
CN109887071A (zh) 一种3d电子内镜系统及三维重建方法
CN110458952B (zh) 一种基于三目视觉的三维重建方法和装置
Mirzaalian Dastjerdi et al. Measuring surface area of skin lesions with 2D and 3D algorithms
CN110675436A (zh) 基于3d特征点的激光雷达与立体视觉配准方法
CN115619790B (zh) 一种基于双目定位的混合透视方法、系统及设备
CN114782470B (zh) 消化道的三维全景识别定位方法、存储介质和设备
WO2022218161A1 (zh) 用于目标匹配的方法、装置、设备及存储介质
CN115082777A (zh) 基于双目视觉的水下动态鱼类形态测量方法及装置
CN114399527A (zh) 单目内窥镜无监督深度和运动估计的方法及装置
TW202027090A (zh) 醫療矢面影像的取得方法、神經網路的訓練方法及計算機裝置
CN111127560B (zh) 一种用于三维重建的三目视觉系统的标定方法及系统
CN115294128B (zh) 一种用于消化内镜的单目结构三维成像方法及装置
CN112215878A (zh) 一种基于surf特征点的x光图像配准方法
CN114298986A (zh) 一种基于多视点无序x光片的胸腔骨骼三维构建方法及系统
CN115984203A (zh) 一种眼球突出度测量方法、系统、终端及介质
Paudel et al. Localization of 2D cameras in a known environment using direct 2D-3D registration
CN113587895A (zh) 双目测距方法及装置
CN114283236A (zh) 一种用智能手机进行口腔扫描的方法、装置和存储介质

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: 21905462

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18268239

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21905462

Country of ref document: EP

Kind code of ref document: A1