Automatic rapid tracing method and system for bladder contour of ultrasonic image, storage medium and electronic equipment

Through automated ultrasound image processing methods, the error and real-time problems of traditional bladder profile drawing are solved, and fast and accurate bladder profile drawing is achieved, which improves the efficiency of diagnosis and treatment.

CN120495325APending Publication Date: 2025-08-15ESONIC MEDICAL TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510423670.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

Traditional ultrasound bladder profile depiction relies on physician professional skills, has artificial errors, large workload and poor real-time performance, making it difficult to meet clinical needs.

Method used

An automated method is adopted to achieve rapid and accurate bladder profile by binarizing ultrasound images, corrosion expansion, and iterative search and filtering of center points.

Benefits of technology

It improves the accuracy and consistency of bladder profile delineation, reduces physician workload, meets clinical real-time needs, and provides a reliable basis for bladder volume measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495325A_ABST
    Figure CN120495325A_ABST
Patent Text Reader

Abstract

The invention provides an ultrasonic image bladder contour automatic rapid tracing method and system, a storage medium and electronic equipment. The method comprises the following steps: S1, inputting a grayscale image of ultrasonic examination; s2, carrying out binarization on the grayscale image to obtain a binary image; s3, performing corrosion and expansion on the binary image to obtain a corrosion expansion image; s4, taking the geometric center of the corrosion expansion image as a central point; s5, searching a contour point set in the corrosion expansion image based on the central point; s6, taking the arithmetic average center of all the contour points in the contour point set as a new center point, and returning to the step S5; s7, iteratively executing S5 to S6 until the new central point converges; s8, filtering a new contour point set searched in the corrosion expansion image based on the converged new center point; and S9, tracing the bladder contour on the corrosion expansion image based on the filtered new contour point set. According to the method, the bladder envelope can be accurately and quickly determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer data processing, and in particular to a method, system, storage medium and electronic equipment for automatically and quickly tracing bladder contours using ultrasonic images. Background Art

[0002] Currently, ultrasound imaging technology plays a vital role in medical diagnosis, especially in the diagnosis of urinary system diseases. Accurate depiction of ultrasound bladder contour is of great significance for assessing bladder health, monitoring changes in urine volume, and guiding clinical treatment.

[0003] Traditional bladder contouring is typically performed by scanning the patient's body surface with a handheld ultrasound probe to obtain a two-dimensional B-ultrasound image of the bladder. Because urine in the bladder is primarily composed of water, inorganic salts, and urea, these components have low ultrasound reflectivity and appear as low echoes on the image. The bladder wall is composed of multiple layers of tissue, including the mucosa, muscularis, and serosa. These tissues contain a large number of fibers, muscles, and blood vessels, which have high ultrasound reflectivity and appear as high echoes. Physicians need to manually outline the bladder based on its echogenic characteristics in the image.

[0004] However, this has the following disadvantages:

[0005] 1. Human error: The depiction of bladder contour is highly dependent on the physician's professional skills and experience, and the depiction results between different physicians may vary greatly.

[0006] 2. Heavy workload: For patients who require continuous monitoring, such as those with urinary retention or dysuria, frequent manual delineation of the bladder contour will increase the workload of the physician.

[0007] 3. Poor real-time performance: Manually depicting the bladder contour takes a certain amount of time and is difficult to meet clinical real-time requirements. Summary of the Invention

[0008] One of the purposes of the present invention is to provide a method for automatically and quickly tracing the bladder contour in an ultrasonic image to solve the above-mentioned shortcomings.

[0009] An embodiment of the present invention provides a method for automatically and quickly tracing the bladder contour in an ultrasound image, comprising:

[0010] S1, input ultrasound grayscale image;

[0011] S2, binarizing the grayscale image to obtain a binary image;

[0012] S3, corroding and dilating the binary image to obtain a corroded and dilated image;

[0013] S4, taking the geometric center of the eroded and dilated image as the center point;

