An Adaptive Enhancement Method and System for Gastrointestinal Endoscope Images
By collecting multiple images and calculating the weight of each pixel point in the digestive tract ultrasonic endoscopic image processing, the problem of blurring details during the noise reduction process by weighted local mean filtering is solved, and clearer lesion area images are achieved, and the diagnosis accuracy is improved.
Patent Information
- Application Number
- CN202510465212.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-04-15
AI Technical Summary
The existing weighted local mean filtering method may blur the details of the digestive tract ultrasound endoscopic image during the noise reduction process, especially in the lesion area, making the lesion morphology and boundaries difficult to confirm.
By collecting multiple ultrasonic endoscopic images of the same position and angle, greyscale processing is performed and each preprocessed image is traversed. Then, according to the grayscale value distribution trend of pixel points in each filter window, grouping thresholds and probability parameters, combined with the fluctuation coefficient of pixel points, the weight of each pixel point is calculated, and the weighted local mean filtering process is performed to enhance the image.
The detailed information of the digestive tract ultrasound endoscopic image is effectively retained, especially in the lesion area, improving the image quality, making the lesion morphology and boundaries clearer, and helping doctors to diagnose more accurately.
Smart Images

Figure CN119991454B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image enhancement, and particularly to an adaptive enhancement method and system for gastrointestinal endoscope images. Background Art
[0002] Endoscopic ultrasound is a gastrointestinal examination technique that combines endoscopy and ultrasound. When the endoscopic ultrasound is inserted into the body cavity, it can not only observe the surface mucosa of the digestive tract like a common endoscope, but also use the ultrasound under the endoscope for real-time scanning to obtain the histological characteristics of the hierarchical structure of the gastrointestinal tract, and can observe some submucosal lesions. Denoising the endoscopic ultrasound images of the digestive tract is mainly to improve the image quality and reduce interference factors, so as to assist doctors in making more accurate diagnoses; through enhancement processing, the noise and blurring in the images can be removed, making the endoscopic ultrasound images of the digestive tract clearer, which helps doctors observe and analyze the lesion conditions more accurately.
[0003] The weighted local mean filtering method can be used for the enhancement of endoscopic ultrasound images of the digestive tract. Its advantage lies in being able to retain more image details while smoothing the noise, thereby improving the image quality and being widely used for image enhancement in various scenarios; the weighting method of the weighted local mean filtering method is generally based on the distance principle and the gray value difference principle, and may blur the detail information of the endoscopic ultrasound images of the digestive tract during the denoising process. Because the normal tissues of the digestive tract wall usually show specific echo levels in the endoscopic ultrasound images, it is very important to retain the clearly visible levels and edge information, and these levels are of important diagnostic value to doctors; while the echo levels in the lesion area may be more disordered, or the situation such as the disappearance of the demarcation line may occur, and these situations may be over-smoothed, making it difficult to confirm the morphology and boundary of the lesion area. Summary of the Invention
[0004] The present invention provides an adaptive enhancement method and system for gastrointestinal endoscope images to solve the existing problem that the weighting method of the weighted local mean filtering method may blur the detail information of the endoscopic ultrasound images of the digestive tract during the denoising process.
[0005] The adaptive enhancement method and system for gastrointestinal endoscope images of the present invention adopt the following technical solutions:
[0006] In the first aspect of the present invention, an adaptive enhancement method for gastrointestinal endoscope images is provided, and the method includes the following steps:
[0007] Collect multiple endoscopic ultrasound images at the same position and angle and perform grayscale processing on the images. Traverse the grayscale images in the order of collecting the endoscopic ultrasound images to obtain each preprocessed image;
[0008] According to the gray value distribution trend of the pixel points in each filtering window of each preprocessed image, obtain the grouping threshold of each filtering window in each preprocessed image and divide the pixel points in the filtering window into two groups; according to the gray value distribution difference between the two groups of pixel points after grouping in each filtering window of each preprocessed image, obtain the probability parameter of each filtering window in each preprocessed image; according to the fluctuation amplitude of the pixel points in the filtering windows of the same sequence in each preprocessed image, obtain the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image; according to the grouping of the pixel points in each filtering window of each preprocessed image, the probability parameter of each filtering window in each preprocessed image, and the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image, obtain the weight of each pixel point in each filtering window of each preprocessed image.
[0009] Enhance each preprocessed image according to the weight of each pixel point in each filtering window of each preprocessed image.
[0010] Further, the method for collecting multiple endoscopic ultrasound images at the same position and angle and performing grayscale processing on the images, and traversing the grayscale images in the order of collecting the endoscopic ultrasound images to obtain each preprocessed image specifically includes:
[0011] Under the condition of keeping the position and angle of the endoscopic ultrasound probe in the digestive tract consistent, collect an endoscopic ultrasound image every s seconds, collect a total of n endoscopic ultrasound images, perform grayscale processing on the n collected endoscopic ultrasound images to obtain n grayscale images, and traverse the n grayscale images in the order of collecting the corresponding endoscopic ultrasound images. Each grayscale image after traversing is recorded as each preprocessed image.
[0012] Further, the method for obtaining the grouping threshold of each filtering window in each preprocessed image according to the gray value distribution trend of the pixel points in each filtering window of each preprocessed image and dividing the pixel points in the filtering window into two groups specifically includes:
[0013] Set the dynamic threshold of the e-th filtering window in the p-th preprocessed image. The dynamic threshold of the e-th filtering window in the p-th preprocessed image is denoted as , and the range of the dynamic threshold is 1 to 254. The method for calculating the grouping coefficient of the pixel points in the filtering window is as follows:
[0014] ;
[0015] In the formula, represents the grouping coefficient of the e-th filtering window in the p-th preprocessed image, represents all the gray values in the e-th filtering window in the p-th preprocessed image that are less than or equal to the dynamic threshold The variance of the gray values of the pixel points, represents the variance of the gray values of the pixel points in the e-th filtering window of the p-th preprocessed image whose gray values are greater than the dynamic threshold ;
[0016] Calculate the size of the grouping coefficient under different dynamic thresholds, and use the dynamic threshold corresponding to the maximum grouping coefficient as the grouping threshold of the pixel points in the e-th filtering window of the p-th preprocessed image. This grouping threshold is denoted as . The pixel points in the e-th filtering window of the p-th preprocessed image whose gray values are less than or equal to the grouping threshold are the first group of pixel points, and the pixel points in the e-th filtering window of the p-th preprocessed image whose gray values are greater than the grouping threshold are the second group of pixel points. Obtain the grouping threshold of each filtering window in each preprocessed image according to the above method and divide the pixel points in each filtering window into two categories.
[0017] Furthermore, the method for obtaining the probability parameter of each filtering window in each preprocessed image according to the difference in the gray value distribution of the two groups of pixel points after grouping in each filtering window of each preprocessed image includes the following specific method:
[0018] ;
[0019] In the formula, represents the probability parameter of the e-th filtering window of the p-th preprocessed image, represents the average gray value of the pixel points in the e-th filtering window of the p-th preprocessed image whose gray values are greater than the grouping threshold ; represents the average gray value of the pixel points in the e-th filtering window of the p-th preprocessed image whose gray values are less than or equal to the grouping threshold ; represents the gray value of the pixel point with the largest gray value among the pixel points in the e-th filtering window of the p-th preprocessed image whose gray values are greater than the grouping threshold ; represents the gray value of the pixel point with the smallest gray value among the pixel points in the e-th filtering window of the p-th preprocessed image whose gray values are less than or equal to the grouping threshold of the e-th filtering window. Obtain the probability parameter of each filtering window according to the above method.
[0020] Furthermore, the method for obtaining the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image according to the fluctuation amplitude of the pixel points in the filtering windows with the same sequence in each preprocessed image includes the following specific method:
[0021] ;
[0022] In the formula, represents the fluctuation coefficient of the r-th pixel point in the e-th filtering window of the p-th preprocessed image, n represents the number of collected endoscopic ultrasound images, represents the gray value of the r-th pixel point in the e-th filtering window of the i-th preprocessed image, represents the average gray value of the r-th pixel point in the e-th filtering window of each preprocessed image. The fluctuation coefficient of each pixel point in each filtering window of each preprocessed image is obtained according to the above method.
[0023] Furthermore, the method for obtaining the weight of each pixel point in each filtering window of each preprocessed image according to the grouping of pixel points in each filtering window of each preprocessed image, the probability parameter of each filtering window of each preprocessed image, and the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image includes the following specific method:
[0024] First, determine whether the central pixel point of the e-th filtering window in the p-th preprocessed image belongs to the first group of pixel points or the second group of pixel points in this filtering window;
[0025] If the central pixel point of the e-th filtering window in the p-th preprocessed image belongs to the first group of pixel points in this filtering window, then:
[0026] ;
[0027] If the central pixel point of the e-th filtering window in the p-th preprocessed image belongs to the second group of pixel points in this filtering window, then:
[0028] ;
[0029] In the formula, represents the weight of the r-th pixel point in the e-th filtering window of the p-th preprocessed image, represents the probability parameter of the e-th filtering window in the p-th preprocessed image, represents the fluctuation coefficient of the r-th pixel point in the e-th filtering window of the p-th preprocessed image, represents the gray value of the central pixel point of the e-th filtering window in the p-th preprocessed image, represents the gray value of the r-th pixel point in the e-th filtering window of the p-th preprocessed image; the weight of each pixel point in each filtering window of each preprocessed image is obtained according to the above method.
[0030] Furthermore, the method for enhancing each preprocessed image according to the weight of each pixel point in each filtering window of each preprocessed image includes the following specific method:
[0031] ;
[0032] In the formula, represents the enhanced gray value of the r-th pixel point in the e-th filtering window of the p-th preprocessed image, represents the weight of the K-th pixel point in the e-th filtering window of the p-th preprocessed image, represents the gray value of the K-th pixel point in the e-th filtering window of the p-th preprocessed image, represents the weight of the j-th pixel point in the e-th filtering window of the p-th preprocessed image, and M represents the number of pixel points in the filtering window. The enhanced gray value of each pixel point in each filtering window of each preprocessed image is obtained according to the above method, and the enhancement of each preprocessed image is completed.
[0033] In the second aspect of the present invention, an adaptive enhancement system for gastrointestinal endoscope images is provided. The system includes an image acquisition module, a weight calculation module, and an image enhancement module, where:
[0034] The image acquisition module is used to acquire multiple endoscopic ultrasound images at the same position and angle, perform graying processing on the images, traverse the gray images in the order of acquisition of the endoscopic ultrasound images, and obtain each preprocessed image;
[0035] The weight calculation module is used to obtain the grouping threshold of each filtering window in each preprocessed image according to the gray value distribution trend of the pixel points in each filtering window of each preprocessed image, and divide the pixel points in the filtering window into two groups; obtain the probability parameter of each filtering window in each preprocessed image according to the gray value distribution difference between the two groups of pixel points after grouping in each filtering window of each preprocessed image; obtain the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image according to the fluctuation amplitude of the pixel points in the filtering windows of the same sequence of each preprocessed image; and obtain the weight of each pixel point in each filtering window of each preprocessed image according to the grouping of the pixel points in each filtering window of each preprocessed image, the probability parameter of each filtering window in each preprocessed image, and the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image;
[0036] The image enhancement module is used to enhance each preprocessed image according to the weight of each pixel point in each filtering window of each preprocessed image.
[0037] In the third aspect of the present invention, a computer-readable storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the steps of the above-mentioned method for adaptively enhancing gastrointestinal endoscope images are implemented.
[0038] In the fourth aspect of the present invention, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program, when executed by the processor, implements the steps of the above-mentioned method for adaptively enhancing the images of a digestive endoscope.
[0039] The beneficial effects of the technical solution of the present invention are as follows: Multiple endoscopic ultrasound images at the same position and angle are collected and grayscale processed. The grayscale images are traversed in the order of collection of the endoscopic ultrasound images to obtain each preprocessed image. Although the noise in the endoscopic ultrasound images is similar to the grayscale distribution characteristics of the pixel points in the lesion area, the noise is random and accidental. Therefore, collecting multiple endoscopic ultrasound images at the same position and the same angle can, to a certain extent, distinguish the noise pixel points and the pixel points in the lesion area, facilitating the weight assignment to the noise pixel points and the pixel points in the lesion area during the subsequent weighting process.
[0040] According to the grayscale value distribution trend of the pixel points in each filtering window of each preprocessed image, the grouping threshold of each filtering window in each preprocessed image is obtained, and the pixel points in the filtering window are divided into two groups. In the endoscopic ultrasound image, the normal tissues of the digestive tract wall will show clear echo levels, and there are obvious differences in the pixel grayscale values between these levels. Dividing the pixel points in the filtering window into the two categories with the largest difference is convenient for subsequently judging the relative probability that the filtering window is located at the junction of adjacent echo levels by judging the difference and law of the pixel grayscale value distribution of the two types of pixel points, and then selecting different weighting modes for the pixel points in the filtering window according to different probabilities.
[0041] According to the difference in the grayscale value distribution of the two groups of pixel points after grouping in each filtering window of each preprocessed image, the probability parameter of each filtering window in each preprocessed image is obtained. According to the characteristics of the two types of pixel points in different groups, the relative probability that the window is located at the junction of adjacent echo levels is judged. When the relative probability is relatively high, the enhancement effect should focus on strengthening the information at the junction; when the relative probability is relatively low, the enhancement effect should focus on noise reduction.
[0042] According to the fluctuation amplitude of the pixel points in the filtering windows of the same sequence of each preprocessed image, the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image is obtained. To a certain extent, the noise pixel points can be screened out through the fluctuation of the pixel points at the same position in different images, avoiding the over-smoothing of the noise area due to the too-close similarity between the grayscale value distribution characteristics of the pixel points in the lesion area and the grayscale value distribution characteristics of the noise pixel points.
[0043] Based on the grouping of pixel points within each filtering window in each preprocessed image, the probability parameters of each filtering window in each preprocessed image, and the fluctuation coefficients of each pixel point in each filtering window of each preprocessed image, obtain the weight of each pixel point within each filtering window in each preprocessed image; combine the parameters and grouping obtained above, determine which echo level the pixel point to be enhanced belongs to, and according to the pixel point grouping to which the pixel point to be enhanced belongs, make the features of the enhanced pixel point to be closer to the gray gradient features of the pixel points in its pixel point grouping, and combine the fluctuation amplitude of the pixel point to reduce the weight of noise pixel points, reducing the influence of noise pixel points on the enhancement effect;
[0044] Enhance each preprocessed image according to the weight of each pixel point within each filtering window in each preprocessed image; perform different weight ratios for high and low pixel points in the filtering window. Under this weight ratio, when the features at the junction of adjacent echo levels are obvious, make the junction clearer; when the features at the junction of adjacent echo levels are not obvious, reduce the influence of noise on the image quality, and the reduction of the influence of noise on the image quality is judged based on multiple images at the same angular position, which can effectively avoid the pixel points in the lesion area being misclassified as noise pixel points due to disordered arrangement, and avoid over-smoothing of the lesion area. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0046] Figure 1 It is a flowchart of the steps of an adaptive enhancement method for gastrointestinal endoscope images according to the present invention;
[0047] Figure 2 It is a structural block diagram of an adaptive enhancement system for gastrointestinal endoscope images according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in combination with the drawings and preferred embodiments, details the specific implementation manners, structures, features and effects of an adaptive enhancement method and system for gastrointestinal endoscope images proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs.
[0050] The following specifically describes the specific solutions of a method and system for adaptively enhancing the images of a digestive endoscope provided by the present invention in conjunction with the accompanying drawings.
[0051] Please refer to Figure 1 , which shows the first object of the present invention, a flowchart of the steps of a method for adaptively enhancing the images of a digestive endoscope. The method includes the following steps:
[0052] Step S001: Collect multiple endoscopic ultrasound images at the same position and angle and perform grayscale processing on the images. Traverse the grayscale images in the order of collecting the endoscopic ultrasound images to obtain each preprocessed image.
[0053] It should be noted that although the noise in the endoscopic ultrasound image is similar to the gray distribution characteristics of the pixel points in the lesion area, the noise is random and accidental. Therefore, collecting multiple endoscopic ultrasound images at the same position and angle can, to a certain extent, distinguish the noise pixel points and the pixel points in the lesion area; in this step, it is necessary to preset the number n of endoscopic ultrasound images to be collected and the time interval s between the collections of endoscopic ultrasound images. In this embodiment, the number n of endoscopic ultrasound images to be collected is 20, and the time interval s between the collections of endoscopic ultrasound images is 0.02 seconds. This embodiment does not specifically limit the number n of endoscopic ultrasound images to be collected and the time interval s between the collections of endoscopic ultrasound images. In other embodiments, the number of endoscopic ultrasound images to be collected and the time interval between the collections of endoscopic ultrasound images depend on the specific implementation situation.
[0054] Specifically, the method of collecting multiple endoscopic ultrasound images at the same position and angle, performing grayscale processing on the images, and traversing the grayscale images in the order of collecting the endoscopic ultrasound images to obtain each preprocessed image is as follows:
[0055] Under the condition of keeping the position and angle of the endoscopic ultrasound probe in the digestive tract consistent, collect one endoscopic ultrasound image every s seconds, and collect a total of n endoscopic ultrasound images. Perform grayscale processing on the n collected endoscopic ultrasound images to obtain n grayscale images, and traverse the n grayscale images in the order corresponding to the collection of the endoscopic ultrasound images. Each grayscale image after traversal is recorded as each preprocessed image.
[0056] Step S002: According to the gray value distribution trend of the pixel points in each filtering window of each preprocessed image, obtain the grouping threshold of each filtering window in each preprocessed image and divide the pixel points in the filtering window into two groups; according to the gray value distribution difference between the two groups of pixel points after grouping in each filtering window of each preprocessed image, obtain the probability parameter of each filtering window in each preprocessed image; according to the fluctuation amplitude of the pixel points in the filtering windows with the same sequence in each preprocessed image, obtain the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image; according to the grouping of the pixel points in each filtering window of each preprocessed image, the probability parameter of each filtering window in each preprocessed image, and the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image, obtain the weight of each pixel point in each filtering window of each preprocessed image.
[0057] It should be noted that in the endoscopic ultrasound image, the normal tissue of the digestive tract wall will show clear echo levels, and there are obvious differences in the pixel gray values between these levels. When using the weighted local mean filtering method to reduce the noise in the image, if the filtering window happens to be located at the junction of two adjacent echo levels, then the gray values of the pixel points in the window will more significantly reflect the characteristics of these two echo levels, that is, due to the large differences in the pixel gray values of different echo levels, in the filtering window at the junction, the gray value distribution of the pixel points will relatively obviously tend to the gray value ranges corresponding to these two echo levels.
[0058] Specifically, according to the gray value distribution trend of the pixel points in each filtering window of each preprocessed image, obtain the grouping threshold of each filtering window in each preprocessed image and divide the pixel points in the filtering window into two groups. The specific method is as follows:
[0059] Set the dynamic threshold of the e-th filtering window in the p-th preprocessed image. The dynamic threshold of the e-th filtering window in the p-th preprocessed image is denoted as , and the range of the dynamic threshold is 1 to 254. The method for calculating the grouping coefficient of the pixel points in the filtering window is as follows:
[0060] ;
[0061] In the formula, represents the grouping coefficient of the e-th filtering window in the p-th preprocessed image, represents the variance of the gray values of all pixel points with gray values less than or equal to the dynamic threshold in the e-th filtering window in the p-th preprocessed image, represents the variance of the gray values of all pixel points with gray values greater than the dynamic threshold in the e-th filtering window in the p-th preprocessed image;
[0062] Calculate the grouping coefficients under different dynamic thresholds and take the dynamic threshold corresponding to the maximum grouping coefficient as the grouping threshold for the pixel points in the e-th filtering window of the p-th preprocessed image. This grouping threshold is denoted as . For the p-th preprocessed image, all pixel points with gray values less than or equal to the grouping threshold in the e-th filtering window are the first group of pixel points, and all pixel points with gray values greater than the grouping threshold in the e-th filtering window of the p-th preprocessed image are the second group of pixel points. Obtain the grouping thresholds for each filtering window in each preprocessed image according to the above method and divide the pixel points in each filtering window into two categories.
[0063] It should be noted that the above steps divide the pixel points in each filtering window into two categories according to the distribution trend of the pixel points in each filtering window. When the within-group gray value variance of the two-pixel point grouping is the smallest and the between-group gray value variance is the largest, it indicates that the pixel points in the filtering window have been divided into two categories with the largest difference at this time. Because under the grouping conditions at this time, it can be ensured that the gray value distributions of the pixel points within the group are close, and the gray value distributions of the pixel points in different groups are significantly different enough. The purpose of grouping is to assume that the filtering window is located at the junction of two adjacent echo levels, so as to judge the probability of the window being located at the junction of two adjacent echo levels by comparing the gray value characteristics of the pixel points in different windows through comparative analysis.
[0064] Furthermore, it should be noted that the above steps divide the pixel points in each filtering window into two groups. Now, it is necessary to judge the probability of the filtering window being located at the junction of two adjacent echo levels according to the distribution differences of the grouped pixel point gray values in different filtering windows. When the probability of the filtering window being located at the junction of two adjacent echo levels is relatively high, the weight of the filtering window should be adjusted to focus on making the pixel points at the junction clearer for observing clear echo levels; when the probability of the filtering window being located at the junction of two adjacent echo levels is relatively low, the weight of the filtering window should be adjusted to focus on reducing the noise impact in order to better observe the fine details of the tissue structure or lesion area.
[0065] Specifically, according to the distribution differences of the two groups of pixel point gray values after grouping in each filtering window of each preprocessed image, obtain the probability parameters of each filtering window in each preprocessed image. The specific method is as follows:
[0066] ;
[0067] In the formula, represents the probability parameter of the e-th filtering window in the p-th preprocessed image, represents that in the e-th filtering window of the p-th preprocessed image, all gray values are greater than the grouping threshold The average gray value of the pixel points; It represents the average gray value of the pixel points with gray values less than or equal to the grouping threshold in the e-th filtering window of the p-th preprocessed image ; It represents the gray value of the pixel point with the largest gray value among the pixel points with gray values greater than the grouping threshold in the e-th filtering window of the p-th preprocessed image ; It represents the gray value of the pixel point with the smallest gray value among the pixel points with gray values less than or equal to the grouping threshold of the e-th filtering window in the p-th preprocessed image ; Obtain the probability parameters of each filtering window according to the above method.
[0068] It should be noted that for the e-th filtering window in the p-th preprocessed image, and respectively represent the general magnitude of the gray values of the two groups of pixel points after pixel point grouping in the filtering window. The larger the value of , the greater the average difference in the gray values of these two groups of pixel points, indicating that the probability that this filtering window is located at the junction of adjacent echo levels is greater, because the gray value difference between the pixel points on both sides of the junction of adjacent echo levels is relatively obvious; To a certain extent, it reflects the numerical range of the gray values of the pixel points in the filtering window. If
[0069] is smaller, it means that the influence of noise on judging the general magnitude of the gray values of the pixel points by the average value is smaller, the authenticity of the obtained general magnitude of the gray values of the pixel points is higher, the distribution of the gray values of the pixel points is more concentrated, and it more conforms to the distribution law of the gray values of the pixel points at the junction of the echo levels. The probability that this filtering window is located at the junction of adjacent echo levels is greater. Therefore, the probability parameter of the e-th filtering window in the p-th preprocessed image is greater, and the probability that the e-th filtering window in the p-th preprocessed image is located at the junction of adjacent echo levels is greater.It should be further noted that the above steps obtain the probability parameters of each filtering window in each preprocessed image, which are used to judge the probability that each window is located at the junction of adjacent echo levels. Next, it is necessary to analyze the pixel points in the filtering window to judge the probability that each pixel point in the filtering window belongs to noise, and further eliminate the influence of noise. Since the image quality of a single endoscopic ultrasound image is unstable, and noise has randomness and volatility, the fluctuation range of the gray value of the pixel points of human tissues is relatively stable. By using multiple endoscopic ultrasound images at the same position, it is possible to more accurately judge whether a pixel point belongs to noise. If the probability that a certain pixel point belongs to noise is greater, then in the process of noise reduction using the weighted local mean filtering method, a lower weight should be assigned to this pixel point to achieve a better noise reduction effect; if the probability that a certain pixel point belongs to noise is smaller, then a higher weight should be assigned to retain the image details of the normal tissue and the lesion area.
[0070] Specifically, according to the fluctuation range of the pixel points in the filtering windows of the same sequence of each preprocessed image, the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image is obtained. The specific method is as follows:
[0071] ;
[0072] In the formula, represents the fluctuation coefficient of the r-th pixel point in the e-th filtering window of the p-th preprocessed image, n represents the number of endoscopic ultrasound images collected, represents the gray value of the r-th pixel point in the e-th filtering window of the i-th preprocessed image, represents the average gray value of the r-th pixel point in the e-th filtering window of each preprocessed image. According to the above method, the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image is obtained.
[0073] It should be noted that in this embodiment, the sliding path of the weighted local mean filtering window is a serpentine scanning path. In this embodiment, the sliding path of the weighted local mean filtering window is not specifically limited, but it is necessary to ensure that the sliding path of the weighted local mean filtering window remains consistent during the processing of each preprocessed image; the above steps judge the fluctuation of the gray values of the pixel points at the same position in different preprocessed pictures to determine whether the characteristics of the pixel points are more inclined to noise pixel points or more inclined to normal pixel points. If is larger, it means that the gray value change of the r-th pixel point in the e-th filtering window of each preprocessed picture is more obvious and more unstable, then the degree of influence of the pixel point by noise is higher, and a lower weight should be assigned to ensure a better noise reduction effect; if The smaller it is, the smoother and more stable the change in the gray value of the r-th pixel in the e-th filtering window of each preprocessed image is, and the lower the degree of influence of noise on the pixel at that location, and a higher weight should be assigned; that is, the larger the fluctuation coefficient, the higher the weight should be assigned to the pixel, and the smaller the fluctuation coefficient, the lower the weight should be assigned.
[0074] It should be further noted that the above method groups the pixels in each filtering window of each preprocessed image, obtains the probability parameter of each filtering window, and the fluctuation coefficient of each pixel in the filtering window. Now, it is necessary to combine the pixel grouping, the probability parameter of the filtering window, and the fluctuation coefficient of each pixel in the filtering window to obtain the weight of each pixel in the filtering window.
[0075] Specifically, according to the grouping of the pixels in each filtering window of each preprocessed image, the probability parameter of each filtering window in each preprocessed image, and the fluctuation coefficient of each pixel in each filtering window of each preprocessed image, obtain the weight of each pixel in each filtering window of each preprocessed image. The specific method is as follows:
[0076] First, determine whether the central pixel of the e-th filtering window in the p-th preprocessed image belongs to the first group of pixels or the second group of pixels in the filtering window;
[0077] If the central pixel of the e-th filtering window in the p-th preprocessed image belongs to the first group of pixels in the filtering window, then:
[0078] ;
[0079] If the central pixel of the e-th filtering window in the p-th preprocessed image belongs to the second group of pixels in the filtering window, then:
[0080] ;
[0081] In the formula, represents the weight of the r-th pixel in the e-th filtering window of the p-th preprocessed image, represents the probability parameter of the e-th filtering window in the p-th preprocessed image, represents the fluctuation coefficient of the r-th pixel in the e-th filtering window of the p-th preprocessed image, represents the gray value of the central pixel of the e-th filtering window of the p-th preprocessed image, represents the gray value of the r-th pixel in the e-th filtering window of the p-th preprocessed image; obtain the weight of each pixel in each filtering window of each preprocessed image according to the above method.
[0082] It should be noted that when the probability parameter of the e-th filtering window in the p-th preprocessed image is relatively high, it indicates that the probability of this window being located at the junction of adjacent echo levels is relatively high; if the central pixel belongs to the first group of pixels, it means that this pixel may belong to an echo level with a relatively low gray value. The final gray value of the central pixel after filtering should be close to the gray value distribution range of the pixels with a relatively low gray value. Therefore, a larger weight should be given to the pixels in the group with a relatively low gray value to obtain a clear edge;
[0083] When the probability parameter of the e-th filtering window in the p-th preprocessed image is relatively low, it indicates that the probability of this window being located at the junction of adjacent echo levels is relatively low, that is, the probability of this window being located in normal human tissue or a noise area is relatively high. At this time, the purpose of filtering is to reduce noise. Also, because the gray value distribution of pixels in normal human tissue or a noise area is irregular, in this case, the probability parameter of the fluctuating filtering window will not overly affect the gray gradient of the pixel gray values within the filtering window. Because in this case, the gray value difference between high-gray-value pixels and low-gray-value pixels is not large, combining with the fluctuation coefficient of the pixels reduces the weight of noise pixels, and the weighted local mean filtering algorithm is based on mean calculation, and it can also achieve a good noise reduction effect;
[0084] When the probability parameter of the e-th filtering window in the p-th preprocessed image is relatively high, it indicates that the probability of this window being located at the junction of adjacent echo levels is relatively high; if the central pixel belongs to the second group of pixels, it means that this pixel may belong to an echo level with a relatively high gray value. The final gray value of the central pixel after filtering should be close to the gray value distribution range of the pixels with a relatively high gray value. Therefore, a larger weight should be given to the pixels in the group with a relatively high gray value to obtain a clear edge;
[0085] When the probability parameter of the e-th filtering window in the p-th preprocessed image is relatively low, it indicates that the probability of this window being located at the junction of adjacent echo levels is relatively low, that is, the probability of this window being located in normal human tissue or a noise area is relatively high. At this time, the purpose of filtering is to reduce noise. Also, because the gray value distribution of pixels in normal human tissue or a noise area is irregular, in this case, the probability parameter of the fluctuating filtering window will not overly affect the gray gradient of the pixel gray values within the filtering window. Because in this case, the gray value difference between high-gray-value pixels and low-gray-value pixels is not large, combining with the fluctuation coefficient of the pixels reduces the weight of noise pixels, and the weighted local mean filtering algorithm is based on mean calculation, and it can also achieve a good noise reduction effect.
[0086] Step S003: Enhance each preprocessed image according to the weight of each pixel in each filtering window of each preprocessed image.
[0087] The above method obtains the weights of each pixel in each filtering window of each preprocessed image. Now, it is necessary to use the weights of each pixel in each filtering window and enhance each preprocessed image using the weighted local mean filtering method.
[0088] Specifically, according to the weights of each pixel in each filtering window of each preprocessed image, each preprocessed image is enhanced. The specific method is as follows:
[0089] ;
[0090] In the formula, represents the enhanced gray value of the r-th pixel in the e-th filtering window of the p-th preprocessed image, represents the weight of the K-th pixel in the e-th filtering window of the p-th preprocessed image, represents the gray value of the K-th pixel in the e-th filtering window of the p-th preprocessed image, represents the weight of the j-th pixel in the e-th filtering window of the p-th preprocessed image, M represents the number of pixels in the filtering window. According to the above method, the enhanced gray value of each pixel in each filtering window of each preprocessed image is obtained, and the enhancement of each preprocessed image is completed.
[0091] It should be noted that in this embodiment, the side length of the filtering window is 7. In this embodiment, the side length of the filtering window is not specifically limited, but it is necessary to ensure that the side lengths of each filtering window are the same during the implementation process; this method combines the relative probability of the filtering window located in adjacent echo levels and the degree of influence of each pixel by noise, and performs different weight ratios for high and low pixels in the filtering window. Under this weight ratio, when the features at the junction of adjacent echo levels are obvious, the junction is made clearer; when the features at the junction of adjacent echo levels are not obvious, the influence of noise on the image quality is reduced, and the reduction of the influence of noise on the image quality is judged based on multiple images at the same angular position, which can effectively avoid the disordered arrangement of pixel points in the lesion area being misclassified as noise pixel points and avoid over-smoothing of the lesion area.
[0092] Please refer to Figure 2 , which shows the structural block diagram of a second object of the present invention, an adaptive enhancement system for gastrointestinal endoscope images. The system includes the following modules:
[0093] An image acquisition module, which is used to acquire multiple endoscopic ultrasound images at the same position and angle, perform grayscale processing on the images, traverse the grayscale images in the order of acquisition of the endoscopic ultrasound images, and obtain each preprocessed image;
[0094] A weight calculation module, configured to obtain the grouping threshold of each filtering window in each preprocessed image according to the gray value distribution trend of the pixel points in each filtering window of each preprocessed image, and divide the pixel points in the filtering window into two groups; obtain the probability parameter of each filtering window in each preprocessed image according to the gray value distribution difference between the two groups of pixel points after grouping in each filtering window of each preprocessed image; obtain the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image according to the fluctuation amplitude of the pixel points in the filtering windows of the same sequence in each preprocessed image; and obtain the weight of each pixel point in each filtering window of each preprocessed image according to the grouping of the pixel points in each filtering window of each preprocessed image, the probability parameter of each filtering window in each preprocessed image, and the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image.
[0095] An image enhancement module, configured to enhance each preprocessed image according to the weight of each pixel point in each filtering window of each preprocessed image.
[0096] The third object of the embodiments of the present invention is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned method for adaptively enhancing a gastrointestinal endoscope image are implemented.
[0097] The fourth object of the embodiments of the present invention is to provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for adaptively enhancing a gastrointestinal endoscope image are implemented.
[0098] In this embodiment, multiple endoscopic ultrasound images at the same position and angle are collected and the images are grayscale processed. The grayscale images are traversed in the order of collecting the endoscopic ultrasound images to obtain each preprocessed image. Although the noise in the endoscopic ultrasound image is similar to the gray value distribution characteristics of the pixel points in the lesion area, the noise is random and accidental. Therefore, collecting multiple endoscopic ultrasound images at the same position and the same angle can, to a certain extent, distinguish the noise pixel points and the pixel points in the lesion area, which is convenient for weight distribution of the noise pixel points and the pixel points in the lesion area during the subsequent weighting process.
[0099] According to the gray value distribution trend of the pixel points within each filtering window in each preprocessed image, obtain the grouping threshold for each filtering window in each preprocessed image and divide the pixel points within the filtering window into two groups; in the endoscopic ultrasound image, the normal tissue of the digestive tract wall will show clear echo levels, and there are obvious differences in the pixel gray values between these levels. Divide the pixel points in the filtering window into the two categories with the largest difference, which is convenient for subsequently judging the relative probability that the filtering window is located at the junction of adjacent echo levels by judging the distribution differences and rules of the pixel gray values of the two categories of pixel points. Subsequently, different weighting modes are selected for the pixel points in the filtering window according to different probabilities;
[0100] According to the distribution differences of the gray values of the two groups of pixel points after grouping in each filtering window of each preprocessed image, obtain the probability parameter for each filtering window in each preprocessed image; judge the relative probability that the window is located at the junction of adjacent echo levels according to the characteristics of the two categories of pixel points with different groupings. When the relative probability is relatively high, the enhancement effect should focus on strengthening the junction information. When the relative probability is relatively low, the enhancement effect should focus on noise reduction;
[0101] According to the fluctuation amplitude of the pixel points in the filtering windows with the same sequence in each preprocessed image, obtain the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image; through the fluctuation conditions of the pixel points at the same position in different images, to a certain extent, noise pixel points can be screened out, avoiding the gray value distribution characteristics of the pixel points in the lesion area being too close to the gray value distribution characteristics of the noise pixel points, resulting in the over-smoothing of the noise area;
[0102] According to the grouping of the pixel points within each filtering window in each preprocessed image, and the probability parameter of each filtering window in each preprocessed image, and the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image, obtain the weight of each pixel point within each filtering window in each preprocessed image; combine the above-obtained parameters and grouping, judge which echo level the pixel point to be enhanced belongs to, and according to the pixel point grouping to which the pixel point to be enhanced belongs, make the characteristics of the pixel point to be enhanced after enhancement closer to the gray gradient characteristics of the pixel points in the pixel point grouping to which it belongs, and combine the fluctuation amplitude of the pixel point to reduce the weight of the noise pixel points, reducing the influence of the noise pixel points on the enhancement effect;
[0103] Enhance each preprocessed image according to the weights of each pixel point in each filtering window of each preprocessed image; perform different weight ratios on the high and low pixel points in the filtering window. Under this weight ratio, when the features at the junction of adjacent echo levels are obvious, the junction becomes clearer; when the features at the junction of adjacent echo levels are not obvious, the influence of noise on the image quality is reduced, and the reduction of the influence of noise on the image quality is judged based on multiple images at the same angular position, which can effectively avoid the disordered arrangement of pixel points in the lesion area being misclassified as noise pixel points and avoid over-smoothing of the lesion area.
[0104] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0105] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0106] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable device provide means for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1Steps of the functions specified in one or more boxes.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A method for adaptively enhancing a digestive tract endoscope image, characterized in that: The method comprises the following steps: Collect multiple endoscopic ultrasound images at the same position and angle and grayscale the images, traverse the grayscale images in the order of collecting endoscopic ultrasound images, and obtain each pre-processed image; According to the gray value distribution trend of the pixel points in each filter window in each preprocessed image, the grouping threshold of each filter window in each preprocessed image is obtained and the pixel points in the filter window are divided into two groups; according to the gray value distribution trend of the pixel points in each filter window in each preprocessed image, the grouping threshold of each filter window in each preprocessed image is obtained and the pixel points in the filter window are divided into two groups, including the specific method of: Set the dynamic threshold of the e-th filter window in the p-th preprocessed image. The dynamic threshold of the e-th filter window in the p-th preprocessed image is recorded as ,The range of dynamic threshold is 1~254, and the method of calculating the grouping coefficient of the filter window pixels is as follows: ; In the formula, represents the grouping coefficient of the e-th filter window in the p-th preprocessed image, Indicates that all gray values in the e-th filter window in the p-th preprocessed image are less than or equal to the dynamic threshold The gray value variance of the pixel point is Indicates that all gray values in the e-th filter window in the p-th preprocessed image are greater than the dynamic threshold The gray value variance of the pixel points; Calculate the grouping coefficient under different dynamic thresholds The size of the dynamic threshold corresponding to the maximum grouping coefficient As the grouping threshold of the pixels in the e-th filter window in the p-th preprocessed image, the grouping threshold is recorded as , all the pixels whose grayscale values in the e-th filter window in the p-th preprocessed image are less than or equal to the grouping threshold are the first group of pixels, and all the pixels whose grayscale values in the e-th filter window in the p-th preprocessed image are greater than the grouping threshold are the second group of pixels. According to the above method, the grouping threshold of each filter window in each preprocessed image is obtained and the pixels in each filter window are divided into two categories; according to the difference in the grayscale value distribution of the two groups of pixels in each filter window after grouping in each preprocessed image, the probability parameter of each filter window in each preprocessed image is obtained to determine the probability of each window being located at the junction of adjacent echo levels; according to the fluctuation amplitude of the pixels in the filter window of the same sequence of each preprocessed image , obtaining the fluctuation coefficient of each pixel in each filter window of each preprocessed image; obtaining the weight of each pixel in each filter window of each preprocessed image according to the grouping of pixels in each filter window of each preprocessed image, the probability parameter of each filter window of each preprocessed image, and the fluctuation coefficient of each pixel in each filter window of each preprocessed image; the specific method of obtaining the weight of each pixel in each filter window of each preprocessed image according to the grouping of pixels in each filter window of each preprocessed image, the probability parameter of each filter window of each preprocessed image, and the fluctuation coefficient of each pixel in each filter window of each preprocessed image is as follows: First, determine whether the central pixel of the e-th filter window in the p-th preprocessed image belongs to the first group of pixels in the filter window or the second group of pixels; If the central pixel of the e-th filter window in the p-th preprocessed image belongs to the first group of pixels in the filter window, then: ; If the central pixel of the e-th filter window in the p-th preprocessed image belongs to the second group of pixels in the filter window, then: ; In the formula, represents the weight of the rth pixel in the eth filter window in the pth preprocessed image, represents the probability parameter of the e-th filter window in the p-th preprocessed image, represents the fluctuation coefficient of the rth pixel in the eth filter window in the pth preprocessed image, Represents the grayscale value of the central pixel of the e-th filter window in the p-th preprocessed image, Represents the grayscale value of the rth pixel in the eth filter window in the pth preprocessed image; obtain the weight of each pixel in each filter window in each preprocessed image according to the above method; Each preprocessed image is enhanced according to the weight of each pixel in each filter window in each preprocessed image.
2. According to claim 1, a method for adaptive enhancement of digestive tract endoscope images, characterized in that: The method of acquiring multiple ultrasonic endoscopic images at the same position and angle and graying the images, traversing the grayscale images in the order of acquiring the ultrasonic endoscopic images, and obtaining each pre-processed image includes the following specific methods: While keeping the position and angle of the ultrasound probe consistent in the digestive tract, an ultrasound endoscopic image is collected every s seconds, and a total of n ultrasound endoscopic images are collected. The n collected ultrasound endoscopic images are gray-scaled to obtain n grayscale images. The n grayscale images are traversed in the order of corresponding ultrasound endoscopic image acquisition, and each grayscale image after traversal is recorded as a preprocessed image.
3. The method for adaptively enhancing digestive tract endoscope images according to claim 1, characterized in that: The specific method of obtaining the probability parameter of each filtering window in each preprocessed image according to the gray value distribution difference of two groups of pixels in each filtering window in each preprocessed image includes: ; In the formula, represents the probability parameter of the e-th filter window in the p-th preprocessed image, Indicates that in the e-th filter window of the p-th preprocessed image, all gray values are greater than the grouping threshold The mean gray value of the pixel points; Indicates that in the e-th filter window of the p-th preprocessed image, all gray values are less than or equal to the grouping threshold The mean gray value of the pixel points; Indicates that in the e-th filter window of the p-th preprocessed image, all gray values are greater than the grouping threshold The gray value of the pixel with the largest gray value among the pixels; Indicates the grouping threshold of all gray values in the e-th filter window in the p-th preprocessed image that are less than or equal to the e-th filter window The grayscale value of the pixel with the smallest grayscale value among the pixels; the probability parameter of each filtering window is obtained according to the above method.
4. The method for adaptively enhancing digestive tract endoscope images according to claim 1, characterized in that: The specific method of obtaining the fluctuation coefficient of each pixel point in each filtering window of each preprocessed image according to the fluctuation amplitude of the pixel points in the filtering window of the same sequence of each preprocessed image includes: ; In the formula, represents the fluctuation coefficient of the rth pixel point in the eth filtering window in the pth preprocessed image, n represents the number of collected endoscopic ultrasound images, represents the gray value of the rth pixel in the eth filter window in the i-th preprocessed image, Represents the mean gray value of the rth pixel in the eth filtering window in each preprocessed image, and obtains the fluctuation coefficient of each pixel in each filtering window of each preprocessed image according to the above method.
5. The method for adaptively enhancing digestive tract endoscope images according to claim 1, characterized in that: The method of obtaining the weight of each pixel in each filtering window in each preprocessed image according to the grouping of the pixel in each filtering window in each preprocessed image, the probability parameter of each filtering window in each preprocessed image, and the fluctuation coefficient of each pixel in each filtering window in each preprocessed image includes the following specific methods: First, determine whether the central pixel of the e-th filter window in the p-th preprocessed image belongs to the first group of pixels in the filter window or the second group of pixels; If the central pixel of the e-th filter window in the p-th preprocessed image belongs to the first group of pixels in the filter window, then: ; If the central pixel of the e-th filter window in the p-th preprocessed image belongs to the second group of pixels in the filter window, then: ; In the formula, represents the weight of the rth pixel in the eth filter window in the pth preprocessed image, represents the probability parameter of the e-th filter window in the p-th preprocessed image, represents the fluctuation coefficient of the rth pixel in the eth filter window in the pth preprocessed image, Represents the grayscale value of the central pixel of the e-th filter window in the p-th preprocessed image, Represents the grayscale value of the rth pixel in the eth filtering window in the pth preprocessed image; according to the above method, the weight of each pixel in each filtering window in each preprocessed image is obtained.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a method for adaptively enhancing a digestive tract endoscope image as described in any one of claims 1 to 5 are implemented.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for adaptively enhancing gastrointestinal endoscopic images as described in any one of claims 1 to 5 are implemented.
8. A digestive tract endoscope image adaptive enhancement system, characterized in that: The system includes the following modules: An image acquisition module is used to acquire multiple ultrasonic endoscopic images of the same position and angle and grayscale the images, traverse the grayscale images in the order of acquiring the ultrasonic endoscopic images, and acquire each pre-processed image; The weight calculation module is used to obtain the grouping threshold of each filter window in each preprocessed image and divide the pixels in the filter window into two groups according to the gray value distribution trend of the pixels in each filter window in each preprocessed image; the specific method of obtaining the grouping threshold of each filter window in each preprocessed image and dividing the pixels in the filter window into two groups according to the gray value distribution trend of the pixels in each filter window in each preprocessed image is as follows: Set the dynamic threshold of the e-th filter window in the p-th preprocessed image. The dynamic threshold of the e-th filter window in the p-th preprocessed image is recorded as ,The range of dynamic threshold is 1~254, and the method of calculating the grouping coefficient of the filter window pixels is as follows: ; In the formula, represents the grouping coefficient of the e-th filter window in the p-th preprocessed image, Indicates that all gray values in the e-th filter window in the p-th preprocessed image are less than or equal to the dynamic threshold The gray value variance of the pixel point is Indicates that all gray values in the e-th filter window in the p-th preprocessed image are greater than the dynamic threshold The gray value variance of the pixel points; Calculate the grouping coefficient under different dynamic thresholds The size of the dynamic threshold corresponding to the maximum grouping coefficient As the grouping threshold of the pixels in the e-th filter window in the p-th preprocessed image, the grouping threshold is recorded as , all pixels in the e-th filter window in the p-th preprocessed image whose grayscale values are less than or equal to the grouping threshold are the first group of pixels, and all pixels in the e-th filter window in the p-th preprocessed image whose grayscale values are greater than the grouping threshold are the second group of pixels. According to the above method, the grouping threshold of each filter window in each preprocessed image is obtained and the pixels in each filter window are divided into two categories; according to the grayscale value distribution difference of the two groups of pixel points in each filter window after grouping in each preprocessed image, the probability parameter of each filter window in each preprocessed image is obtained to determine the probability of each window being located at the junction of adjacent echo levels; according to the fluctuation amplitude of the pixel points in the filter window of the same sequence of each preprocessed image, the fluctuation coefficient of each pixel point in each filter window of each preprocessed image is obtained; according to the grouping of the pixel points in each filter window in each preprocessed image, the probability parameter of each filter window in each preprocessed image, and the fluctuation coefficient of each pixel point in each filter window of each preprocessed image, the weight of each pixel point in each filter window in each preprocessed image is obtained; The method of obtaining the weight of each pixel in each filtering window in each preprocessed image according to the grouping of the pixel in each filtering window in each preprocessed image, the probability parameter of each filtering window in each preprocessed image, and the fluctuation coefficient of each pixel in each filtering window in each preprocessed image includes the following specific methods: First, determine whether the central pixel of the e-th filter window in the p-th preprocessed image belongs to the first group of pixels in the filter window or the second group of pixels; If the central pixel of the e-th filter window in the p-th preprocessed image belongs to the first group of pixels in the filter window, then: ; If the central pixel of the e-th filter window in the p-th preprocessed image belongs to the second group of pixels in the filter window, then: ; In the formula, represents the weight of the rth pixel in the eth filter window in the pth preprocessed image, represents the probability parameter of the e-th filter window in the p-th preprocessed image, represents the fluctuation coefficient of the rth pixel in the eth filter window in the pth preprocessed image, Represents the grayscale value of the central pixel of the e-th filter window in the p-th preprocessed image, Represents the grayscale value of the rth pixel in the eth filter window in the pth preprocessed image; obtain the weight of each pixel in each filter window in each preprocessed image according to the above method; The image enhancement module is used to enhance each preprocessed image according to the weight of each pixel in each filter window in each preprocessed image.
Citation Information
Patent Citations
Tumor image enhancement method
CN117853386A
Anesthesia puncture positioning method and system based on visual assistance
CN118680646A