Segmentation method based on hepatic duct image

In the B-ultrasound image processing of hepatobiliary duct, the filter window size is dynamically determined using the connectivity domain division and the filter window bidirectional prediction model, and the filter value is calculated based on the value factor and negative index, the problem of inappropriate filter window size selection in the prior art is solved, and the noise removal effect and accuracy of hepatobiliary duct stone segmentation are improved.

CN119942121AActive Publication Date: 2025-05-06TONGJI HOSPITAL ATTACHED TO TONGJI MEDICAL COLLEGE HUAZHONG SCI TECH
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510086283.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-06
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

In the prior art, in the B-ultrasound image denoising processing of hepatic bile duct, the inappropriate filter window size selection leads to unsatisfactory denoising effect, which reduces the accuracy of hepatic bile duct stone segmentation.

Method used

Through the gray-scale domain division mechanism based on the connected domain, the image to be processed is divided into several sub-images, and the filter window size interval is dynamically determined using the filter window bidirectional prediction model, and the filter value is calculated based on the value factor and the negative index to improve the adaptability and accuracy of the filter processing.

Benefits of technology

It improves the adaptability and accuracy of hepatobiliary duct image denoising processing, retains image details, improves the efficiency of image processing, and enhances the accuracy of hepatobiliary duct stone segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119942121A_ABST
    Figure CN119942121A_ABST
Patent Text Reader

Abstract

The invention relates to a segmentation method based on a hepatic duct image, and the method comprises the steps: dividing a to-be-processed image into a plurality of sub-images through a gray domain division mechanism, and distributing a corresponding filtering window size interval for each sub-image; on the basis of each subimage of the image to be processed, traversing each numerical value of the filtering window size interval of the subimage, establishing a filtering window by taking any pixel point as a center, and obtaining a value factor of the pixel point; performing filtering processing on the sub-image by using a filtering window to obtain a target image, and obtaining a filtering value of the filtering window for the sub-image; and selecting the sub-image with the maximum filtering value as the optimal filtering window of the sub-image, performing filtering processing on the sub-image by the optimal filtering window, generating a target hepatic duct image of the to-be-processed image, and inputting the target hepatic duct image into the image segmentation model to perform hepatic duct identification. Therefore, the filtering window size range is predicted differentially, the adaptability and accuracy of image filtering processing are enhanced, and the efficiency of image processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to a segmentation method based on hepatobiliary images. Background Art

[0002] Hepatobiliary stones refer to hard stones formed in the hepatobiliary system. Hard stones can block the normal flow of bile, leading to bile stasis and a series of symptoms and complications. At present, B-ultrasound is often used to detect hepatobiliary stones. However, due to the relatively low resolution of ultrasound used in B-ultrasound, it may be limited in the detection of deep tissues or small stones. Small or closely arranged stones may be difficult to display clearly, making B-ultrasound images more susceptible to noise, which is not conducive to the segmentation of stone areas. Therefore, it is necessary to denoise B-ultrasound images. At present, Gaussian filtering is often used to denoise B-ultrasound images, thereby removing noise and facilitating the subsequent segmentation of hepatobiliary stones. However, when using Gaussian filtering to denoise B-ultrasound images, the larger the filter window of the Gaussian filter, the better the denoising effect, but it may cause the edges of the hepatobiliary stones in the image to become blurred; the smaller the filter window of the Gaussian filter, the more complete the structure of the hepatobiliary stones in the B-ultrasound image, but the denoising effect is poor. When the size of the filter window of the Gaussian filter is not selected appropriately, the noise reduction effect of the B-ultrasound image will be unsatisfactory, and the accuracy of the segmentation of hepatobiliary stones will be reduced.

[0003] The patent document with patent application number 202410772853.0 discloses a method for segmenting images of the bile duct and bile stones. It traverses all values ​​within the window size range to obtain all reference pixel sets for each pixel in the bile duct B-ultrasound image. According to the grayscale value, degree of confusion and confusion credibility of each pixel in the bile duct B-ultrasound image, as well as the grayscale value of each pixel in the initial filtered image, the optimal filtering window size is comprehensively and globally screened, thereby further improving the enhancement effect of the bile duct B-ultrasound image.

[0004] However, in hepatobiliary B-ultrasound images and gallstone images, due to the complexity of the tissue and the diversity of lesions, the images often show non-uniformity and anisotropy, especially in the gallstone area. Due to the large difference in grayscale values ​​between stones and surrounding tissues, as well as the uncertainty of stone shape, size and position, the use of a unified filter window for Gaussian filtering denoising may result in poor local denoising effect.