[0014] S5. Based on the center point, find the contour point set in the eroded and dilated image;

[0015] S6, taking the arithmetic mean center of all contour points in the contour point set as the new center point and returning to step S5;

[0016] S7, iteratively execute S5 to S6 until the new center point converges;

[0017] S8, filtering the new contour point set found in the eroded and dilated image based on the new center point after convergence;

[0018] S9. Based on the filtered new contour point set, trace the bladder contour on the eroded and dilated image.

[0019] Optionally, the step S2 of binarizing the grayscale image to obtain a binary image includes:

[0020] Get the binarization threshold;

[0021] Based on the binarization threshold, the grayscale image is binarized to obtain a binary image.

[0022] Optionally, obtaining a binarization threshold includes:

[0023] Traverse 0 to 255. Each time you traverse, use the traversed value as the grayscale value h. Substitute the grayscale value h into the total complexity calculation formula to calculate the total complexity C(h);

[0024] After the traversal is completed, the maximum total complexity C will be calculated max As the binarization threshold;

[0025] The total complexity calculation formula is as follows:

[0026] C(h)=f1(h)+f2(h)

[0027]

[0028]

[0029] Where C(h) is the total complexity, f1(h) is the cumulative complexity of grayscale values 1 to h, f2(h) is the cumulative complexity of grayscale values (h+1) to 255, fth is the cumulative frequency ratio of grayscale values 1 to h, (1-fth) is the cumulative frequency ratio of grayscale values (h+1) to 255, pii(i) is the statistical frequency ratio of grayscale value i in the grayscale image, which indicates the probability of grayscale i appearing in the image, P(i) is the statistical frequency of grayscale value in the grayscale image, m*n is the size of the grayscale image, eps is the minimum error value close to 0, and P is the grayscale frequency matrix obtained by calculating the grayscale histogram of the grayscale image.

[0030] Optionally, the step S3 of corroding and dilating the binary image to obtain the corroded and dilated image includes:

[0031] Based on a 3*3 all-1 matrix, the binary image is corroded;

[0032] Based on a 7*7 all-1 matrix, the eroded binary image is expanded to obtain the eroded and expanded image.

[0033] Optionally, the step S5 of searching for a set of contour points in the eroded and dilated image based on the center point includes:

[0034] With the center point as the pole O, a polar coordinate system is established in the eroded and dilated image;

[0035] Establish a ray starting from the pole O; the angle formed by the ray and the polar axis of the polar coordinate system is θ;

[0036] The ray rotates 360 degrees counterclockwise with the pole O as the center. As the ray rotates, the angle θ increases at a fixed step size.

[0037] Starting from the extreme point O of the ray, candidate points are taken on the ray with a fixed step size; the coordinates of the i-th candidate point in polar coordinates are (ρ i ,θ i );

[0038] The candidate points are converted from polar coordinates to plane rectangular coordinates; the plane rectangular coordinates of the i-th candidate point on the eroded and dilated image are (x i ,y i ); The pixel value of the i-th candidate point on the eroded and dilated image is I i ; The coordinates of the i-1th candidate point in polar coordinates are (ρ i-1 ,θ i-1 );

[0039] Traverse the candidate points in sequence until condition I is met i+2 +I i+1 +I i -Ii-1 -I i-2 >3, the corresponding candidate point is used as the contour point on ray i; I i+2 , I i+1 , I i-1 , I i-2 are the pixel value of the i+2th candidate point on the eroded and dilated image, the pixel value of the i+1th candidate point on the eroded and dilated image, the pixel value of the i-1th candidate point on the eroded and dilated image, and the pixel value of the i-2th candidate point on the eroded and dilated image;

[0040] Find the contour points on all rays and form a contour point set.

[0041] Optionally, the step S8 of filtering a new set of contour points found in the eroded and dilated image based on the converged new center point includes:

[0042] All the contour points in the new contour point set P are converted from plane rectangular coordinates to polar coordinates; wherein the coordinates of the j-th contour point in the new contour point set P in the polar coordinate system are (ρ j ,θ j );

