Digestive tract three-dimensional panoramic recognition and positioning method, storage medium and device
Through the multi-scale feature fusion and probability model, the three-dimensional panoramic recognition method of the digestive tract is solved, and the problems of inaccurate image stitching and low positioning accuracy are achieved, high-precision three-dimensional image recognition and positioning of the digestive tract are improved, and the accuracy and efficiency of diagnosis and surgery are improved.
Patent Information
- Application Number
- CN202510436659.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing digestive tract image acquisition technology has problems such as inaccurate image stitching and low positioning accuracy, especially in the case of light changes and image deformation, which is difficult to achieve high-precision positioning.
The image stitching algorithm based on multi-scale feature fusion and the image fusion strategy of weighted least squares method are adopted, combined with the feature point positioning method of the probability model, and through acquisition, preprocessing, multi-scale decomposition, feature extraction and three-dimensional curve fitting, high-precision three-dimensional panoramic recognition and positioning of the digestive tract are achieved.
It improves the accuracy of image stitching and the accuracy of feature point positioning, provides high-quality three-dimensional panoramic images, supports more accurate observation of digestive tract structures and lesion recognition, reduces misdiagnosis rates, optimizes surgical paths, and improves the accuracy and safety of diagnosis and surgery.
Smart Images

Figure CN120374926A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more specifically, to a three-dimensional panoramic recognition and positioning method, a storage medium, and a device for the digestive tract. Background Art
[0002] With the rapid development of medical imaging technology, digestive endoscopy technology has been widely used in clinical practice, especially playing an important role in the diagnosis of gastrointestinal diseases. In the research and application related to the digestive tract, it is crucial to obtain clear, complete, and accurately positioned three-dimensional images of the digestive tract. Existing digestive tract image acquisition technologies, such as endoscopic imaging, although can obtain partial digestive tract images, have problems such as inaccurate image stitching and low positioning accuracy.
[0003] Deficiencies of the existing technology:
[0004] Traditional image stitching methods are easily affected by factors such as changes in illumination and image deformation, resulting in gaps, misalignments, etc. in the stitched panoramic images. In terms of positioning, conventional positioning methods based on feature point matching are prone to false matching in complex scenes with a lot of similar textures like the digestive tract, making it difficult to achieve high-precision positioning and unable to meet the requirements of fine research and application of the digestive tract. Therefore, the present invention provides a three-dimensional panoramic recognition and positioning method, a storage medium, and a device for the digestive tract to solve the problems of inaccurate image stitching and low positioning accuracy.
[0005] In view of the above problems, the present invention proposes a solution. Summary of the Invention
[0006] In order to overcome the above-mentioned defects of the existing technology, embodiments of the present invention provide a three-dimensional panoramic recognition and positioning method, a storage medium, and a device for the digestive tract, which achieve high-precision three-dimensional panoramic recognition and positioning of the digestive tract through innovative image processing technology to solve the problems raised in the above background art.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A three-dimensional panoramic recognition and positioning method, a storage medium, and a device for the digestive tract, comprising the following steps:
[0009] Collect local images of the digestive tract, and perform preprocessing on the collected images, including denoising and grayscale operations, to improve the image quality;
[0010] Adopt an image stitching algorithm based on multi-scale feature fusion to perform multi-scale decomposition and feature extraction on the local images of the digestive tract;
[0011] Feature matching of the image is performed by calculating the Euclidean distance between feature point descriptors, and stitching is carried out using an image fusion strategy based on weighted least squares to obtain a three-dimensional panoramic image;
[0012] A feature point localization method based on a probability model is adopted to perform three-dimensional spatial localization of the feature points in the stitched panoramic image;
[0013] And according to the position information of the feature points, the three-dimensional curve of the digestive tract is fitted by combining the least squares method to realize the overall localization of the digestive tract.
[0014] In a preferred embodiment, the multi-scale decomposition adopts Gaussian pyramid decomposition, and the feature extraction adopts the Speeded Up Robust Features (SURF) algorithm.
[0015] In a preferred embodiment, the process of collecting local images of the digestive tract is as follows:
[0016] The camera parameters are finely set, and the sensitivity (ISO) is adjusted to an appropriate value;
[0017] The shutter speed is set to ensure that clear and non-blurred images can be captured in a dynamic environment such as the peristalsis of the digestive tract;
[0018] During the collection process, the endoscopic camera needs to be slowly moved along the digestive tract, and multiple frames of images are continuously captured at certain intervals to ensure complete coverage of the target area and obtain a series of local images with overlapping parts.
[0019] In a preferred embodiment, the process of performing multi-scale decomposition on the local images of the digestive tract is as follows:
[0020] The obtained local images of the digestive tract are used as inputs, and Gaussian pyramid is used to perform multi-scale decomposition on the obtained local images of the digestive tract to obtain image features at different scales;
[0021] At the initial stage of constructing the Gaussian pyramid, a relatively small standard deviation is selected as the Gaussian filter parameter;
[0022] A filter is constructed using a two-dimensional Gaussian function. For each pixel point in the image, the corresponding value in the first-layer Gaussian image is obtained through convolution operation with the Gaussian filter;
[0023] Downsampling is performed using an interlaced sampling method, and every other row and column of pixel points are discarded to obtain an image with a resolution of one-fourth of the original image. By analogy, a series of images at different scales are generated to construct the Gaussian pyramid.
[0024] In a preferred embodiment, the feature extraction process is as follows:
[0025] For each layer of the image in the Gaussian pyramid, calculate its integral image;
[0026] Based on the integral image, for each pixel point in the image under different Gaussian filter parameters of different scales, calculate the determinant value of its Hessian matrix;
[0027] And find the maximum value point of the determinant value at different scales to determine the possible feature point positions;
[0028] After finding the maximum value point of the determinant value of the Hessian matrix, by fitting the determinant values in the local neighborhood and using the quadratic interpolation method, obtain the more accurate feature point position coordinates;
[0029] Set the threshold condition. Only when the determinant value of the Hessian matrix is greater than a preset threshold, the corresponding point is confirmed as a feature point;
[0030] After screening, obtain a series of stable and representative feature points at different scales to form a feature point set;
[0031] For each feature point, with it as the center, use a circular neighborhood to calculate the gradient direction distribution within the neighborhood;
[0032] Calculate the gradient magnitude and gradient direction of each pixel point within the neighborhood, and statistically analyze the histogram of the gradient directions within the neighborhood. The peak direction of the histogram is the main direction of the feature point; if there are multiple peaks and the magnitudes are close, multiple directions are assigned to the feature point.
[0033] In a preferred embodiment, the process of obtaining the three-dimensional panoramic image is as follows:
[0034] Find matching pairs between the feature point sets at different scales, perform cross-scale feature matching, and determine the matching relationship by calculating the Euclidean distance between the feature point descriptors;
[0035] And calculate the minimum distance and the second minimum distance of each feature point. When the ratio of the minimum distance to the second minimum distance is less than the set threshold, screen out the matching pairs;
[0036] According to the matching pairs, use RANSAC to estimate the homography matrix H between the images. The matrix describes the perspective transformation relationship from image A to image B;
[0037] Use the calculated homography matrix H to perform perspective transformation on image A to align it with image B;
[0038] For the overlapping area of image A and image B, perform weighted calculation according to the distance from the feature points. At each overlapping pixel position, give weights to represent the contribution degrees of image A and image B at this position;
[0039] Introduce pixel weighting to optimize the transition effect at the stitching boundary and reduce stitching gaps or obvious transition phenomena;
[0040] Obtain a three-dimensional panoramic image through feature point matching and image stitching strategies.
[0041] In a preferred embodiment, the process of three-dimensional spatial positioning of feature points in the stitched panoramic image is as follows:
[0042] Introduce the three-dimensional shape of the digestive tract as prior knowledge into the probability model;
[0043] For the position of each feature point in the digestive tract image, it is assumed that a preliminary estimate has been obtained through image processing methods;
[0044] Construct a probability distribution model to describe the possible positions of feature points in three-dimensional space;
[0045] Use Bayes' theorem to combine prior knowledge and image data, update the position probability distribution of each feature point in three-dimensional space, and calculate the likelihood of each feature point;
[0046] Through Bayes' theorem, obtain the posterior probability distribution of the feature point positions;
[0047] Obtain the exact position of the feature points in three-dimensional space by maximizing the posterior probability.
[0048] In a preferred embodiment, the overall positioning process of the digestive tract is as follows: Extract several key feature points, preprocess the extracted feature points to remove noise or irrelevant information, and the processed feature point data will be used as the input of the fitting model; Through the least squares method, obtain the fitting curve. During the fitting process, the algorithm will dynamically adjust the shape of the curve according to the positions of the feature points until the distance error between all points and the curve is minimized; After completing the fitting, obtain a three-dimensional curve representing the overall shape and orientation of the entire digestive tract; After completing the three-dimensional curve fitting, visualize the curve in three-dimensional space.
[0049] An electronic device, characterized in that the electronic device includes:
[0050] At least one processor; and,
[0051] A memory communicatively connected to the at least one processor; wherein,
[0052] The memory stores a computer program executable by the at least one processor,
[0053] The computer program is executed by the at least one processor,
[0054] to enable the at least one processor to execute the three-dimensional panoramic recognition and positioning method of any one of the digestive tracts described above.
[0055] A computer-readable storage medium stores a computer program, which when executed by a processor implements the three-dimensional panoramic recognition and positioning method of any one of the digestive tracts in the embodiments.
[0056] Technical effects and advantages of the three-dimensional panoramic recognition and positioning method, storage medium, and device of the digestive tract of the present invention:
[0057] 1. Through the image stitching algorithm based on multi-scale feature fusion, the present invention effectively overcomes the influence of factors such as illumination changes and image deformation, and improves the accuracy of image stitching. Compared with traditional image stitching algorithms, the stitching error of the present invention is reduced, and the stitched panoramic image is smoother and seamless, providing a high-quality basic image for subsequent analysis and positioning. The feature point positioning method based on the probability model makes full use of the shape prior knowledge of the digestive tract and significantly improves the positioning accuracy of feature points in three-dimensional space. In simulated and actual digestive tract image tests, the positioning error is reduced compared with traditional positioning methods, and the position and shape of the digestive tract can be determined more accurately, providing more reliable data support for digestive tract-related research and applications.
[0058] 2. Through this method, the present invention can convert the image information of the digestive tract into a three-dimensional panoramic image, enabling medical staff to comprehensively observe the structure and lesions of the digestive tract from multiple angles and providing more intuitive clinical data support. By using panoramic recognition technology, each part of the digestive tract can be accurately positioned. Especially in endoscopic examinations, three-dimensional positioning can more accurately identify the lesion sites, reduce the misdiagnosis rate, and improve the accuracy of the examination. This method can fuse and process data from different sources to achieve more comprehensive and accurate image recognition and positioning, helping doctors obtain more reliable pathological analysis information. Through real-time image processing and three-dimensional reconstruction, doctors can perform real-time navigation during digestive tract surgery, optimize the surgical path, reduce the surgical time, and improve the safety and accuracy of the surgery. With the help of this method, doctors no longer need to analyze traditional two-dimensional images one by one. Three-dimensional panoramic recognition can not only improve the diagnosis efficiency but also reduce the workload of medical staff. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a schematic structural diagram of the three-dimensional panoramic recognition and positioning method of the digestive tract of the present invention.
[0060] Figure 2 It is a schematic structural diagram of the three-dimensional panoramic recognition and positioning device of the digestive tract of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0061] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0062] Embodiment 1, Figure 1 A three-dimensional panoramic recognition and positioning method, storage medium and device for the digestive tract of the present invention are given.
[0063] S10, collect local images of the digestive tract, and preprocess the collected images, perform denoising and grayscale operations to improve the image quality;
[0064] To obtain high-quality local images of the digestive tract, an appropriate image acquisition device needs to be selected. Taking an endoscopic camera as an example, it has high-resolution imaging capabilities and can penetrate deep into the digestive tract to obtain clear images.
[0065] Before operation, the camera parameters need to be finely set, and the sensitivity (ISO) is adjusted to an appropriate value to avoid introducing noise due to too high sensitivity or the image being too dark due to too low sensitivity.
[0066] At the same time, set an appropriate shutter speed to ensure that clear and non-blurry images can be captured in a dynamic environment such as the peristalsis of the digestive tract.
[0067] During the actual acquisition process, the endoscopic camera needs to be slowly moved along the digestive tract, and multiple frames of images are continuously captured at a certain interval to ensure complete coverage of the target area and obtain a series of local images with overlapping parts, providing sufficient materials for subsequent image stitching.
[0068] The original images collected often have noise due to factors such as the electronic noise of the device itself and environmental interference, which will seriously affect subsequent feature extraction and analysis.
[0069] The Gaussian filtering algorithm is used for denoising. This algorithm constructs a filter kernel based on the Gaussian function. For each pixel point in the image, a neighborhood window is selected with it as the center, such as a common 3×3 or 5×5 window.
[0070] Each pixel point in the window calculates the corresponding weight according to the Gaussian function, and the points closer to the central pixel have a greater weight.
[0071] By multiplying the pixel values in the window by the corresponding weights and summing them, and then dividing by the total weight, the denoised central pixel value is obtained.
[0072] After Gaussian filtering, the image can be effectively smoothed, most of the noise can be removed, and the image clarity can be improved, providing cleaner image data for subsequent processing.
[0073] Since subsequent feature extraction algorithms, such as the Speeded-Up Robust Features (SURF) algorithm, etc., have higher operation efficiency and better effects on grayscale images, it is necessary to grayscale the denoised color image. The weighted average method is used to achieve grayscaling. This method assigns different weights to the red (R), green (G), and blue (B) color channels according to the difference in human eye sensitivity to different colors.
[0074] S20, use an image stitching algorithm based on multi-scale feature fusion to perform multi-scale decomposition and feature extraction on the local images of the digestive tract;
[0075] Take the obtained local images of the digestive tract as input. These local images are collected from different angles or positions and contain information about different parts of the digestive tract, providing materials for constructing a complete panoramic image of the digestive tract.
[0076] Use a Gaussian pyramid to perform multi-scale decomposition on the obtained local images of the digestive tract to obtain image features at different scales;
[0077] At the initial stage of constructing the Gaussian pyramid, select a relatively small standard deviation as the parameter of the Gaussian filter. The setting of this value aims to preliminarily suppress high-frequency noise while retaining the main details of the image because a smaller standard deviation makes the smoothing effect of the Gaussian filter relatively weak on the image;
[0078] Use a two-dimensional Gaussian function to construct a filter. Let the original image be I, and after decomposition by the Gaussian pyramid, the image at the i-th layer is G i (I);
[0079] For each pixel point in the image, obtain the corresponding value in the first-layer Gaussian image through convolution operation with the Gaussian filter; this process smooths the high-frequency noise in the image to a certain extent and lays a foundation for analyzing image features at different scales later;
[0080] Downsample G1(I), usually using an interlaced and inter-column sampling method, discard every other row and column of pixel points in G1(I) to obtain an image G2(I) with a resolution one-fourth of the original image, and so on, repeating continuously to generate a series of images G i (I) to construct a Gaussian pyramid. Generally, 3 - 5 layers are constructed. Each layer has different image resolutions and filtering degrees, containing different-scale digestive tract image features from bottom-layer details to high-layer macro views.
[0081] The feature extraction process is as follows:
[0082] For each layer of image in the Gaussian pyramid, calculate its integral image;
[0083] Based on the integral image, for each pixel in image G i under different Gaussian filter parameters at different scales, calculate the determinant value of its Hessian matrix;
[0084] And find the maximum value points of the determinant value at different scales to determine the possible feature point positions;
[0085] After finding the maximum value points of the determinant value of the Hessian matrix, by fitting the determinant values in the local neighborhood and using the quadratic interpolation method, obtain the more accurate feature point position coordinates;
[0086] Meanwhile, set the threshold condition. Only when the determinant value of the Hessian matrix is greater than a pre-set threshold, the corresponding point is confirmed as a feature point;
[0087] After screening, obtain a series of stable and representative feature points at different scales, which constitute the feature point set F i ;
[0088] For each feature point f ∈ F i , centered on it, use a circular neighborhood (the radius is determined according to the scale where the feature point is located, generally proportional to the scale) to calculate the gradient direction distribution within the neighborhood;
[0089] Calculate the gradient magnitude and gradient direction of each pixel within the neighborhood, and statistically analyze the histogram of the gradient directions within the neighborhood. The peak direction of the histogram is the main direction of this feature point;
[0090] If there are multiple peaks and their magnitudes are close, assign multiple directions to this feature point to enhance the robustness of the feature point description;
[0091] So far, each feature point has the position, scale, and direction information, and can better describe the local features of the image.
[0092] S30, perform feature matching on the image by calculating the Euclidean distance between the feature point descriptors, and use the image fusion strategy based on the weighted least squares method for stitching to obtain the three-dimensional panoramic image;
[0093] Find the matching pairs between the feature point sets at different scales for cross-scale feature matching, and determine the matching relationship by calculating the Euclidean distance between the feature point descriptors. Let two feature points f a ∈F i and f b ∈F i , and their descriptors are d a and d b , then the Euclidean distance where n is the dimension of the descriptor.
[0094] Calculate the minimum distance and the second minimum distance of each feature point. Only when the ratio of the minimum distance to the second minimum distance is less than the set threshold, the match is considered reliable, and reliable matching pairs are screened out.
[0095] According to the matching pairs, use RANSAC (Random Sample Consensus algorithm) to estimate the homography matrix H between the images. The matrix describes the perspective transformation relationship from image A to image B.
[0096] Use the calculated homography matrix H to perform perspective transformation on image A to align it with image B.
[0097] For the overlapping region of image A and image B, perform weighted calculation according to the distance from the feature points. At each overlapping pixel position, a weight is given to represent the contribution degrees of image A and image B at this position.
[0098] Introduce pixel weighting to optimize the transition effect of the stitching boundary, reduce stitching gaps or obvious transition phenomena, and make the image stitching more natural.
[0099] Through feature point matching and image stitching strategies, a seamless panoramic image can finally be obtained.
[0100] S40. Adopt a feature point localization method based on a probability model to perform three-dimensional space localization on the feature points in the stitched panoramic image.
[0101] First, introduce the three-dimensional shape of the digestive tract as prior knowledge into the probability model. The digestive tract usually has a tubular structure, so its shape can be represented by a model similar to a helix or a tube. This shape can be modeled by methods such as Gaussian process and Kalman filter.
[0102] For the position of each feature point in the digestive tract image, assume that we have obtained a preliminary estimate through image processing methods.
[0103] To model the accuracy of the feature point position, construct a probability distribution model that describes the possible positions of the feature points in three-dimensional space.
[0104] Use Bayes' theorem to combine the prior knowledge and the image data to obtain the posterior probability and update the position probability distribution of each feature point in three-dimensional space.
[0105] Calculate the likelihood of each feature point through the gradient information in the image or image matching; if the feature points in the image are well matched, the likelihood at this position is higher, otherwise it is lower.
[0106] Through Bayes' theorem, obtain the posterior probability distribution of the feature point position; to determine the most likely position of the feature point, it is necessary to maximize this posterior probability.
[0107] For multiple feature points in an image, the joint posterior probability is determined through joint optimization;
[0108] The exact positions of all feature points are obtained by maximizing the joint posterior probability.
[0109] A feature point localization method based on a probability model is proposed. For each feature point in the digestive tract image, a probability distribution model is constructed to describe the possible positions of the feature point in three-dimensional space. Considering the prior knowledge of the shape of the digestive tract, such as the digestive tract is roughly a tubular structure, the position probability distribution of the feature point is updated using Bayes' theorem; by maximizing the posterior probability, the exact position of the feature point in three-dimensional space is obtained.
[0110] S50, and according to the position information of the feature points, combined with the least squares method to fit the three-dimensional curve of the digestive tract, realizing the overall localization of the digestive tract.
[0111] First, a number of key feature points need to be extracted from the imaging data of the digestive tract; these points are usually the edge of the digestive tract or the landmark points of important structures, and these points are located by medical imaging means. The position information (usually three-dimensional coordinates) of these feature points will be used for subsequent fitting.
[0112] By preprocessing the extracted feature points, removing noise or irrelevant information, ensuring the accuracy of these points. The processed data will be used as the input of the fitting model. At this time, each feature point represents a part of the digestive tract, so it is necessary to ensure that these points are distributed as evenly and comprehensively as possible.
[0113] The least squares method is an optimization method aimed at determining the best fitting model by minimizing the sum of the squares of the errors between the data points and the fitting curve. For the three-dimensional digestive tract curve, we can assume that the digestive tract is a continuous curve, and the least squares method will be used to find the best three-dimensional curve so that these feature points are as close to the curve as possible.
[0114] Through the least squares method, the calculated fitting curve can be a smooth and continuous three-dimensional path. This path is the three-dimensional localization model of the digestive tract. During the fitting process, the algorithm will dynamically adjust the shape of the curve according to the positions of the feature points until the distance error between all points and the curve is minimized.
[0115] After the fitting is completed, the obtained three-dimensional curve can be used to represent the overall shape and orientation of the entire digestive tract. This curve can provide valuable information for subsequent medical analysis, surgical planning or treatment. For example, the degree of curvature and morphological changes of the digestive tract can be judged according to this curve, and even used to guide the positioning and operation of endoscopes or other medical tools.
[0116] After completing the three-dimensional curve fitting, the curve can be visualized in three-dimensional space to help doctors better understand the structure of the digestive tract.
[0117] The above formulas are all dimensionless and only take their numerical values for calculation. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the real situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0118] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product.
[0119] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0120] In addition, in each embodiment of this application, the functional modules can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
[0121] As described above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0122] Finally: The above is only the preferred embodiment of the present invention and is not used to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. Three-dimensional panoramic recognition and positioning method for digestive tract, characterized in that It includes the following steps: Collect local images of the digestive tract, and preprocess the collected images, including denoising and grayscaling operations to improve image quality. Adopt an image stitching algorithm based on multi-scale feature fusion to perform multi-scale decomposition and feature extraction on the local images of the digestive tract. Perform feature matching on the images by calculating the Euclidean distance between feature point descriptors, and adopt an image fusion strategy based on weighted least squares method for stitching to obtain a three-dimensional panoramic image. Adopt a feature point localization method based on a probability model to perform three-dimensional spatial localization on the feature points in the stitched panoramic image. And according to the position information of the feature points, combine the least squares method to fit the three-dimensional curve of the digestive tract to achieve the overall localization of the digestive tract.
2. The three-dimensional panoramic recognition and positioning method for the digestive tract according to claim 1, characterized in that, The multi-scale decomposition adopts Gaussian pyramid decomposition, and the feature extraction adopts the Speeded Up Robust Features (SURF) algorithm.
3. The three-dimensional panoramic recognition and positioning method for the digestive tract according to claim 2, characterized in that, The process of collecting local images of the digestive tract is as follows: Fine-tune the camera parameters and adjust the ISO (sensitivity) to an appropriate value. Set the shutter speed to ensure that clear and non-blurred images can be captured in a dynamic environment such as digestive tract peristalsis. During the collection process, the endoscope camera needs to be slowly moved along the digestive tract, and multiple frames of images are continuously captured at a certain interval to ensure complete coverage of the target area and obtain a series of local images with overlapping parts.
4. The three-dimensional panoramic recognition and positioning method for the digestive tract according to claim 3, wherein, The process of performing multi-scale decomposition on the local images of the digestive tract is as follows: Take the obtained local images of the digestive tract as input, and use the Gaussian pyramid to perform multi-scale decomposition on the obtained local images of the digestive tract to obtain image features at different scales. At the initial stage of constructing the Gaussian pyramid, select a smaller standard deviation as the Gaussian filter parameter. Construct a filter using the two-dimensional Gaussian function. For each pixel point in the image, obtain the corresponding value in the first-layer Gaussian image through convolution operation with the Gaussian filter. Adopt an interlaced and inter-column sampling method for downsampling. Discard every other row and column of pixel points to obtain an image with a resolution of one-fourth of the original image. And so on, generate a series of images at different scales to construct the Gaussian pyramid.
5. The three-dimensional panoramic recognition and positioning method for the digestive tract according to claim 4, characterized in that, The feature extraction process is as follows: For each layer of image in the Gaussian pyramid, calculate its integral image. Based on the integral image, at different scales of Gaussian filter parameters, for each pixel point in the image, calculate the determinant value of its Hessian matrix. And find the maximum value points of the determinant value at different scales to determine the possible positions of feature points. After finding the maximum value points of the determinant value of the Hessian matrix, through fitting the determinant values in the local neighborhood and using the quadratic interpolation method, obtain more accurate feature point position coordinates. Set threshold conditions. Only when the determinant value of the Hessian matrix is greater than a pre-set threshold, the corresponding point is confirmed as a feature point. After screening, obtain a series of stable and representative feature points at different scales to form a feature point set. For each feature point, take it as the center and calculate the gradient direction distribution within the circular neighborhood. Calculate the gradient magnitude and gradient direction of each pixel point in the neighborhood, and statistically analyze the histogram of the gradient directions in the neighborhood. The peak direction of the histogram is the main direction of the feature point. If there are multiple peaks and their magnitudes are close, multiple directions are assigned to this feature point.
6. The three-dimensional panoramic recognition and positioning method for the digestive tract according to claim 5, wherein, The process of obtaining the three-dimensional panoramic image is as follows: Find matching pairs between feature point sets at different scales, perform cross-scale feature matching, and determine the matching relationship by calculating the Euclidean distance between feature point descriptors. Calculate the minimum distance and the second minimum distance of each feature point. When the ratio of the minimum distance to the second minimum distance is less than the set threshold, the matching pairs are screened out. Use RANSAC to estimate the homography matrix H between the images based on the matching pairs. The matrix describes the perspective transformation relationship from image A to image B. Use the calculated homography matrix H to perform perspective transformation on image A to align it with image B. For the overlapping area of image A and image B, perform weighted calculation according to the distance from the feature points. At each overlapping pixel position, a given weight represents the contribution degrees of image A and image B at this position. Introduce pixel weighting to optimize the transition effect of the stitching boundary and reduce stitching gaps or obvious transition phenomena. Obtain the three-dimensional panoramic image through feature point matching and image stitching strategies.
7. The three-dimensional panoramic recognition and positioning method for the digestive tract according to claim 6, wherein The process of three-dimensional spatial positioning of the feature points in the stitched panoramic image is as follows: Introduce the three-dimensional shape of the digestive tract as prior knowledge into the probability model. For the position of each feature point in the digestive tract image, assume that a preliminary estimate has been obtained through image processing methods. Construct a probability distribution model to describe the possible positions of the feature points in three-dimensional space. Use Bayes' theorem to combine prior knowledge and image data to update the position probability distribution of each feature point in three-dimensional space and calculate the likelihood of each feature point. Obtain the posterior probability distribution of the feature point positions through Bayes' theorem. Obtain the exact position of the feature points in three-dimensional space by maximizing the posterior probability.
8. The three-dimensional panoramic recognition and positioning method for the digestive tract according to claim 7, characterized in that The process of overall positioning of the digestive tract is as follows: Extract several key feature points, preprocess the extracted feature points to remove noise or irrelevant information, and the processed feature point data will be used as the input for the fitting model. Obtain the fitting curve through the least squares method. During the fitting process, the algorithm will dynamically adjust the shape of the curve according to the positions of the feature points until the distance error from all points to the curve is minimized. After the fitting is completed, obtain a three-dimensional curve representing the overall shape and orientation of the entire digestive tract. After the three-dimensional curve fitting is completed, visualize the curve in three-dimensional space.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, The computer program is executed by the at least one processor, So that the at least one processor can execute the three-dimensional panoramic recognition and positioning method of the digestive tract according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the three-dimensional panoramic recognition and positioning method of the digestive tract according to any one of claims 1 to 8.
Citation Information
Cited By
Digestive tract panoramic image reconstruction system and reconstruction method thereof
CN121353502A