[0005] Specifically, if the global optimal filter window size is used for sliding traversal denoising, this window size may be selected based on the evaluation value of the overall image, and therefore may not be well adapted to the particularity of the local image. For example, at the edge of gallstones or in the area of ​​small stones, a larger filter window may blur the edge of the stone, causing the stone shape to be distorted; while a smaller filter window may not be able to effectively remove the surrounding noise. In addition, traversing all values ​​within the uniformly preset window size range virtually increases the computational complexity and resources of image processing, lacks pertinence, and reduces the efficiency of image processing. Summary of the invention

[0006] In view of the technical problems existing in the prior art, the present invention provides a segmentation method based on hepatobiliary images, which differentially predicts the size range of the filtering window, enhances the adaptability and accuracy of image filtering processing, and improves the efficiency of image processing.

[0007] The technical solution of the present invention to solve the above technical problem is as follows: a segmentation method based on hepatobiliary images, comprising: S101, obtaining at least one hepatobiliary image obtained by continuous scanning within a preset time window and generating a hepatobiliary image sequence; S102, taking any one of the hepatobiliary duct images in the hepatobiliary duct image sequence as the image to be processed, dividing the image to be processed into a plurality of sub-images using a preset grayscale domain division mechanism, uniquely numbering them according to their positions in the image to be processed, and assigning a corresponding filter window size interval to each sub-image; S103, based on each sub-image of the image to be processed, traverse each value of the filter window size interval, establish a filter window with any pixel point as the center, and obtain the value factor of the pixel point; S104, using the filtering window to filter the sub-image to obtain a target image, and based on the value factor of each pixel in the sub-image and the grayscale value of the pixel at the same position in the corresponding target image, obtain the filtering value of the filtering window for the sub-image; S105, counting the filtering value of each value of the filtering window in the filtering window size interval corresponding to each sub-image in the image to be processed, selecting the largest filtering value as the optimal filtering window of the sub-image, and filtering each sub-image using the optimal filtering window to generate a target hepatobiliary image of the image to be processed; S106, inputting the target hepatobiliary image into the image segmentation model to identify the hepatobiliary. Preferably, the preset grayscale domain division mechanism includes: S201, performing connected domain analysis on the image to be processed, obtaining all connected domains, and recording the grayscale value of each connected domain; S202, based on each connected domain, calculating the average coordinates of all pixels therein as its centroid, and calculating the Euclidean distance value, grayscale difference value, and connected domain area value between the centroids of any two connected domains, to obtain the normalized trend value of any two connected domains; S203, according to the normalized trend values ​​between the connected domains, the connected domains whose normalized trend values ​​are less than a preset trend threshold are divided into a cluster to obtain a plurality of clusters, each cluster including at least one connected domain; S204, based on the connected domain in each cluster, obtain its maximum bounding rectangle, and based on the distribution of all the maximum bounding rectangles in the image to be processed, divide the image to be processed into a plurality of sub-images.

[0008] Preferably, in S202, the normalized trend value is calculated according to the following formula:

[0009]

[0010] in, The normalized trend value between the i-th connected domain and the j-th connected domain, is the proximity factor of two connected domains, is the Euclidean distance between the centroids of two connected domains, is the area value of the i-th connected domain, is the area value of the jth connected domain, is the gray value of the i-th connected domain, is the gray value of the jth connected domain, and They are the influence weights of the proximity factor and grayscale difference value on the normalized trend value.

[0011] Preferably, the step of allocating a corresponding filter window size interval to each sub-image specifically includes: S301, based on each sub-image, extracting its grayscale feature vector, the grayscale feature vector is composed of grayscale change degree and pixel information richness; S302, inputting the grayscale feature vector of the sub-image into a pre-trained filtering window bidirectional prediction model, and outputting the filtering window size interval of the sub-image.

[0012] Preferably, the pre-trained filter window bidirectional prediction model includes a filter window forward prediction model, a filter window reverse prediction model, and a bidirectional linkage decision module; The filtering window bidirectional prediction model is used to input the received grayscale feature vector into the filtering window forward prediction model and the filtering window reverse prediction model respectively; The filter window forward prediction model is used to output a forward prediction result according to the input grayscale feature vector and transmit it to the bidirectional linkage decision module; The filter window reverse prediction model is used to output a reverse prediction result according to the input grayscale feature vector and transmit it to the bidirectional linkage decision module; The bidirectional linkage decision module is used to output the filter window size interval of the sub-image according to the received forward prediction result and the reverse prediction result; The forward prediction result includes an ideal filtering window size, and the reverse prediction result includes a reverse filtering window size and a reverse size interval.