[0043] Perform median filtering on the polar radius ρ of all contour points in the new contour point set P to obtain a new contour point set P′; where the coordinates of the j-th point in the new contour point set P in the polar coordinate system are (ρ′ j ,θ j ).

[0044] All contour points in the new contour point set P′ are converted from polar coordinates to plane rectangular coordinates to obtain a new contour point set after filtering.

[0045] An embodiment of the present invention provides a system for automatically and quickly recording bladder contours using ultrasound images, comprising:

[0046] An image input module, configured to execute S1 and input a grayscale image of ultrasound examination;

[0047] A binarization module is used to execute S2, binarize the grayscale image to obtain a binary image;

[0048] The erosion and dilation module is used to execute S3, erode and dilate the binary image to obtain an eroded and dilated image;

[0049] a center point determination module, configured to execute S4 and use the geometric center of the eroded and dilated image as the center point;

[0050] A contour point search module is used to execute S5 and search for a contour point set in the eroded and dilated image based on the center point;

[0051] a center point redetermining module, configured to execute S6, take the arithmetic mean center of all contour points in the contour point set as a new center point and return to step S5;

[0052] An iterative execution module, configured to iteratively execute S5 to S6 until a new center point converges;

[0053] A filtering module, configured to execute S7, filtering a new set of contour points found in the eroded and dilated image based on the converged new center point;

[0054] The tracing module is used to execute S8 and trace the bladder contour on the eroded and dilated image based on the filtered new contour point set.

[0055] Optionally, the step S2 of binarizing the grayscale image to obtain a binary image includes:

[0056] Get the binarization threshold;

[0057] Based on the binarization threshold, the grayscale image is binarized to obtain a binary image.

[0058] An embodiment of the present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and a processor executes the computer program to implement any of the above methods.

[0059] An embodiment of the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement any one of the methods described above.

[0060] The present invention has achieved the following beneficial effects:

[0061] 1. Improving the accuracy and consistency of bladder contouring: Traditional bladder contouring methods rely primarily on the expertise and experience of ultrasound physicians. This is not only time-consuming and labor-intensive, but also susceptible to human factors, making it difficult to ensure the consistency and accuracy of the results. Ultrasound bladder contouring automatic enveloping technology uses an automated method to quickly and accurately depict the bladder contour, thereby improving diagnostic accuracy and consistency.

[0062] 2. Reduce physician workload: For patients requiring continuous monitoring, such as those with urinary retention or dysuria, frequent manual bladder contouring increases physician workload. Ultrasound bladder contour automatic enveloping technology can significantly reduce physician workload in this area, allowing them to focus on other more important medical tasks, thereby improving overall medical efficiency.

[0063] 3. Meeting clinical real-time requirements: Manual bladder contouring takes considerable time and is difficult to achieve in real-time clinical applications. Especially in emergency situations, such as acute urinary retention or bladder rupture, rapid and accurate bladder contouring is crucial for timely diagnosis and treatment. Ultrasound bladder contour automatic enveloping technology can meet this need, providing physicians with timely diagnostic information and helping to develop more effective treatment plans.

[0064] 4. Provides a reliable basis for bladder volume measurement: This not only improves the accuracy of bladder contour delineation but also provides a more reliable basis for bladder volume measurement. Bladder volume measurement is important for assessing bladder function, monitoring changes in urine volume, and guiding clinical treatment.

[0065] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.

[0066] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0068] Figure 1 Schematic diagram of a method for automatically and quickly tracing bladder contours from ultrasound images according to an embodiment of the present invention;

[0069] Figure 2 A schematic diagram of finding contour points in an embodiment of the present invention;

[0070] Figure 3 Schematic diagram of central point convergence in an embodiment of the present invention;

[0071] Figure 4 Schematic diagram of a system for automatically and quickly tracing bladder contours using ultrasound images according to an embodiment of the present invention. DETAILED DESCRIPTION

