Image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography
By using multiple features in the image segmentation system to determine possible indicators of pancreatic organs, the problem of low accuracy in pancreatic organ area recognition when segmented based on grayscale value is solved, and higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202510173923.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-02-18
AI Technical Summary
Before endoscopic retrograde cholangiopancreatography, when segmenting pancreatic organ areas from ultrasound images based on different grayscale values, the accuracy is poor, which can easily lead to misjudgment.
An image segmentation system is proposed. By obtaining target ultrasound images in different directions, extracting the connective domains, calculating the intersection of the target perpendicular lines and their distances, as well as the area differences between the largest incision circle and the smallest circumference circle, we determine the possible indicators of the same organs and the possible indicators of the pancreatic organs, and screen out the set of connective domains that characterize the pancreatic organs.
The accuracy of pancreatic organ area recognition is improved. By comprehensively considering multiple characteristics related to pancreatic organs, the possible indicators of the same organ and the possible indicators of pancreatic organs are quantified, and the collection of connective domains that characterize pancreatic organs is accurately screened.
Smart Images

Figure CN119650070B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image analysis, and in particular to an image segmentation system for risk assessment before endoscopic retrograde pancreaticocholangiopancreatography. Background Art
[0002] For some common pancreatic and biliary diseases, such as pancreatic duct stones and stenosis, endoscopic retrograde cholangiopancreatography (ERCP) can usually be used for treatment. Before ERCP, it is often necessary to segment the pancreatic organ area in the acquired image to facilitate doctors to observe the patient's pancreatic organ, thereby assisting doctors in risk assessment before ERCP. At present, when performing target area segmentation, the commonly used method can be: based on the difference in grayscale values, the target area is segmented from the acquired image.
[0003] However, when segmenting the pancreatic organ region from the acquired ultrasound images based on the difference in grayscale values, the following technical problems often occur:
[0004] Since the grayscale difference between the pancreas and other human organs is not large, if only the difference in grayscale values is considered when segmenting the pancreatic organ area from the acquired ultrasound image, it may often lead to misjudgment of pancreatic organ pixels, resulting in poor accuracy in pancreatic organ area recognition. Summary of the invention
[0005] In order to solve the technical problem of poor accuracy in identifying the pancreatic organ region, the present invention proposes an image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography.
[0006] In a first aspect, the present invention provides an image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography, the system comprising:
[0007] An image acquisition module is used to acquire target ultrasound images in different directions by adjusting the angle of a probe placed on the upper abdomen of a patient to be tested before endoscopic retrograde pancreatocholangiopancreatography, wherein all target ultrasound images are in the same three-dimensional coordinate system;
[0008] A connected domain vertical line acquisition module is used to extract the connected domains of all target ultrasound images and draw a target vertical line perpendicular to the connected domain through the centroid of the connected domain;
[0009] The possible index determination module of the same organ is used to determine the possible index of the same organ between each connected domain in each two target ultrasound images according to the intersection of target vertical lines of each connected domain in each two target ultrasound images and the distance between them, the area difference between the maximum inscribed circles of different connected domains, and the area difference between the minimum circumscribed circles of different connected domains.
[0010] A connected domain partitioning module is used to form a connected domain set from all connected domains representing the same organ according to possible indicators of the same organ between different connected domains in different target ultrasound images;
[0011] A pancreatic organ possible index determination module is used to determine the pancreatic organ possible index corresponding to each connected domain set according to the area difference between the connected domain in each connected domain set and its minimum circumscribed circle, and the number of target ultrasound images to which all connected domains in each connected domain set belong;
[0012] The connected domain set screening module is used to screen out the connected domain set representing the pancreatic organ from all connected domain sets according to all possible indicators of the pancreatic organ.
[0013] In combination with the first aspect above, in a possible implementation manner, a method for acquiring a three-dimensional coordinate system to which a target ultrasound image belongs includes:
[0014] The coincidence point of the target ultrasound image in different directions is taken as the origin of the three-dimensional coordinate system, the horizontal direction is taken as the horizontal axis of the three-dimensional coordinate system, the vertical direction is taken as the vertical axis of the three-dimensional coordinate system, and the direction perpendicular to the horizontal and vertical directions is taken as the longitudinal axis of the three-dimensional coordinate system to construct the three-dimensional coordinate system.
[0015] In combination with the first aspect, in a possible implementation, determining the possible index of the same organ between each connected domain in each two target ultrasound images according to the intersection between target vertical lines of each connected domain in each two target ultrasound images and the distance therebetween, the area difference between the maximum inscribed circles of different connected domains, and the area difference between the minimum circumscribed circles of different connected domains, includes:
[0016] Determine any two target ultrasound images as a first labeled image and a second labeled image, respectively, and determine any connected domain in the first labeled image as a first labeled connected domain, and determine any connected domain in the second labeled image as a second labeled connected domain;
[0017] If the target vertical line of the first labeled connected domain intersects with the target vertical line of the second labeled connected domain, the possible index of the same organ between the first labeled connected domain and the second labeled connected domain is set to a preset value, wherein the preset value is the maximum value within the value range of the possible index of the same organ;
[0018] If the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain do not intersect, the possible indicators of the same organ between the first labeled connected domain and the second labeled connected domain are determined according to the distance and angle between the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain, the area difference between the maximum inscribed circles of the first labeled connected domain and the second labeled connected domain, and the area difference between their minimum circumscribed circles.
[0019] In combination with the first aspect, in a possible implementation, determining the possible index of the same organ between the first labeled connected domain and the second labeled connected domain according to the distance and angle between the target perpendicular line of the first labeled connected domain and the target perpendicular line of the second labeled connected domain, the area difference between the maximum inscribed circles of the first labeled connected domain and the second labeled connected domain, and the area difference between their minimum circumscribed circles includes:
[0020] Connect the centroid of each connected domain and the origin of the three-dimensional coordinate system to obtain a reference line segment corresponding to each connected domain, and determine the angle corresponding to the reference line segment corresponding to each connected domain as the target angle corresponding to each connected domain;
[0021] Determine the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain according to the absolute value of the difference between the target angle corresponding to the first labeled connected domain and the target angle corresponding to the second labeled connected domain, and the distance and angle between the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain;
[0022] The possible index of the same organ between the first labeled connected domain and the second labeled connected domain is determined based on the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain, the area difference between the maximum inscribed circles of the first labeled connected domain and the second labeled connected domain, and the area difference between their minimum circumscribed circles.
[0023] In combination with the first aspect above, in a possible implementation, the formula corresponding to the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain is:
[0024] ;in, is the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain; is a natural exponential function; is the distance between the target perpendicular line of the first labeled connected domain and the target perpendicular line of the second labeled connected domain; It is the absolute value function; is the target angle corresponding to the first labeled connected domain; is the target angle corresponding to the second labeled connected domain; is the angle between the target perpendicular line of the first labeled connected component and the target perpendicular line of the second labeled connected component.
[0025] In combination with the first aspect above, in a possible implementation, the formula corresponding to the possible index of the same organ between the first labeled connected domain and the second labeled connected domain is:
[0026] ;
[0027] ;in, is a possible indicator of the same organ between the first labeled connected domain and the second labeled connected domain; is the normalization function; is the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain; Characterize the overall area difference between the minimum circumscribed circle and the maximum inscribed circle between different connected domains; is a natural exponential function; It is the absolute value function; is the target angle corresponding to the first labeled connected domain; is the target angle corresponding to the second labeled connected domain; is the area of the largest inscribed circle of the first labeled connected domain; is the area of the largest inscribed circle of the second labeled connected domain; is the area difference between the largest inscribed circle of the first labeled connected domain and the second labeled connected domain; is the area of the minimum circumscribed circle of the first labeled connected domain; is the area of the minimum circumscribed circle of the second labeled connected domain; is the area difference between the minimum circumscribed circle of the first labeled connected component and the second labeled connected component.
[0028] In combination with the first aspect, in a possible implementation, according to the possible indicators of the same organ between different connected domains in different target ultrasound images, all connected domains representing the same organ are formed into the same connected domain set, including:
[0029] The connected domains whose possible indexes of the same organ in different target ultrasound images are greater than the same preset threshold value constitute a connected domain set.
[0030] In combination with the first aspect above, in a possible implementation, determining the possible index of the pancreatic organ corresponding to each connected domain set according to the area difference between the connected domain in each connected domain set and its minimum circumscribed circle, and the number of target ultrasound images to which all connected domains in each connected domain set belong, includes:
[0031] The absolute value of the difference between the area of each connected domain and the area of its minimum circumscribed circle is determined as the area difference between each connected domain and its minimum circumscribed circle;
[0032] The average value of the area differences between all connected domains and their minimum circumscribed circles in each connected domain set is determined as the area representative difference factor corresponding to each connected domain set;
[0033] The number of target ultrasound images belonging to all connected domains in each connected domain set is determined as a number representative factor corresponding to each connected domain set;
[0034] According to the area representative difference factor and quantity representative factor corresponding to each connected domain set, the possible index of the pancreatic organ corresponding to each connected domain set is determined, wherein the area representative difference factor and quantity representative factor are both positively correlated with the possible index of the pancreatic organ.
[0035] In combination with the first aspect above, in a possible implementation, determining the possible index of the pancreatic organ corresponding to each connected domain set according to the area representative difference factor and the quantity representative factor corresponding to each connected domain set includes:
[0036] The product of the area representative difference factor and the quantity representative factor corresponding to each connected domain set is normalized to obtain the possible index of the pancreatic organ corresponding to each connected domain set.
[0037] In combination with the first aspect above, in a possible implementation, the step of selecting a connected domain set representing the pancreatic organ from all connected domain sets according to all possible indicators of the pancreatic organ includes:
[0038] A connected domain set whose corresponding pancreatic organ possible index is greater than a preset pancreatic possible threshold is screened out from all connected domain sets as a connected domain set representing the pancreatic organ.
[0039] In a second aspect, the present invention provides an image segmentation method for risk assessment before endoscopic retrograde cholangiopancreatography implemented by an image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography, the method comprising:
[0040] Before endoscopic retrograde pancreatocholangiopancreatography, the target ultrasound images in different directions are obtained by adjusting the angle of the probe placed on the upper abdomen of the patient to be examined;
[0041] Connected domains are extracted from all target ultrasound images, and a target vertical line perpendicular to the connected domain is drawn through the centroid of the connected domain;
[0042] According to the intersection of target vertical lines of each connected domain in each two target ultrasound images and the distance between them, the area difference between the maximum inscribed circles of different connected domains, and the area difference between the minimum circumscribed circles of different connected domains, the possible index of the same organ between each connected domain in each two target ultrasound images is determined;
[0043] According to the possible indicators of the same organ between different connected domains in different target ultrasound images, all connected domains representing the same organ are formed into the same connected domain set;
[0044] According to the area difference between the connected domain in each connected domain set and its minimum circumscribed circle, and the number of target ultrasound images to which all connected domains in each connected domain set belong, the possible index of the pancreatic organ corresponding to each connected domain set is determined;
[0045] According to all possible indicators of the pancreatic organ, a connected domain set representing the pancreatic organ is screened out from all connected domain sets.
[0046] In a third aspect, a server is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the device executes the above-mentioned image segmentation method for risk assessment before endoscopic retrograde pancreatocholangiopancreatography.
[0047] In a fourth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the above-mentioned image segmentation method for risk assessment before endoscopic retrograde pancreatocholangiopancreatography.
[0048] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned image segmentation method for risk assessment before endoscopic retrograde pancreaticocholangiopancreatography.
[0049] The present invention has the following beneficial effects:
[0050] The image segmentation system for risk assessment before endoscopic retrograde pancreatic cholangiopancreatography of the present invention screens out a set of connected domains representing the pancreatic organ by analyzing the target ultrasound image, realizes the recognition of the pancreatic organ region, solves the technical problem of poor accuracy in the recognition of the pancreatic organ region, and improves the accuracy of the recognition of the pancreatic organ region. Compared with the pancreatic organ region segmentation based on the difference in grayscale values, the present invention comprehensively considers multiple features related to the pancreatic organ when identifying the pancreatic organ region, such as the intersection between the target vertical lines of different connected domains and the distance between them, the maximum inscribed circle and the minimum circumscribed circle of the connected domain, etc., thereby quantifying possible indicators of the same organ and possible indicators of the pancreatic organ, and then more accurately screens out a set of connected domains representing the pancreatic organ, realizes the recognition of the pancreatic organ region, and improves the accuracy of the recognition of the pancreatic organ region. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 It is a structural schematic diagram of an image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to the present invention;
[0053] Figure 2 A schematic diagram of a flow chart of an image segmentation method for risk assessment before endoscopic retrograde cholangiopancreatography according to the present invention;
[0054] Figure 3 The figure is a schematic diagram of the structure of a computer device of the present invention. DETAILED DESCRIPTION
[0055] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the technical solutions proposed by the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0056] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0057] refer to Figure 1, showing a schematic diagram of the structure of an image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to the present invention. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography includes:
[0058] The image acquisition module 101 is used to acquire target ultrasound images in different directions by adjusting the angle of the probe placed on the upper abdomen of the patient to be tested before endoscopic retrograde pancreatocholangiopancreatography.
[0059] Among them, endoscopic retrograde cholangiopancreatography (ERCP) is one of the main means of minimally invasive treatment of biliary and pancreatic diseases. The patient to be tested can be a patient who is undergoing risk assessment before endoscopic retrograde cholangiopancreatography. Since the pancreatic organ is located in the upper abdomen of the human body, it is often necessary to place the probe in the upper abdomen of the human body when identifying the pancreatic organ in order to obtain an ultrasound image containing the pancreatic organ. Adjusting the angle of the probe can facilitate the acquisition of views from different angles. Especially when examining organs such as the pancreas that are difficult to fully present, adjusting the angle of the probe can help obtain clearer and more comprehensive images. For example, longitudinal images, transverse images, and oblique images can all be ultrasound images obtained by adjusting the angle of the probe. Longitudinal images, also known as longitudinal images or 90° ultrasound images, are acquired when the probe is perpendicular to the surface of the target area. The resulting image is a longitudinal section of the body structure, which is often used to view information such as the length and depth of the organ. Transverse images, also known as transverse images or 0° ultrasound images, are acquired when the probe is parallel to the surface of the target area to generate transverse section images to help doctors observe the width and shape of the organ. Oblique images can be ultrasound images between the 0° direction and the 90° direction. When collecting them, the probe is placed at an oblique angle, and images between the longitudinal and transverse directions can be obtained, which helps to obtain more details, especially for the examination of complex organs or lesions.
[0060] The target ultrasound image may be an ultrasound image acquired by a probe. All target ultrasound images may be in the same three-dimensional coordinate system. The number of target ultrasound images may be a preset number, which may be 7. The method for acquiring the three-dimensional coordinate system to which the target ultrasound image belongs may be: taking the coincidence point of the target ultrasound images in different directions as the origin of the three-dimensional coordinate system, taking the horizontal direction as the horizontal axis of the three-dimensional coordinate system, and taking the horizontal right direction as the positive direction of the horizontal axis. In an embodiment of the present invention, the horizontal right direction may be represented by the direction from the left ear of the human body to the right ear; taking the vertical direction as the vertical axis of the three-dimensional coordinate system, and taking the vertical direction pointing to the top of the head as the positive direction of the vertical axis; taking the direction perpendicular to the horizontal direction and the vertical direction as the longitudinal axis of the three-dimensional coordinate system, and constructing a three-dimensional coordinate system, wherein the direction perpendicular to the horizontal direction and the vertical direction may be the direction from the back to the belly.
[0061] As an example, before endoscopic retrograde pancreaticocholangiopancreatography, the patient to be tested can lie flat under the guidance of a doctor. Based on the doctor's experience, the probe can be placed at a suitable position on the upper abdomen of the patient to be tested. By adjusting the shooting angle of the probe placed on the upper abdomen of the patient to be tested, ultrasonic images in the 0° direction, 15° direction, 30° direction, 45° direction, 60° direction, 75° direction and 90° direction are collected in sequence. These ultrasonic images can be recorded as the target ultrasonic image in the 0° direction, the target ultrasonic image in the 15° direction, the target ultrasonic image in the 30° direction, the target ultrasonic image in the 45° direction, the target ultrasonic image in the 60° direction, the target ultrasonic image in the 75° direction and the target ultrasonic image in the 90° direction in sequence.
[0062] The connected domain vertical line acquisition module 102 is used to extract the connected domains of all target ultrasound images and to draw a target vertical line perpendicular to the connected domain through the centroid of the connected domain.
[0063] Among them, the centroid of the connected domain can represent the central position of the connected domain.
[0064] As an example, the connected domain extraction algorithm can be used to extract the connected domain of each target ultrasound image, and the centroid of each connected domain can be determined through the plane geometric object library (shapely Polygon). Any connected domain can be determined as a candidate connected domain, and a perpendicular line perpendicular to the plane to which the candidate connected domain belongs can be drawn through the centroid of the candidate connected domain, which is recorded as the target perpendicular line of the candidate connected domain.
[0065] It should be noted that a connected domain can often represent an organ region.
[0066] The possible index determination module 103 of the same organ is used to determine the possible index of the same organ between each connected domain in each two target ultrasound images according to the intersection and distance between the target vertical lines of each connected domain in each two target ultrasound images, the area difference between the maximum inscribed circles of different connected domains, and the area difference between the minimum circumscribed circles of different connected domains.
[0067] As an example, determining the possible index of the same organ between each connected domain in each two target ultrasound images may include the following steps:
[0068] In the first step, any two target ultrasound images are respectively determined as the first labeled image and the second labeled image, and any connected domain in the first labeled image is determined as the first labeled connected domain, and any connected domain in the second labeled image is determined as the second labeled connected domain.
[0069] In the second step, if the target vertical line of the first labeled connected domain intersects with the target vertical line of the second labeled connected domain, the possible index of the same organ between the first labeled connected domain and the second labeled connected domain is set to a preset value.
[0070] The preset value may be the maximum value within the range of possible indicators of the same organ, which may be 1.
[0071] It should be noted that when the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain are closer to each other, it often means that the spatial distance between the first labeled connected domain and the second labeled connected domain is relatively closer, which often means that the first labeled connected domain and the second labeled connected domain are more likely to represent the same space, and the organs represented by the first labeled connected domain and the second labeled connected domain are more likely to be the same organ. Therefore, when the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain intersect, it often means that the organs represented by the first labeled connected domain and the second labeled connected domain are the same organ.
[0072] In the third step, if the target vertical line of the first labeled connected domain does not intersect with the target vertical line of the second labeled connected domain, determining the possible index of the same organ between the first labeled connected domain and the second labeled connected domain according to the distance and angle between the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain, the area difference between the maximum inscribed circle of the first labeled connected domain and the second labeled connected domain, and the area difference between the minimum circumscribed circles thereof may include the following sub-steps:
[0073] In the first sub-step, the centroid of each connected domain is connected to the origin of the three-dimensional coordinate system to obtain a reference line segment corresponding to each connected domain, and the angle corresponding to the reference line segment corresponding to each connected domain is determined as a target angle corresponding to each connected domain.
[0074] The angle corresponding to the reference line segment may be equal to the angle between the reference line segment pointing counterclockwise from the positive direction of the horizontal axis.
[0075] It should be noted that the target angle corresponding to the connected domain can represent the spatial direction of its corresponding organ.
[0076] The second sub-step is to determine the initial possible factors of the same organ between the first labeled connected domain and the second labeled connected domain based on the absolute value of the difference between the target angle corresponding to the first labeled connected domain and the target angle corresponding to the second labeled connected domain, and the distance and angle between the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain.
[0077] The method for calculating the distance and angle between different target vertical lines may be the same as the method for calculating the distance and angle between non-coplanar straight lines, which will not be described in detail here.
[0078] For example, the formula for determining the initial possible factors corresponding to the same organ between the first labeled connected domain and the second labeled connected domain may be:
[0079] ;in, It is the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain. is a natural exponential function. is the distance between the target perpendicular line of the first labeled connected domain and the target perpendicular line of the second labeled connected domain. It is the absolute value function. is the target angle corresponding to the first labeled connected domain. is the target angle corresponding to the second labeled connected domain. It is the angle between the target perpendicular line of the first labeled connected domain and the target perpendicular line of the second labeled connected domain.
[0080] It should be noted that when The smaller the value is, the smaller the distance between the target vertical line of the first connected domain and the target vertical line of the second connected domain is. This often means that the first connected domain and the second connected domain are more likely to represent the same space, and the first connected domain and the second connected domain are more likely to represent the same organ. The target angle corresponding to the connected domain can represent the spatial direction of the corresponding organ. When the value is larger, it often means that the spatial directions of the organs represented by the first labeled connected domain and the second labeled connected domain are less similar, which often means that the organs represented by the first labeled connected domain and the second labeled connected domain are more likely to be different. When the value is larger, it often indicates that the target vertical direction of the first labeled connected domain is less similar to the target vertical direction of the second labeled connected domain, which often indicates that the organs represented by the first labeled connected domain and the second labeled connected domain are more likely to be different. The larger the value is, the more likely it is that the first labeled connected domain and the second labeled connected domain represent the same organ.
[0081] The third sub-step is to determine the possible index of the same organ between the first labeled connected domain and the second labeled connected domain based on the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain, the area difference between the maximum inscribed circles of the first labeled connected domain and the second labeled connected domain, and the area difference between their minimum circumscribed circles.
[0082] For example, the formula for determining the possible corresponding indicators of the same organ between the first labeled connected domain and the second labeled connected domain may be:
[0083] ;
[0084] ;in, It is a possible indicator of the same organ between the first labeled connected domain and the second labeled connected domain. is a normalization function. It is the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain. Characterizes the overall area difference between the minimum circumscribed circle and the maximum inscribed circle between different connected domains. is a natural exponential function. It is the absolute value function. is the target angle corresponding to the first labeled connected domain. is the target angle corresponding to the second labeled connected domain. is the area of the largest inscribed circle of the first labeled connected domain. is the area of the largest inscribed circle of the second labeled connected domain. is the area difference between the largest inscribed circle of the first labeled connected domain and the second labeled connected domain. is the area of the minimum circumscribed circle of the first labeled connected domain. is the area of the minimum circumscribed circle of the second labeled connected domain. is the area difference between the minimum circumscribed circle of the first labeled connected component and the second labeled connected component.
[0085] It should be noted that when When the value is larger, it often indicates that the first labeled connected domain and the second labeled connected domain are more likely to represent the same organ. The smaller the value, the more likely it is that the maximum inscribed circle of the first connected domain and the maximum inscribed circle of the second connected domain are similar, the more likely it is that the shapes of the first connected domain and the second connected domain are similar, and the more likely it is that the organs represented by the first connected domain and the second connected domain are the same. The smaller it is, the more similar the minimum circumscribed circle of the first connected domain and the minimum circumscribed circle of the second connected domain may be, the more similar the shapes of the first connected domain and the second connected domain are, and the more likely the organs represented by the first connected domain and the second connected domain are to be the same. The smaller it is, the closer the spatial directions of the organs represented by the first and second connected domains are, which means that the organs represented by the first and second connected domains are more likely to be the same. The larger the value is, the more likely it is that the organ represented by the first labeled connected domain and the second labeled connected domain is the same.
[0086] The connected domain division module 104 is used to form a connected domain set from all connected domains representing the same organ according to possible indicators of the same organ between different connected domains in different target ultrasound images.
[0087] Among them, a set of connected domains can represent an organ.
[0088] As an example, the connected domains whose possible indexes of the same organ in different target ultrasound images are greater than a preset same threshold value may be formed into a connected domain set, wherein the preset same threshold value may be a pre-set threshold value, which may be 0.8.
[0089] It should be noted that the connected domains representing the same organ often have larger possible indexes of the same organ. Therefore, the connected domains with larger possible indexes of the same organ in different target ultrasound images can often represent the same organ, so a connected domain set can represent an organ.
[0090] The pancreatic organ possible index determination module 105 is used to determine the pancreatic organ possible index corresponding to each connected domain set according to the area difference between the connected domain in each connected domain set and its minimum circumscribed circle, and the number of target ultrasound images to which all connected domains in each connected domain set belong.
[0091] As an example, determining the possible index of the pancreas organ corresponding to each connected domain set may include the following steps:
[0092] In the first step, the absolute value of the difference between the area of each connected domain and the area of its minimum circumscribed circle is determined as the area difference between each connected domain and its minimum circumscribed circle.
[0093] In the second step, the average of the area differences between all connected domains and their minimum circumscribed circles in each connected domain set is determined as the area representative difference factor corresponding to each connected domain set.
[0094] For example, the formula for determining the area representative difference factor corresponding to the connected domain set can be:
[0095] ;in, It is The area corresponding to the connected domain set represents the difference factor. is the serial number of the connected domain set. It is The number of connected domains in a connected domain set. It is The serial number of the connected domain in the set of connected domains. It is In the connected domain set, the The area difference between a connected region and its minimum circumscribed circle.
[0096] It should be noted that in reality, the pancreas often appears flat in the middle and wide on both sides in ultrasound images from most different directions, while the surrounding organs and tissues such as the gallbladder, aorta and kidneys are mostly elliptical. Therefore, compared with other surrounding organs, the area difference between the connected domain representing the pancreas and its minimum circumscribed circle is often larger. The larger the The larger the difference in area between the connected domain and its minimum circumscribed circle in the connected domain set, the larger the difference in area between the connected domain and its minimum circumscribed circle. The organ represented by the set of connected domains is more likely to be the pancreas.
[0097] In the third step, the number of target ultrasound images belonging to all connected domains in each connected domain set is determined as a quantity representative factor corresponding to each connected domain set.
[0098] The fourth step is to determine the possible indicators of the pancreatic organ corresponding to each connected domain set based on the area representative difference factor and the quantity representative factor corresponding to each connected domain set.
[0099] Among them, both the area representative difference factor and the quantity representative factor can be positively correlated with the possible indicators of the pancreatic organ.
[0100] For example, the product of the area representative difference factor and the quantity representative factor corresponding to each connected domain set may be normalized to obtain the possible index of the pancreatic organ corresponding to each connected domain set.
[0101] For example, the formula for determining the possible indicators of the pancreatic organ corresponding to the connected domain set can be:
[0102] ;in, It is The possible indicators of the pancreatic organ corresponding to the connected domain set. is a normalization function. It is The number of connected domain sets corresponding to the representative factors. It is The area corresponding to the connected domain set represents the difference factor.
[0103] It should be noted that in actual situations, since the probe is placed in a position that is convenient for photographing the pancreatic organ when acquiring the target ultrasound image, there are often many target ultrasound images that contain the pancreatic organ area. When the value is larger, it often means that more target ultrasound images contain the An organ represented by a set of connected domains often indicates The more connected domains a set represents, the more likely it is the pancreas. The larger the The larger the difference in area between the connected domain and its minimum circumscribed circle in the connected domain set, the larger the difference in area between the connected domain and its minimum circumscribed circle. The more connected domains a set represents, the more likely it is the pancreas. The larger the The organ represented by the set of connected domains is more likely to be the pancreas.
[0104] The connected domain set screening module 106 is used to screen out a connected domain set representing the pancreatic organ from all connected domain sets according to all possible indicators of the pancreatic organ.
[0105] As an example, a connected domain set whose corresponding pancreatic organ possible index is greater than a preset pancreatic possible threshold can be screened out from all connected domain sets as a connected domain set representing the pancreatic organ. The preset pancreatic possible threshold can be a pre-set threshold, which can be 0.8. The connected domain set representing the pancreatic organ is often the connected domain set with the largest corresponding pancreatic organ possible index.
[0106] It should be noted that identifying a set of connected domains representing the pancreatic organ can assist doctors in judging the pancreatic condition of the patient to be tested, so that doctors can evaluate whether the patient to be tested is suitable for endoscopic retrograde pancreatic cholangiopancreatography, thereby assisting doctors in performing risk assessment before endoscopic retrograde pancreatic cholangiopancreatography.
[0107] refer to Figure 2 Based on the same inventive concept as the above method embodiment, the present invention shows an image segmentation method for risk assessment before endoscopic retrograde cholangiopancreatography, comprising the following steps:
[0108] Step 201, before endoscopic retrograde pancreatocholangiopancreatography, adjusting the angle of a probe placed on the upper abdomen of a patient to be tested to obtain target ultrasound images in different directions;
[0109] Step 202, extracting connected domains from all target ultrasound images, and drawing a target vertical line perpendicular to the connected domain through the centroid of the connected domain;
[0110] Step 203, determining the possible index of the same organ between each connected domain in each two target ultrasound images according to the intersection of target vertical lines of each connected domain in each two target ultrasound images and the distance therebetween, the area difference between the maximum inscribed circles of different connected domains, and the area difference between the minimum circumscribed circles of different connected domains;
[0111] Step 204, according to the possible indicators of the same organ between different connected domains in different target ultrasound images, all connected domains representing the same organ are formed into a same connected domain set;
[0112] Step 205, determining the possible index of the pancreatic organ corresponding to each connected domain set according to the area difference between the connected domain in each connected domain set and its minimum circumscribed circle, and the number of target ultrasound images to which all connected domains in each connected domain set belong;
[0113] Step 206: According to all possible indicators of the pancreatic organ, a connected domain set representing the pancreatic organ is screened out from all connected domain sets.
[0114] Figure 3 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 3 As shown, the computer device 300 includes: a memory 301, a processor 302, and a computer program 303 stored in the memory 301 and running on the processor 302, wherein when the processor 302 executes the computer program 303, the computer device can execute the aforementioned image segmentation method for risk assessment before endoscopic retrograde pancreaticocholangiopancreatography.
[0115] Based on the same inventive concept as the above method embodiment, the present invention provides a server, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the device executes the above image segmentation method for risk assessment before endoscopic retrograde pancreatocholangiopancreatography.
[0116] Based on the same inventive concept as the above-mentioned method embodiment, the present invention provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes the above-mentioned image segmentation method for risk assessment before endoscopic retrograde pancreaticocholangiopancreatography.
[0117] Based on the same inventive concept as the above-mentioned method embodiment, the present invention provides a computer-readable storage medium, which stores a computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned image segmentation method for risk assessment before endoscopic retrograde pancreaticocholangiopancreatography.
[0118] In summary, compared with the pancreatic organ region segmentation based on the difference in grayscale values, the present invention comprehensively considers multiple features related to the pancreatic organ when identifying the pancreatic organ region, such as the intersection between the target perpendicular lines of different connected domains and the distance between them, the maximum inscribed circle and the minimum circumscribed circle of the connected domain, etc., thereby quantifying the possible indicators of the same organ and the possible indicators of the pancreatic organ, and then more accurately screening out the connected domain set characterizing the pancreatic organ, realizing the recognition of the pancreatic organ region, and improving the accuracy of pancreatic organ region recognition.
[0119] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. An image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography, characterized in that: The system comprises: An image acquisition module is used to acquire target ultrasound images in different directions by adjusting the angle of a probe placed on the upper abdomen of a patient to be tested before endoscopic retrograde pancreatocholangiopancreatography, wherein all target ultrasound images are in the same three-dimensional coordinate system; A connected domain vertical line acquisition module is used to extract the connected domains of all target ultrasound images and draw a target vertical line perpendicular to the connected domain through the centroid of the connected domain; The possible index determination module of the same organ is used to determine the possible index of the same organ between each connected domain in each two target ultrasound images according to the intersection of target vertical lines of each connected domain in each two target ultrasound images and the distance between them, the area difference between the maximum inscribed circles of different connected domains, and the area difference between the minimum circumscribed circles of different connected domains. A connected domain partitioning module is used to form a connected domain set from all connected domains representing the same organ according to possible indicators of the same organ between different connected domains in different target ultrasound images; A pancreatic organ possible index determination module is used to determine the pancreatic organ possible index corresponding to each connected domain set according to the area difference between the connected domain in each connected domain set and its minimum circumscribed circle, and the number of target ultrasound images to which all connected domains in each connected domain set belong; The connected domain set screening module is used to screen out the connected domain set representing the pancreatic organ from all connected domain sets according to all possible indicators of the pancreatic organ.
2. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to claim 1, characterized in that: A method for acquiring a three-dimensional coordinate system to which a target ultrasound image belongs includes: The coincidence point of the target ultrasound image in different directions is taken as the origin of the three-dimensional coordinate system, the horizontal direction is taken as the horizontal axis of the three-dimensional coordinate system, the vertical direction is taken as the vertical axis of the three-dimensional coordinate system, and the direction perpendicular to the horizontal and vertical directions is taken as the longitudinal axis of the three-dimensional coordinate system to construct the three-dimensional coordinate system.
3. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to claim 1, characterized in that: The method of determining possible indicators of the same organ between each connected domain in each two target ultrasound images according to the intersection of target vertical lines of each connected domain in each two target ultrasound images and the distance therebetween, the area difference between the maximum inscribed circles of different connected domains, and the area difference between the minimum circumscribed circles of different connected domains, includes: Determine any two target ultrasound images as a first labeled image and a second labeled image, respectively, and determine any connected domain in the first labeled image as a first labeled connected domain, and determine any connected domain in the second labeled image as a second labeled connected domain; If the target vertical line of the first labeled connected domain intersects with the target vertical line of the second labeled connected domain, the possible index of the same organ between the first labeled connected domain and the second labeled connected domain is set to a preset value, wherein the preset value is the maximum value within the value range of the possible index of the same organ; If the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain do not intersect, the possible indicators of the same organ between the first labeled connected domain and the second labeled connected domain are determined according to the distance and angle between the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain, the area difference between the maximum inscribed circles of the first labeled connected domain and the second labeled connected domain, and the area difference between their minimum circumscribed circles.
4. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to claim 3, characterized in that: The determining the possible index of the same organ between the first labeled connected domain and the second labeled connected domain according to the distance and angle between the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain, the area difference between the maximum inscribed circles of the first labeled connected domain and the second labeled connected domain, and the area difference between the minimum circumscribed circles thereof, comprises: Connect the centroid of each connected domain and the origin of the three-dimensional coordinate system to obtain a reference line segment corresponding to each connected domain, and determine the angle corresponding to the reference line segment corresponding to each connected domain as the target angle corresponding to each connected domain; Determine the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain according to the absolute value of the difference between the target angle corresponding to the first labeled connected domain and the target angle corresponding to the second labeled connected domain, and the distance and angle between the target vertical line of the first labeled connected domain and the target vertical line of the second labeled connected domain; The possible index of the same organ between the first labeled connected domain and the second labeled connected domain is determined based on the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain, the area difference between the maximum inscribed circles of the first labeled connected domain and the second labeled connected domain, and the area difference between their minimum circumscribed circles.
5. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to claim 4, characterized in that: The formula corresponding to the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain is: ;in, is the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain; is a natural exponential function; is the distance between the target perpendicular line of the first labeled connected domain and the target perpendicular line of the second labeled connected domain; It is the absolute value function; is the target angle corresponding to the first labeled connected domain; is the target angle corresponding to the second labeled connected domain; is the angle between the target perpendicular line of the first labeled connected component and the target perpendicular line of the second labeled connected component.
6. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to claim 4, characterized in that: The formula corresponding to the possible index of the same organ between the first labeled connected domain and the second labeled connected domain is: ; ;in, is a possible indicator of the same organ between the first labeled connected domain and the second labeled connected domain; is the normalization function; is the initial possible factor of the same organ between the first labeled connected domain and the second labeled connected domain; Characterize the overall area difference between the minimum circumscribed circle and the maximum inscribed circle between different connected domains; is a natural exponential function; It is the absolute value function; is the target angle corresponding to the first labeled connected domain; is the target angle corresponding to the second labeled connected domain; is the area of the largest inscribed circle of the first labeled connected domain; is the area of the largest inscribed circle of the second labeled connected domain; is the area difference between the largest inscribed circle of the first labeled connected domain and the second labeled connected domain; is the area of the minimum circumscribed circle of the first labeled connected domain; is the area of the minimum circumscribed circle of the second labeled connected domain; is the area difference between the minimum circumscribed circle of the first labeled connected component and the second labeled connected component.
7. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to claim 1, characterized in that: According to the possible indicators of the same organ between different connected domains in different target ultrasound images, all connected domains representing the same organ are formed into the same connected domain set, including: The connected domains whose possible indexes of the same organ in different target ultrasound images are greater than the same preset threshold value constitute a connected domain set.
8. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to claim 1, characterized in that: The method of determining the possible index of the pancreatic organ corresponding to each connected domain set according to the area difference between the connected domain in each connected domain set and its minimum circumscribed circle and the number of target ultrasound images to which all connected domains in each connected domain set belong includes: The absolute value of the difference between the area of each connected domain and the area of its minimum circumscribed circle is determined as the area difference between each connected domain and its minimum circumscribed circle; The average value of the area differences between all connected domains and their minimum circumscribed circles in each connected domain set is determined as the area representative difference factor corresponding to each connected domain set; The number of target ultrasound images belonging to all connected domains in each connected domain set is determined as a number representative factor corresponding to each connected domain set; According to the area representative difference factor and quantity representative factor corresponding to each connected domain set, the possible index of the pancreatic organ corresponding to each connected domain set is determined, wherein the area representative difference factor and quantity representative factor are both positively correlated with the possible index of the pancreatic organ.
9. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to claim 8, characterized in that: The determining of the possible index of the pancreatic organ corresponding to each connected domain set according to the area representative difference factor and the quantity representative factor corresponding to each connected domain set includes: The product of the area representative difference factor and the quantity representative factor corresponding to each connected domain set is normalized to obtain the possible index of the pancreatic organ corresponding to each connected domain set.
10. The image segmentation system for risk assessment before endoscopic retrograde cholangiopancreatography according to claim 1, characterized in that: The method of screening out a connected domain set representing the pancreatic organ from all connected domain sets according to all possible indicators of the pancreatic organ includes: A connected domain set whose corresponding pancreatic organ possible index is greater than a preset pancreatic possible threshold is screened out from all connected domain sets as a connected domain set representing the pancreatic organ.
Citation Information
Patent Citations
Auxiliary diagnosis and measurement method and system in endoscopic retrograde cholangiopancreatography
CN111105873A
Follicle region enhancement method for ovarian tissue analysis
CN117575977A