[0013] Preferably, the method for acquiring the filter window reverse prediction model includes: B1. Collect a large number of hepatobiliary images with non-ideal filtering results and their grayscale feature vectors before filtering, and the actual filtering window size used, and perform cluster analysis on the collected hepatobiliary images using a clustering algorithm based on the grayscale feature vectors to obtain a number of clusters, each of which includes at least one hepatobiliary image, and each cluster corresponds to a cluster center; B2. Based on each cluster, generating at least one reverse size interval according to the continuous clustering range of the filter window size actually used by all the hepatobiliary images therein; B3, taking the grayscale feature vector corresponding to each hepatobiliary image with non-ideal filtering results collected as training data, and labeling each training data, wherein the labeling content is set to: the actual filter window size used, and the inverse size interval corresponding to the cluster to which it belongs; B4. Use the labeled training data to train the pre-selected neural network model structure, continuously optimize the model parameters, and obtain the final filter window reverse prediction model.

[0014] Preferably, the two-way linkage decision module is specifically used for: C1. Based on the reverse filtering window size and the reverse size interval, the reverse confidence is obtained; wherein the reverse confidence is obtained as follows: , h is the reverse confidence, L is the difference between the reverse filter window size and the center point of the reverse size interval; C2. Based on the positional relationship between the ideal filter window size and the reverse size interval and the reverse confidence, the target length is expanded in the left and right directions with the ideal filter window size as the reference center to obtain the final filter window size interval.

[0015] Preferably, in S103, establishing a filtering window with any pixel as the center to obtain the value factor of the pixel specifically includes: Based on each sub-image of the image to be processed, traverse each value of its filter window size interval, establish a filter window with any pixel point as the center, and obtain the grayscale feature vector of the pixel point in the filter window; Based on the unique number of each sub-image, all sub-images having the same unique number as the sub-image are determined in other hepatobiliary duct images in the hepatobiliary duct image sequence to form a comparison sequence, wherein the comparison sequence includes at least one comparison sub-image; According to the matching degree of the gray feature vector between each pixel in each sub-image and the pixel at the same position in the comparison sub-image in the comparison sequence, the value factor of each pixel in each sub-image is obtained.

[0016] Preferably, in S104, the filtering value of the filtering window for the sub-image is calculated according to the following formula:

[0017] Among them, Q is the filtering value of the filter window for the sub-image, N is the total number of pixels in the sub-image, is the gray value of the i-th pixel in the sub-image, is the gray value of the i-th pixel in the target image corresponding to the sub-image, is the value factor of the i-th pixel in the sub-image.

[0018] Preferably, after S104, the method further includes: S401, based on the target image corresponding to the sub-image, performing a connected domain analysis on it to obtain all target connected domains in the target image; S402, obtaining the maximum area value in the target connected domain as the second area value, and the maximum area value in all connected domains of the sub-image as the first area value, and calculating the negative index of the filter window according to the following formula:

[0019] in, is the negative index of the filter window, S1 is the first area value, and S2 is the second area value; S403, multiplying the negative index by the filter value determined in S104 to obtain a new filter value to replace the original filter value, and executing step S105.

[0020] The beneficial effects of the present invention are: By introducing a grayscale domain division mechanism based on connected domains, the image to be processed is divided into several sub-images, which can perform more detailed feature analysis based on the characteristics of different regions and improve the adaptability and accuracy of filtering; using a filter window bidirectional prediction model, the forward and reverse prediction results are comprehensively considered to determine the filter window size range, which can more accurately predict the appropriate filter window size and improve the denoising effect, while retaining image details and improving the efficiency of image processing; by comparing the grayscale feature vector matching of pixel points in the sequence to calculate the value factor, and combining the grayscale value difference to calculate the filtering value, using time series information to improve the accuracy of the filtering value and make the filtering process more targeted; introducing a negative index to measure the negative impact of filtering on the image structure and avoid the destruction of important texture information by filtering. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 The figure is a flow chart of a segmentation method based on hepatobiliary images according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0023] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0024] In the description of the present application, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details to obscure the description of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0025] Figure 1 It is a flow chart of a segmentation method based on hepatobiliary images according to an embodiment of the present invention.

[0026] like Figure 1 As shown, a segmentation method based on a hepatobiliary image comprises the following steps: S101, obtaining at least one hepatobiliary image obtained by continuous scanning within a preset time window and generating a hepatobiliary image sequence, each hepatobiliary image corresponding to a scanning time node.

[0027] In medical examinations, B-ultrasound equipment is usually used to perform continuous scanning of the hepatobiliary ducts to obtain hepatobiliary duct images at different time points. These images are arranged in chronological order to form a hepatobiliary duct image sequence. The preset time window is a specified time period used to determine the range of images that need to be processed.