[0072] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0073] The embodiment of the present invention provides a method for automatically and quickly recording the bladder contour in an ultrasound image. Figure 1 As shown, including:

[0074] S1, input ultrasound grayscale image;

[0075] S2, binarizing the grayscale image to obtain a binary image;

[0076] S3, corroding and dilating the binary image to obtain a corroded and dilated image;

[0077] S4, taking the geometric center of the eroded and dilated image as the center point;

[0078] S5. Based on the center point, find the contour point set in the eroded and dilated image;

[0079] S6, taking the arithmetic mean center of all contour points in the contour point set as the new center point and returning to step S5;

[0080] S7, iteratively execute S5 to S6 until the new center point converges;

[0081] S8, filtering the new contour point set found in the eroded and dilated image based on the new center point after convergence;

[0082] S9. Based on the filtered new contour point set, trace the bladder contour on the eroded and dilated image.

[0083] Center point convergence means that as the number of iterations increases, the center point coordinates obtained in each iteration continuously approach a fixed coordinate and eventually stabilize near the fixed coordinate. In specific implementation, it is manifested as: the current number of iterations is greater than a certain value (maximum number of iterations) or the geometric distance between the current and previous center point coordinates is less than a certain value (minimum geometric distance).

[0084] The point operation method adopted in this application has the advantages of low memory usage and low algorithm complexity. According to the echo difference between bladder tissue and urine, the bladder envelope can be calculated accurately and quickly, avoiding manual tracing errors, reducing the probability of misdiagnosis and missed diagnosis, and helping doctors diagnose and treat diseases more accurately.

[0085] In one embodiment, the step S2 of binarizing the grayscale image to obtain a binary image includes:

[0086] Get the binarization threshold;

[0087] Based on the binarization threshold, the grayscale image is binarized to obtain a binary image;

[0088] The obtaining of a binarization threshold value includes:

[0089] Traverse 0 to 255. Each time you traverse, use the traversed value as the grayscale value h. Substitute the grayscale value h into the total complexity calculation formula to calculate the total complexity C(h);

[0090] After the traversal is completed, the maximum total complexity C will be calculated max As the binarization threshold;

[0091] The total complexity calculation formula is as follows:

[0092] C(h)=f1(h)+f2(h)

[0093]

[0094]

[0095] Where C(h) is the total complexity, f1(h) is the cumulative complexity of grayscale values 1 to h, f2(h) is the cumulative complexity of grayscale values (h+1) to 255, fth is the cumulative frequency ratio of grayscale values 1 to h, (1-fth) is the cumulative frequency ratio of grayscale values (h+1) to 255, pii(i) is the statistical frequency ratio of grayscale value i in the grayscale image, which indicates the probability of grayscale i appearing in the image, P(i) is the statistical frequency of grayscale value in the grayscale image, m*n is the size of the grayscale image, eps is the minimum error value close to 0, and P is the grayscale frequency matrix obtained by calculating the grayscale histogram of the grayscale image.

[0096] In the above technical solution, the specific application steps of binarization are as follows:

[0097] Step 1: The input image is a B-mode 8-bit grayscale image with a size of m*n. Calculate the grayscale histogram of the grayscale image and obtain the grayscale frequency matrix P.

[0098] Step 2: Use h to represent the grayscale value, which ranges from 0 to 255, then P(h) represents the statistical frequency of the grayscale value in the grayscale image. Represents the statistical frequency ratio of the gray value in the grayscale image.

[0099] Step 3: The total complexity at grayscale value h is C(h) = f1(h) + f2(h), where:

[0100] The complexity to the left of the grayscale value h (the sum of the complexities of grayscale values 1 to h):

[0101]

[0102] The complexity to the right of the grayscale value h (the sum of the complexities of grayscale values (h+1) to 255):

[0103]

[0104] The sum of the frequency ratios to the left of the gray value h (the cumulative sum of the frequency ratios of gray values 1 to h):