[0028] For example, if one image is acquired per second and the preset time window is 10 seconds, a sequence containing 10 images is generated.

[0029] S102, taking any one of the hepatobiliary images in the hepatobiliary image sequence as the image to be processed, dividing the image to be processed into a plurality of sub-images using a preset grayscale domain division mechanism, uniquely numbering them according to their positions in the image to be processed (which may be composed of central pixel positions and edge key pixel positions, which is not limited in the present invention), and assigning a corresponding filter window size interval to each sub-image.

[0030] In some embodiments, the pre-set grayscale domain division mechanism includes: S201, performing connected domain analysis on the image to be processed, obtaining all connected domains, and recording the grayscale value of each connected domain.

[0031] Since the hepatobiliary duct and other tissue structures, noise, etc. are more obviously reflected in the grayscale image as connected domains in the hepatobiliary image, the grayscale division mechanism based on the connected domain can perform reasonable image division in special image types, which has great processing advantages in the subsequent block filtering process.

[0032] S202, based on each connected domain, the average coordinates of all pixels therein are calculated as its centroid, and the Euclidean distance value, grayscale difference value, and connected domain area value between the centroids of each two connected domains are calculated, and the normalized trend value of any two connected domains is calculated according to the following formula:

[0033]

[0034] in, The normalized trend value between the i-th connected domain and the j-th connected domain, is the proximity factor of two connected domains, is the Euclidean distance between the centroids of two connected domains, is the area value of the i-th connected domain, is the area value of the jth connected domain, is the gray value of the i-th connected domain, is the gray value of the jth connected domain, and are the weights of the influence of the proximity factor and grayscale difference value on the normalized trend value, which are set according to the actual situation and expert experience. and The sum of is 1, and Greater than ,For example, =0.8, =0.2, because when two connected domains are normalized, the relative position information is more important. Only adjacent or close connected domains can be reasonably classified into one sub-image. In order to avoid the situation where the grayscale values ​​of two connected domains are small but distributed far apart in the image to be processed and normalized, Set the value to be greater than The value of , under the premise of close distance, merges the connected domains with smaller grayscale difference values ​​into one sub-image.

[0035] S203 , according to the normalized trend values ​​between the connected domains, the connected domains whose normalized trend values ​​are less than a preset trend threshold are divided into a cluster to obtain a plurality of clusters, each cluster including at least one connected domain.

[0036] The preset trend threshold is set according to actual conditions and expert experience, for example, to 0.3.

[0037] S204, based on the connected domain in each cluster, obtain its maximum bounding rectangle, and based on the distribution of all the maximum bounding rectangles in the image to be processed, divide the image to be processed into a plurality of sub-images.

[0038] Specifically, for all maximum bounding rectangles, when two maximum bounding rectangles intersect, the average grayscale value in the intersection and the average grayscale value in the area of ​​the two maximum bounding rectangles excluding the intersection are calculated, and the intersection is assigned to the maximum bounding rectangle that is closer to its average value. It should be noted that the number of sub-images is greater than or equal to the total number of maximum bounding rectangles, because in addition to the area of ​​the maximum bounding rectangle corresponding to all clusters, there may be other areas in the image to be processed, and the boundary smoothing process can be evenly divided, which is not elaborated in the present invention.

[0039] Therefore, the hepatobiliary image is divided into several sub-images through connected domain analysis. Compared with the global analysis of the entire hepatobiliary image, this image content-based segmentation method can better adapt to the complexity of the hepatobiliary structure, more accurately reflect the distribution of the hepatobiliary structure, and reduce the artifacts and distortion caused by cross-structure filtering. The calculation of the normalized trend value takes into account the position, grayscale and area information between the connected domains, ensuring that adjacent and similar connected domains are divided into the same sub-image, providing more uniform and consistent image blocks for subsequent filtering processing.

[0040] In some embodiments, a corresponding filter window size interval is allocated to each sub-image, specifically including: S301, based on each sub-image, extract its grayscale feature vector, the grayscale feature vector is composed of grayscale variation degree and pixel information richness. Grayscale variation degree reflects the fluctuation of grayscale value in the sub-image, and pixel information richness reflects the diversity of grayscale levels.

[0041] Specifically, the grayscale change degree is calculated according to the following formula:

[0042] Among them, V is the grayscale change degree, N is the number of pixels in the sub-image, is the gray value of the i-th pixel, is the mean grayscale value of all pixels in the sub-image.

[0043] Specifically, the pixel information richness is calculated according to the following formula:

[0044] Among them, E is the richness of pixel information, K is the number of gray levels in the sub-image, is the probability that gray level k appears in the sub-image.

[0045] S302, inputting the grayscale feature vector of the sub-image into a pre-trained filtering window bidirectional prediction model, and outputting the filtering window size interval of the sub-image.

[0046] Specifically, the pre-trained filter window bidirectional prediction model includes a filter window forward prediction model, a filter window reverse prediction model, and a bidirectional linkage decision module; the filter window bidirectional prediction model is used to input the received grayscale feature vector into the filter window forward prediction model and the filter window reverse prediction model respectively; the filter window forward prediction model is used to output the forward prediction result according to the input grayscale feature vector and transmit it to the bidirectional linkage decision module; the filter window reverse prediction model is used to output the reverse prediction result according to the input grayscale feature vector and transmit it to the bidirectional linkage decision module; the bidirectional linkage decision module is used to output the filter window size range of the sub-image according to the received forward prediction result and reverse prediction result.

[0047] The forward prediction result includes an ideal filter window size, and the reverse prediction result includes a reverse filter window size and a reverse size interval.

[0048] Specifically, the filtering window forward prediction model is obtained by: A1. Collect a large number of ideal hepatobiliary images and their grayscale feature vectors before filtering, and label each grayscale feature vector. The label content is set as: the actual filter window size used; A2. Use the labeled grayscale feature vector as a training data set, use the training data set to train the pre-selected neural network model structure, continuously optimize the model parameters, and obtain the final filter window forward prediction model.

[0049] The method of obtaining the filter window reverse prediction model includes: B1. Collect a large number of hepatobiliary images with non-ideal filtering results and their grayscale feature vectors before filtering, and the actual filtering window size used, and perform cluster analysis on the collected hepatobiliary images using a clustering algorithm (such as K-means, DBSCAN, etc.) based on the grayscale feature vectors to obtain several clusters, each of which includes at least one hepatobiliary image, and each cluster corresponds to a cluster center (average grayscale feature vector); B2. Based on each cluster, according to the continuous clustering range of the filter window sizes actually used by all the hepatobiliary images therein, generate at least one reverse size interval to reflect the possible variation range of the image filter window size in the cluster; The continuous clustering range specifically means that in each cluster obtained after cluster analysis, the filter window sizes actually used by all hepatobiliary images tend to be continuously and densely distributed in one or several size intervals. For example, in a cluster, there are 10 hepatobiliary images, and the corresponding filter window sizes actually used are: 3, 4, 4, 5, 8, 9, 7, 7, 8, 9, which are mainly distributed in two intervals: [3, 5] and [7, 9]. Therefore, the inverse size interval of the cluster is [3, 5]∪[7, 9].

[0050] B3, taking the grayscale feature vector corresponding to each hepatobiliary image with non-ideal filtering results collected as training data, and labeling each training data, wherein the labeling content is set to: the actual filter window size used, and the inverse size interval corresponding to the cluster to which it belongs; B4. Use the labeled training data to train the pre-selected neural network model structure, continuously optimize the model parameters, and obtain the final filter window reverse prediction model.

[0051] Among them, the two-way linkage decision-making module is specifically used for: C1. Based on the reverse filtering window size and the reverse size interval, the reverse confidence is obtained. The reverse confidence is obtained as follows: , where h is the reverse confidence and L is the difference between the reverse filter window size and the center point of the reverse size interval.

[0052] C2. Based on the positional relationship between the ideal filter window size and the reverse size interval and the reverse confidence, the target length is expanded in the left and right directions with the ideal filter window size as the reference center to obtain the final filter window size interval.

[0053] Specifically, the target length is determined as follows: Based on the reverse confidence of the reverse size interval, the expansion amplitude factor is obtained by subtracting the reverse confidence from 1; an expansion reference length is pre-set. If the ideal filter window size is located on the right side of the center point of the reverse size interval, the expansion reference length on the left side of the reference center is multiplied by the expansion amplitude factor of the reverse size interval to obtain the expansion target length of the reference center in this direction; similarly, the expansion target length on the right side of the reference center can be determined. Among them, the pre-set expansion reference length is set according to the actual situation and expert experience, so that the reference center is appropriately expanded to the left and right sides by a certain length to avoid the interval range being too large.