[0105] The sum of the frequency ratios to the right of the grayscale value h (the cumulative sum of the frequency ratios of the grayscale values (h+1) to 255): (1-fh);

[0106] The statistical frequency ratio of gray value i in the gray image:

[0107] Gray frequency matrix: P;

[0108] The statistical frequency of gray value i in the gray image: P(i);

[0109] Image size: m*n;

[0110] Very small error value close to 0: e p s ;

[0111] Step 4: Traverse the grayscale value from 0 to 255, and calculate the maximum total complexity C according to the total complexity calculation formula max , and its corresponding grayscale value is used as the binarization threshold Thd.

[0112] Step 5: Convert the grayscale image into a binary image according to the binarization threshold.

[0113] By calculating the grayscale histogram and obtaining the maximum complexity, the binarization threshold parameter is finally obtained, which can accurately segment the low-echo and high-echo areas.

[0114] In one embodiment, the step S3 of corroding and dilating the binary image to obtain the corroded and dilated image includes:

[0115] Based on a 3*3 all-1 matrix, the binary image is corroded;

[0116] Based on a 7*7 all-1 matrix, the eroded binary image is expanded to obtain the eroded and expanded image.

[0117] Morphological processing of corrosion and expansion was used to reduce noise interference in low-echo areas and enhance the bladder contour.

[0118] In one embodiment, Figure 2 As shown, the step S5, based on the center point, searching for a set of contour points in the eroded and dilated image, includes:

[0119] With the center point as the pole O, a polar coordinate system is established in the eroded and dilated image;

[0120] Establish a ray starting from the pole O; the angle formed by the ray and the polar axis of the polar coordinate system is θ;

[0121] The ray rotates 360 degrees counterclockwise with the pole O as the center. As the ray rotates, the angle θ increases at a fixed step size.

[0122] Starting from the extreme point O of the ray, a candidate point is taken on the ray with a fixed step size (fixed step size Δp = 3); the coordinates of the i-th candidate point in polar coordinates are (ρ i ,θ i );

[0123] The candidate points are converted from polar coordinates to plane rectangular coordinates; the plane rectangular coordinates of the i-th candidate point on the eroded and dilated image are (x i ,y i ); The pixel value of the i-th candidate point on the eroded and expanded image is I; the coordinates of the i-1-th candidate point in polar coordinates are (ρ i-1 ,θ i-1 );

[0124] Traverse the candidate points in sequence until condition I is met i+2 +I i+1 +I i -I i-1 -I i-2 >3, the corresponding candidate point is used as the contour point on ray i; I i+2 , I i+1 , I i-1 , I i-2 are the pixel value of the i+2th candidate point on the eroded and dilated image, the pixel value of the i+1th candidate point on the eroded and dilated image, the pixel value of the i-1th candidate point on the eroded and dilated image, and the pixel value of the i-2th candidate point on the eroded and dilated image;

[0125] Find the contour points on all rays and form a contour point set.

[0126] The contour calculated by this method is more consistent with the topological structure of the bladder by using the rotation ray method. By screening candidate points, it is consistent with the echo intensity variation characteristics of the bladder wall. After N rounds of iterations of finding edge points and recalculating the center point, the contour and center point gradually converge, such as Figure 3 As shown, the larger the value of N is, the higher the accuracy of the calculation result is.

[0127] In one embodiment, the step S8 of filtering the new contour point set found in the eroded and dilated image based on the converged new center point includes:

[0128] All the contour points in the new contour point set P are converted from plane rectangular coordinates to polar coordinates; wherein the coordinates of the j-th contour point in the new contour point set P in the polar coordinate system are (ρ j ,θ j );

[0129] Perform median filtering on the polar radius ρ of all contour points in the new contour point set P to obtain a new contour point set P′; where the coordinates of the j-th point in the new contour point set P in the polar coordinate system are (ρ′ j ,θ j ).