[0054] Therefore, a fixed and unified filter window size may not be able to adapt to all image contents, resulting in poor filtering effect. In order to adapt to most image features, the range must be large, which is easy to cause waste of computing resources and reduce image processing efficiency. Therefore, the grayscale change degree and the richness of pixel information are used as grayscale feature vectors, and the filter window bidirectional prediction model is used to dynamically determine the filter window size. This filter window selection method based on image features can significantly improve the accuracy and efficiency of filtering, especially when processing complex and changeable hepatobiliary images; through the grayscale feature vector extraction of sub-images and the filter window bidirectional prediction model, the filter window size interval is dynamically allocated to each sub-image. This adaptability can predict the most suitable filtering parameters according to different image contents and improve the filtering effect; the bidirectional linkage decision module combines the results of forward prediction and reverse prediction, and dynamically adjusts the filter window size interval extended based on the predicted ideal filter window size through reverse confidence and expansion amplitude factor, which can improve the robustness and adaptability of the algorithm while ensuring the filtering effect.

[0055] S103, based on each sub-image of the image to be processed, traverse each value of its filter window size interval, establish a filter window with any pixel point as the center, and obtain the value factor of the pixel point.

[0056] Specifically, step S103 includes: Based on each sub-image of the image to be processed, traverse each value of its filter window size interval, establish a filter window with any pixel point as the center, and obtain the grayscale feature vector of the pixel point in the filter window; Based on the unique number of each sub-image, all sub-images having the same unique number as the sub-image are determined in other hepatobiliary images in the hepatobiliary image sequence to form a comparison sequence, that is, each sub-image in the image to be processed corresponds to a comparison sequence, and the comparison sequence includes at least one comparison sub-image; According to the matching degree (Euclidean distance) of the gray feature vector between each pixel in each sub-image and the pixel at the same position in the comparison sub-image in the comparison sequence, the value factor of each pixel in each sub-image is obtained. The higher the matching degree, the greater the value factor.

[0057] Among them, the average is taken based on the matching degree of the grayscale feature vector between each pixel point and the pixel point at the same position of each comparison sub-image in the comparison sequence, or a different weight value is assigned to each comparison sub-image according to the difference between the scanning time node of the comparison sub-image and the scanning time node of the sub-image. The smaller the difference, the greater the weight value. According to the corresponding weight value, all matching values ​​are weighted and summed to obtain the final value factor.

[0058] S104, filtering the sub-image using the filtering window to obtain the target image, based on the value factor of each pixel in the sub-image and the grayscale value of the pixel at the same position in the corresponding target image, the filtering value of the filtering window for the sub-image is calculated according to the following formula:

[0059] Among them, Q is the filtering value of the filter window for the sub-image, N is the total number of pixels in the sub-image, is the gray value of the i-th pixel in the sub-image, is the gray value of the i-th pixel in the target image corresponding to the sub-image, is the value factor of the i-th pixel in the sub-image.

[0060] S105, counting the filtering value of each value of the filtering window in the filtering window size interval corresponding to each sub-image in the image to be processed, selecting the one with the largest filtering value as the optimal filtering window for the sub-image, filtering each sub-image separately using its optimal filtering window, and splicing them according to their unique numbers to obtain a processed hepatobiliary image as the target hepatobiliary image.

[0061] S106, inputting the target hepatobiliary image into an image segmentation model to identify the hepatobiliary region. The image segmentation model may be based on deep learning technology, such as convolutional neural network (CNN) or fully convolutional network (FCN), etc., which will not be elaborated in the present invention.

[0062] Therefore, traditional methods usually use a fixed filter window size, while this embodiment dynamically selects the optimal filter window according to the content of the sub-image, thereby improving the adaptability and accuracy of the filter; by using other images in the image sequence for comparison, the accuracy of pixel matching is improved, thereby improving the reliability of the value factor, and introducing the value factor of the pixel points in the sub-image, more reasonably evaluating the influence of each pixel point on the filtering effect, further improving the accuracy of the filtering evaluation.

[0063] However, in step S104, the filtering value of the filtering window for the sub-image is calculated based on the value factor and grayscale value difference value of each pixel in the sub-image and its target image. Although the degree of change in the grayscale value after filtering can reflect the effect of Gaussian filtering to a certain extent, it may also affect certain special structural tissues while denoising. For example, blurred boundaries and grayscale value merging may cause a certain range to become larger, making the filtering process counterproductive and causing some important texture information to disappear. Therefore, in order to avoid negative impacts on the image segmentation and bile duct area identification in step S106, the calculation method of the filtering value in step S104 is further improved.

[0064] In some embodiments, after step S104, the method further includes: S401, based on the target image corresponding to the sub-image, a connected domain analysis is performed on it to obtain all target connected domains in the target image.

[0065] S402, obtaining the maximum area value in the target connected domain as the second area value, and the maximum area value in all connected domains of the sub-image as the first area value, and calculating the negative index of the filter window according to the following formula:

[0066] in, is the negative index of the filter window, S1 is the first area value, and S2 is the second area value.

[0067] S403, multiply the negative index by the filter value determined in step S104 to obtain a new filter value to replace the original filter value, and execute step S105.

[0068] Therefore, traditional methods usually only consider the change in grayscale value after filtering to evaluate the filtering effect, while this embodiment introduces a negative index to more comprehensively evaluate the negative impact of filtering on the image structure, and dynamically adjusts the filtering value of different filtering window sizes through the negative index, so that the final filtering window retains more important texture information, improves the accuracy of image segmentation, and thus facilitates subsequent image analysis and processing tasks; after calculating the filtering value, the negative index is introduced to measure the negative impact of filtering on the image structure, avoid the destruction of important texture information by filtering, and improve the accuracy of image segmentation.

[0069] In summary, the grayscale domain division mechanism based on connected domain is introduced to divide the image to be processed into several sub-images, which can perform more detailed feature analysis according to the characteristics of different regions and improve the adaptability and accuracy of filtering; the bidirectional prediction model of the filter window is used to comprehensively consider the forward and reverse prediction results to determine the filter window size interval, which can more accurately predict the suitable filter window size and improve the denoising effect, while retaining image details and improving the efficiency of image processing; the value factor is calculated by comparing the grayscale feature vector matching of the pixel points in the sequence, and the filtering value is calculated in combination with the grayscale value difference, and the time series information is used to improve the accuracy of the filtering value and make the filtering process more targeted; the negative index is introduced to measure the negative impact of the filtering process on the image structure and avoid the destruction of important texture information by the filtering process.

[0070] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may 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.

[0071] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0072] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0074] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0075] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A segmentation method based on hepatobiliary images, characterized in that: include: S101, obtaining at least one hepatobiliary image obtained by continuous scanning within a preset time window and generating a hepatobiliary image sequence; S102, taking any one of the hepatobiliary duct images in the hepatobiliary duct image sequence as the image to be processed, dividing the image to be processed into a plurality of sub-images using a preset grayscale domain division mechanism, uniquely numbering them according to their positions in the image to be processed, and assigning a corresponding filter window size interval to each sub-image; S103, based on each sub-image of the image to be processed, traverse each value of the filter window size interval, establish a filter window with any pixel point as the center, and obtain the value factor of the pixel point; S104, using the filtering window to filter the sub-image to obtain a target image, and based on the value factor of each pixel in the sub-image and the grayscale value of the pixel at the same position in the corresponding target image, obtain the filtering value of the filtering window for the sub-image; S105, counting the filtering value of each value of the filtering window in the filtering window size interval corresponding to each sub-image in the image to be processed, selecting the largest filtering value as the optimal filtering window of the sub-image, and filtering each sub-image using the optimal filtering window to generate a target hepatobiliary image of the image to be processed; S106, inputting the target hepatobiliary image into the image segmentation model to identify the hepatobiliary.

2. The method for segmenting the hepatobiliary image according to claim 1, characterized in that: The preset grayscale domain division mechanism includes: S201, performing connected domain analysis on the image to be processed, obtaining all connected domains, and recording the grayscale value of each connected domain; S202, based on each connected domain, calculating the average coordinates of all pixels therein as its centroid, and calculating the Euclidean distance value, grayscale difference value, and connected domain area value between the centroids of any two connected domains, to obtain the normalized trend value of any two connected domains; S203, according to the normalized trend values ​​between the connected domains, the connected domains whose normalized trend values ​​are less than a preset trend threshold are divided into a cluster to obtain a plurality of clusters, each cluster including at least one connected domain; S204, based on the connected domain in each cluster, obtain its maximum bounding rectangle, and based on the distribution of all the maximum bounding rectangles in the image to be processed, divide the image to be processed into a plurality of sub-images.

3. The method for segmenting the hepatobiliary image according to claim 2, characterized in that: In S202, the normalized trend value is calculated according to the following formula: in, The normalized trend value between the i-th connected domain and the j-th connected domain, is the proximity factor of two connected domains, is the Euclidean distance between the centroids of two connected domains, is the area value of the i-th connected domain, is the area value of the jth connected domain, is the gray value of the i-th connected domain, is the gray value of the jth connected domain, and They are the influence weights of the proximity factor and grayscale difference value on the normalized trend value.

4. The method for segmenting the hepatobiliary image according to claim 1, characterized in that: The step of allocating a corresponding filter window size interval to each sub-image specifically includes: S301, based on each sub-image, extracting its grayscale feature vector, the grayscale feature vector is composed of grayscale change degree and pixel information richness; S302, inputting the grayscale feature vector of the sub-image into a pre-trained filtering window bidirectional prediction model, and outputting the filtering window size interval of the sub-image.