[0130] All contour points in the new contour point set P′ are converted from polar coordinates to plane rectangular coordinates to obtain a new contour point set after filtering.

[0131] The median filter is used to filter the polar radius ρ of the contour points in the polar coordinate system. The contour calculated by this method is smoother.

[0132] The embodiment of the present invention provides a system for automatically and quickly recording the bladder contour in an ultrasound image. Figure 4 As shown, including:

[0133] Image input module 1, used to execute S1, input the grayscale image of ultrasound examination;

[0134] Binarization module 2, used to execute S2, binarize the grayscale image to obtain a binary image;

[0135] The corrosion and expansion module 3 is used to execute S3, corrode and expand the binary image to obtain an eroded and expanded image;

[0136] a center point determination module 4, configured to execute S4 and use the geometric center of the eroded and dilated image as the center point;

[0137] A contour point search module 5 is used to execute S5, searching for a contour point set in the eroded and dilated image based on the center point;

[0138] A center point redetermining module 6 is configured to execute S6, take the arithmetic mean center of all contour points in the contour point set as a new center point and return to step S5;

[0139] Iterative execution module 7, used for iteratively executing S5 to S6 until the new center point converges;

[0140] A filtering module 8 is configured to execute S7, filtering a new contour point set found in the eroded and dilated image based on the converged new center point;

[0141] The tracing module 9 is configured to execute S8, tracing the bladder contour on the eroded and dilated image based on the filtered new contour point set.

[0142] The step S2, binarizing the grayscale image to obtain a binary image, comprises:

[0143] Get the binarization threshold;

[0144] Based on the binarization threshold, the grayscale image is binarized to obtain a binary image.

[0145] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. A processor executes the computer program to implement any of the above methods.

[0146] An embodiment of the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement any one of the above methods.

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

Claims

1. A method for automatically and quickly recording the bladder contour in an ultrasound image, characterized in that: include: S1, input ultrasound grayscale image; S2, binarizing the grayscale image to obtain a binary image; S3, corroding and dilating the binary image to obtain a corroded and dilated image; S4, taking the geometric center of the eroded and dilated image as the center point; S5. Based on the center point, find the contour point set in the eroded and dilated image; S6, taking the arithmetic mean center of all contour points in the contour point set as the new center point and returning to step S5; S7, iteratively execute S5 to S6 until the new center point converges; S8, filtering the new contour point set found in the eroded and dilated image based on the new center point after convergence; S9. Based on the filtered new contour point set, trace the bladder contour on the eroded and dilated image.

2. The method for automatically and quickly recording the bladder contour using ultrasound images according to claim 1, wherein: The step S2, binarizing the grayscale image to obtain a binary image, comprises: Get the binarization threshold; Based on the binarization threshold, the grayscale image is binarized to obtain a binary image.

3. The method for automatically and quickly recording the bladder contour using ultrasound images according to claim 2, wherein: The obtaining of a binarization threshold value includes: Traverse 0 to 255. Each time you traverse, use the traversed value as the grayscale value h. Substitute the grayscale value h into the total complexity calculation formula to calculate the total complexity C(h); After the traversal is completed, the maximum total complexity C will be calculated max As the binarization threshold; The total complexity calculation formula is as follows: C(h)=f1(h)+f2(h) Where C(h) is the total complexity, f1(h) is the cumulative complexity of grayscale values 1 to h, f2(h) is the cumulative complexity of grayscale values (h+1) to 255, fth is the cumulative frequency ratio of grayscale values 1 to h, (1-fth) is the cumulative frequency ratio of grayscale values (h+1) to 255, pii(i) is the statistical frequency ratio of grayscale value i in the grayscale image, which indicates the probability of grayscale i appearing in the image, P(i) is the statistical frequency of grayscale value in the grayscale image, m*n is the size of the grayscale image, eps is the minimum error value close to 0, and P is the grayscale frequency matrix obtained by calculating the grayscale histogram of the grayscale image.