5. The method for segmenting the hepatobiliary image according to claim 4, characterized in that: The pre-trained filter window bidirectional prediction model includes a filter window forward prediction model, a filter window reverse prediction model, and a bidirectional linkage decision module; The filtering window bidirectional prediction model is used to input the received grayscale feature vector into the filtering window forward prediction model and the filtering window reverse prediction model respectively; The filter window forward prediction model is used to output a forward prediction result according to the input grayscale feature vector and transmit it to the bidirectional linkage decision module; The filter window reverse prediction model is used to output a reverse prediction result according to the input grayscale feature vector and transmit it to the bidirectional linkage decision module; The bidirectional linkage decision module is used to output the filter window size interval of the sub-image according to the received forward prediction result and reverse prediction result; The forward prediction result includes an ideal filtering window size, and the reverse prediction result includes a reverse filtering window size and a reverse size interval.

6. The method for segmenting the hepatobiliary image according to claim 5, characterized in that: The method for obtaining the filter window reverse prediction model includes: B1. Collect a large number of hepatobiliary images with non-ideal filtering results and their grayscale feature vectors before filtering, and the actual filtering window size used, and perform cluster analysis on the collected hepatobiliary images using a clustering algorithm based on the grayscale feature vectors to obtain a number of clusters, each of which includes at least one hepatobiliary image, and each cluster corresponds to a cluster center; B2. Based on each cluster, generating at least one reverse size interval according to the continuous clustering range of the filter window size actually used by all the hepatobiliary images therein; B3, taking the grayscale feature vector corresponding to each hepatobiliary image with non-ideal filtering results collected as training data, and labeling each training data, wherein the labeling content is set to: the actual filter window size used, and the inverse size interval corresponding to the cluster to which it belongs; B4. Use the labeled training data to train the pre-selected neural network model structure, continuously optimize the model parameters, and obtain the final filter window reverse prediction model.

7. The method for segmenting the hepatobiliary image according to claim 5, characterized in that: The bidirectional linkage decision module is specifically used for: C1. Based on the reverse filtering window size and the reverse size interval, the reverse confidence is obtained; wherein the reverse confidence is obtained as follows: , h is the reverse confidence, L is the difference between the reverse filter window size and the center point of the reverse size interval; C2. Based on the positional relationship between the ideal filter window size and the reverse size interval and the reverse confidence, the target length is expanded in the left and right directions with the ideal filter window size as the reference center to obtain the final filter window size interval.

8. The method for segmenting the hepatobiliary image according to claim 4, characterized in that: In S103, a filtering window is established with any pixel as the center to obtain the value factor of the pixel, which specifically includes: Based on each sub-image of the image to be processed, traverse each value of its filter window size interval, establish a filter window with any pixel as the center, and obtain the grayscale feature vector of the pixel in the filter window; Based on the unique number of each sub-image, all sub-images having the same unique number as the sub-image are determined in other hepatobiliary images in the hepatobiliary image sequence to form a comparison sequence, wherein the comparison sequence includes at least one comparison sub-image; According to the matching degree of the gray feature vector between each pixel in each sub-image and the pixel at the same position in the comparison sub-image in the comparison sequence, the value factor of each pixel in each sub-image is obtained.

9. The method for segmenting the hepatobiliary image according to claim 1, characterized in that: In S104, the filtering value of the filtering window for the sub-image is calculated according to the following formula: Among them, Q is the filtering value of the filter window for the sub-image, N is the total number of pixels in the sub-image, is the gray value of the i-th pixel in the sub-image, is the gray value of the i-th pixel in the target image corresponding to the sub-image, is the value factor of the i-th pixel in the sub-image.

10. The method for segmenting the hepatobiliary image according to claim 1, characterized in that: After S104, the method further includes: S401, based on the target image corresponding to the sub-image, performing a connected domain analysis on it to obtain all target connected domains in the target image; S402, obtaining the maximum area value in the target connected domain as the second area value, and the maximum area value in all connected domains of the sub-image as the first area value, and calculating the negative index of the filter window according to the following formula: in, is the negative index of the filter window, S1 is the first area value, and S2 is the second area value; S403, multiplying the negative index by the filter value determined in S104 to obtain a new filter value to replace the original filter value, and executing step S105.

Citation Information

Patent Citations

  • A method for segmenting hepatobiliary and bile duct stones images

    CN118365534B

  • Remote sensing image adaptive segmentation method for neural network reasoning

    CN114972370A

  • Image denoising method based on variable scale filtering

    CN115829870A

  • Design optimization method and device of filter, filter, equipment and medium

    CN116111984A

  • Precious metal quality detection method and system based on visual identification

    CN116188462A