4. The method for automatically and quickly recording the bladder contour using ultrasound images according to claim 1, wherein: The step S3, corroding and dilating the binary image to obtain a corroded and dilated image, includes: Based on a 3*3 all-1 matrix, the binary image is corroded; Based on a 7*7 all-1 matrix, the eroded binary image is expanded to obtain the eroded and expanded image.

5. The method for automatically and quickly recording the bladder contour using ultrasound images according to claim 1, wherein: The step S5, searching for a set of contour points in the eroded and dilated image based on the center point, comprises: With the center point as the pole O, a polar coordinate system is established in the eroded and dilated image; Establish a ray starting from the pole O; the angle formed by the ray and the polar axis of the polar coordinate system is θ; The ray rotates 360 degrees counterclockwise with the pole O as the center. As the ray rotates, the angle θ increases at a fixed step size. Starting from the extreme point O of the ray, candidate points are taken on the ray with a fixed step size Δρ; the coordinates of the i-th candidate point in polar coordinates are (ρ i ,θ i ), ρ i =ρ i-1 +Δρ,θ i =θ i-1 ; The coordinates of the i-1th candidate point in polar coordinates are (ρ i-1 ,θ i-1 ); The candidate points are converted from polar coordinates to plane rectangular coordinates; the plane rectangular coordinates of the i-th candidate point on the eroded and dilated image are (x i ,y i ); The pixel value of the i-th candidate point on the eroded and dilated image is I i ; Traverse the candidate points in sequence until the condition l is met i+2 +l i+1 +l i -l i-1 -l i-2 >3, the corresponding candidate point is used as the contour point on ray i; I i+2 , I i+1 , I i-1 , I i-2 are the pixel value of the i+2th candidate point on the eroded and dilated image, the pixel value of the i+1th candidate point on the eroded and dilated image, the pixel value of the i-1th candidate point on the eroded and dilated image, and the pixel value of the i-2th candidate point on the eroded and dilated image; Find the contour points on all rays and form a contour point set.

6. The method for automatically and quickly recording the bladder contour using ultrasound images according to claim 5, wherein: The step S8, filtering the new contour point set found in the eroded and dilated image based on the converged new center point, comprises: All the contour points in the new contour point set P are converted from plane rectangular coordinates to polar coordinates; wherein the coordinates of the j-th contour point in the new contour point set P in the polar coordinate system are (ρ j ,θ j ); Perform median filtering on the polar radius ρ of all contour points in the new contour point set P to obtain a new contour point set P′; where the coordinates of the j-th point in the new contour point set P in the polar coordinate system are (ρ′ j ,θ j ). All contour points in the new contour point set P′ are converted from polar coordinates to plane rectangular coordinates to obtain a new contour point set after filtering.

7. An automatic and rapid tracing system for bladder contours using ultrasound images, characterized in that: include: An image input module, configured to execute S1 and input a grayscale image of ultrasound examination; A binarization module is used to execute S2, binarize the grayscale image to obtain a binary image; The erosion and dilation module is used to execute S3, erode and dilate the binary image to obtain an eroded and dilated image; a center point determination module, configured to execute S4 and use the geometric center of the eroded and dilated image as the center point; A contour point search module is used to execute S5 and search for a contour point set in the eroded and dilated image based on the center point; a center point redetermining module, configured to execute S6, take the arithmetic mean center of all contour points in the contour point set as a new center point and return to step S5; An iterative execution module, configured to iteratively execute S5 to S6 until a new center point converges; A filtering module, configured to execute S7, filtering a new set of contour points found in the eroded and dilated image based on the converged new center point; The tracing module is used to execute S8 and trace the bladder contour on the eroded and dilated image based on the filtered new contour point set.

8. The automatic and rapid tracing system for bladder contours using ultrasound images according to claim 7, wherein: The step S2, binarizing the grayscale image to obtain a binary image, comprises: Get the binarization threshold; Based on the binarization threshold, the grayscale image is binarized to obtain a binary image.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 6.

10. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 6.