Intelligent recognition method for hepatobiliary and renal calculi based on ultrasonic image

By constructing a stone detection method based on grayscale thresholds and boundary values ​​of ultrasound images, the accuracy problem of stone identification in traditional ultrasound diagnosis is solved, and high-precision stone identification is achieved in noisy environments.

CN122289154APending Publication Date: 2026-06-26CHANGGENTANG TRADITIONAL CHINESE MEDICINE TECHNOLOGY (HANGZHOU) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGGENTANG TRADITIONAL CHINESE MEDICINE TECHNOLOGY (HANGZHOU) CO LTD
Filing Date
2026-03-17
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In traditional ultrasound diagnosis, stone identification relies on physician experience, which is subject to inter-observer variability and noise interference, resulting in poor identification accuracy.

Method used

By acquiring the grayscale values ​​of real-time ultrasound images, establishing organ and boundary thresholds, constructing stone detection values, and combining them with historical boundary values ​​from the database to determine the presence of stones.

Benefits of technology

It improves the accuracy of stone identification, especially in noisy environments, where it can accurately identify stones that are close to organs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289154A_ABST
    Figure CN122289154A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent identification method for hepatobiliary and renal stones based on ultrasound images, belonging to the field of stone identification technology. The method includes the following steps: acquiring an ultrasound image to be detected and marking it as a real-time detection image; obtaining real-time detection grayscale values ​​based on the real-time detection image; obtaining organ grayscale thresholds based on ultrasound images in a database; obtaining real-time organ regions based on the real-time detection grayscale values ​​and organ grayscale thresholds; constructing real-time stone detection values ​​based on the real-time organ regions; obtaining historical normal boundary values ​​based on ultrasound images in a database; obtaining stone boundary thresholds based on the historical normal boundary values; and determining whether gallstones are present based on the real-time stone detection values ​​and stone boundary thresholds. This invention addresses the problem that existing stone identification technologies suffer from poor accuracy due to significant noise in ultrasound images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of stone identification technology, specifically to an intelligent identification method for liver, gallbladder and kidney stones based on ultrasound imaging. Background Technology

[0002] Gallstones and kidney stones are among the most common benign lesions of the digestive and urinary systems in clinical practice. Their incidence is increasing year by year, and the affected population is gradually becoming younger. If they are not detected and intervened in time, they may cause serious complications such as biliary obstruction, hydronephrosis, acute inflammation, or even organ dysfunction, which seriously threaten human health. Therefore, accurate identification and diagnosis of stones are necessary. Ultrasound imaging, with its advantages of being non-invasive, radiation-free, capable of real-time imaging, and low in cost, has become the preferred imaging method for screening and diagnosing liver, gallbladder, and kidney stones. Ultrasound can clearly display the morphology and structure of organs, the location, size, number, and posterior acoustic shadowing of stones. However, traditional ultrasound diagnosis relies heavily on the subjective experience and professional knowledge of radiologists, and there are significant inter-observer variability in image interpretation. Physicians with different years of experience may have inconsistent interpretations of the same image, making it difficult to accurately identify stones. At the same time, ultrasound imaging contains a lot of noise, making automatic identification difficult. In other words, existing stone identification technologies have poor accuracy due to the presence of a lot of noise in ultrasound images. Summary of the Invention

[0003] This invention aims to at least partially solve one of the technical problems in the prior art. It involves acquiring an ultrasound image to be detected and marking it as a real-time detection image; obtaining real-time detection grayscale values ​​based on the real-time detection image; obtaining organ grayscale thresholds based on ultrasound images in a database; obtaining real-time organ regions based on the real-time detection grayscale values ​​and organ grayscale thresholds; constructing real-time stone detection values ​​based on the real-time organ regions; obtaining historical normal boundary values ​​based on ultrasound images in the database; obtaining stone boundary thresholds based on the historical normal boundary values; and determining whether gallstones are present based on the real-time stone detection values ​​and stone boundary thresholds. This addresses the problem that existing stone identification technologies suffer from poor accuracy due to significant noise in ultrasound images.

[0004] To achieve the above objectives, this application provides a method for intelligent identification of hepatobiliary and renal stones based on ultrasound imaging, comprising the following steps: Acquire the ultrasound image to be detected and mark it as a real-time detection image; Real-time detection grayscale values ​​are obtained based on real-time detected images; Organ grayscale thresholds are obtained from ultrasound images within the database; Real-time organ regions are obtained based on real-time detection of grayscale values ​​and organ grayscale thresholds; Real-time stone detection values ​​are constructed based on real-time organ regions; Historical normal boundary values ​​were obtained from ultrasound images in the database. Stone boundary thresholds are obtained based on historical normal boundary values; The presence of gallstones is determined based on real-time stone detection values ​​and stone boundary thresholds.

[0005] Furthermore, obtaining the real-time detection grayscale value based on the real-time detection image includes the following sub-steps: The real-time detected image is converted to grayscale to obtain an image, which is then labeled as a real-time detection grayscale image. The grayscale values ​​of pixels in the real-time detected grayscale image are marked as the real-time detected grayscale values.

[0006] Furthermore, obtaining organ grayscale thresholds based on ultrasound images within the database includes the following sub-steps: Obtain the grayscale values ​​of normal organ pixels in ultrasound images from the database and mark them as historical organ grayscale values; Obtain the grayscale values ​​of the first number of historical organs; A Cartesian coordinate system is established with the historical organ grayscale values ​​as the horizontal axis data and the number of historical organ grayscale values ​​as the vertical axis data, and this system is marked as the organ data coordinate system. Obtain all historical organ grayscale values ​​and their corresponding quantities as coordinate points on the x and y axes, and mark them as organ data coordinate points; Plot all organ data coordinates in the organ data coordinate system.

[0007] Furthermore, obtaining organ grayscale thresholds based on ultrasound images in the database also includes the following sub-steps: Obtain the maximum value of the ordinate among all organ data coordinate points and mark it as the organ data height; Set a length and mark it as the first set length; Create a rectangle on the horizontal axis of the organ data coordinate points with a height equal to the organ data height and a width equal to the first set length, and be able to move left and right. Mark this rectangle as the first judgment rectangle. The total number of historical organ grayscale values ​​corresponding to the organ data coordinate points included within the first judgment rectangle is marked as the first judgment quantity. Mark the range length of historical organ grayscale values ​​as the organ data range; Assuming that the historical organ grayscale values ​​are uniformly distributed within the organ data range, the first judgment quantity at this time is obtained and marked as the first average quantity; Set a first ratio, obtain the product of the first average quantity and the first ratio, and mark it as the first quantity threshold; In the organ data coordinate system, the first judgment rectangle is shifted to the left starting from the rightmost historical organ grayscale value. When the number of first judgments is greater than or equal to the first number threshold, the first judgment rectangle is stopped from moving. The historical organ grayscale value corresponding to the largest horizontal coordinate of the first judgment rectangle at this time is obtained and marked as the organ grayscale threshold.

[0008] Furthermore, obtaining the real-time organ region based on real-time detected grayscale values ​​and organ grayscale thresholds includes the following sub-steps: In the real-time detection grayscale image, real-time detection grayscale values ​​that are less than or equal to the organ grayscale threshold are marked as real-time organ grayscale values; real-time detection grayscale values ​​that are greater than or equal to the organ grayscale threshold are marked as real-time background grayscale values. Obtain the region composed of real-time organ grayscale values ​​and mark it as the real-time initial region; Obtain the region composed of real-time background grayscale values ​​and mark it as the real-time background region; Obtain the largest real-time initial region encompassed by the real-time background region and mark it as the real-time organ region.

[0009] Furthermore, constructing real-time stone detection values ​​based on real-time organ regions includes the following sub-steps: Obtain the real-time outer contour of the organ region and label it as the real-time outer contour; Draw a second number of coordinate points with equal intervals on the real-time outer contour and mark them as real-time contour coordinate points; Starting from a real-time contour coordinate point, line segments are obtained by sequentially connecting adjacent real-time contour coordinate points along the real-time outer contour and marked as real-time connecting line segments; the starting point and ending point of the real-time connecting line segments are marked as real-time starting point and real-time ending point respectively according to the order of connection. Using the real-time start point as the starting point of the vector and the real-time end point as the ending point of the vector, each real-time connecting line segment is converted into a vector and marked as a real-time edge vector; Obtain the angle between adjacent real-time edge vectors and mark it as the real-time stone detection value.

[0010] Furthermore, obtaining historical normal boundary values ​​based on ultrasound images in the database includes the following sub-steps: By treating normal organ ultrasound images in the database as real-time detection images, real-time stone detection values ​​are obtained and marked as historical normal boundary values.

[0011] Furthermore, obtaining the stone boundary threshold based on historical normal boundary values ​​includes the following sub-steps: Obtain the third number of historical normal boundary values; A Cartesian coordinate system is established with historical normal boundary values ​​as the horizontal axis data and the number of historical normal boundary values ​​as the vertical axis data, and this system is marked as the boundary data coordinate system. Obtain all historical normal boundary values ​​and their corresponding quantities as coordinate points on the x and y axes, and mark them as boundary data coordinate points; Plot all boundary data coordinate points in the boundary data coordinate system.

[0012] Furthermore, obtaining the stone boundary threshold based on historical normal boundary values ​​also includes the following sub-steps: Get the maximum value of the ordinate among all boundary data coordinate points and mark it as the boundary data height; Set a length and mark it as the second set length; Create a rectangle on the horizontal axis of the boundary data coordinate points with a height equal to the boundary data height and a width equal to the second set length, and allow it to move left and right. Mark this rectangle as the second judgment rectangle. The total number of historical normal boundary values ​​corresponding to the boundary data coordinate points included within the second judgment rectangle is marked as the second judgment quantity; Mark the range length of historical normal boundary values ​​as the boundary data range; Assuming that the historical normal boundary values ​​are uniformly distributed within the boundary data range, obtain the second judgment quantity at this time and mark it as the second average quantity; Set a second ratio, obtain the product of the second average quantity and the second ratio, and mark it as the second quantity threshold; In the boundary data coordinate system, the second judgment rectangle is shifted to the left from the rightmost historical normal boundary value. When the number of second judgments is greater than or equal to the second quantity threshold, the first judgment rectangle is stopped from moving. The historical normal boundary value corresponding to the largest horizontal coordinate of the second judgment rectangle at this time is obtained and marked as the stone boundary threshold.

[0013] Furthermore, determining whether gallstones are present based on real-time stone detection values ​​and stone boundary thresholds includes the following sub-steps: If a real-time background area appears within the real-time organ area, a signal indicating the presence of stones is emitted. If no real-time background area appears within the real-time organ region, determine whether the real-time stone detection value is greater than the stone boundary threshold. If so, issue a stone presence signal; otherwise, issue a no-stone presence signal.

[0014] The beneficial effects of this invention are as follows: This invention acquires an ultrasound image to be detected and marks it as a real-time detection image; obtains real-time detection grayscale values ​​based on the real-time detection image; obtains organ grayscale thresholds based on ultrasound images in the database; obtains real-time organ regions based on the real-time detection grayscale values ​​and organ grayscale thresholds; constructs real-time stone detection values ​​based on the real-time organ regions; obtains historical normal boundary values ​​based on ultrasound images in the database; obtains stone boundary thresholds based on historical normal boundary values; and determines whether gallstones are present based on the real-time stone detection values ​​and stone boundary thresholds. Its advantage lies in its ability to address noise in ultrasound images and improve the accuracy of stone identification. This invention constructs real-time stone detection values ​​based on real-time organ regions. The advantage of this invention is that the real-time stone detection values ​​can identify stones even when they are close to organs, thus improving the accuracy of stone identification. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating the steps of the method of the present invention; Figure 2 This is a schematic diagram of the organ grayscale threshold of the present invention; Figure 3 This is a schematic diagram of the real-time edge vector of the present invention; Figure 4 This is a schematic diagram of the stone boundary threshold of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] Example 1, please refer to Figure 1 As shown, this application provides a method for intelligent identification of hepatobiliary and renal stones based on ultrasound imaging, including the following steps: Step S1: Obtain the ultrasound image to be detected and mark it as a real-time detection image; the real-time detection image contains the ultrasound image of the organ to be detected, such as the gallbladder.

[0018] Step S2, obtain the real-time detection grayscale value based on the real-time detection image; Step S2 includes the following sub-steps: Step S201: Convert the real-time detection image to grayscale to obtain an image, and mark it as a real-time detection grayscale image; Step S202: Mark the gray values ​​of the pixels in the real-time detected grayscale image as the real-time detected grayscale values.

[0019] Step S3: Obtain organ grayscale thresholds based on ultrasound images in the database; Step S3 includes the following sub-steps: Step S301: Obtain the grayscale values ​​of normal organ pixels in ultrasound images in the database and mark them as historical organ grayscale values; Step S302: Obtain a first number of historical organ grayscale values; in order to obtain the accurate range of historical organ grayscale values, the first number cannot be too small, for example, the first number is 1000; Step S303: Establish a Cartesian coordinate system with the historical organ grayscale values ​​as the horizontal axis data and the number of historical organ grayscale values ​​as the vertical axis data, and mark it as the organ data coordinate system; Step S303: Obtain all historical organ grayscale values ​​and their corresponding quantities as coordinate points on the x and y axes, and mark them as organ data coordinate points; organ data coordinate points are used to better observe the distribution of historical organ grayscale values. Step S304: Plot all organ data coordinate points in the organ data coordinate system.

[0020] Step S305: Obtain the maximum value of the ordinate among all organ data coordinate points and mark it as the organ data height; please refer to [link to relevant documentation]. Figure 2 As shown, the organ data height is 50; Step S306: Set a length, marked as the first set length; the first set length is set to construct the first judgment rectangle, and the first judgment rectangle is for observing the grayscale values ​​of historical organs; therefore, the first set length should not be too large, for example, 1; Step S307: Create a rectangle on the horizontal axis of the organ data coordinate points with a height equal to the height of the organ data and a width equal to the first set length, and mark it as the first judgment rectangle. Step S308: Mark the total number of historical organ grayscale values ​​corresponding to the organ data coordinate points included in the first judgment rectangle as the first judgment quantity. Step S309: Mark the range length of the historical organ grayscale values ​​as the organ data range; Step S310: Assuming that the historical organ grayscale values ​​are uniformly distributed within the organ data range, obtain the first judgment quantity at this time and mark it as the first average quantity; In practical applications, the first average quantity is: (1÷40)×1000=25; where 1 is the first set length, 40 is the range of organ data, and 1000 is the first quantity.

[0021] Step S311: Set a first ratio, obtain the product of the first average number and the first ratio, and mark it as the first number threshold; the first number threshold is set in order to obtain the area with less historical organ gray value distribution, that is, the first number threshold should be small, so the first ratio should be set small, for example, the first ratio is 0.2. In practical applications, the first quantity threshold is: 0.2 × 25 = 5.

[0022] Step S312: In the organ data coordinate system, the first judgment rectangle is shifted to the left from the rightmost historical organ gray value. When the number of first judgments is greater than or equal to the first number threshold, the first judgment rectangle is stopped from moving. The historical organ gray value corresponding to the largest horizontal coordinate of the first judgment rectangle at this time is obtained and marked as the organ gray value threshold. Excludes historical organ gray values ​​that are too small, and then obtains the smallest historical organ gray value. In practical applications, within the organ data coordinate system, the first judgment rectangle is shifted to the left from the rightmost historical organ grayscale value. The shift stops when the number of first judgments is greater than or equal to a first threshold value. (See also...) Figure 2 As shown, the position where the first judgment rectangle stops is obtained. The historical organ grayscale value corresponding to the largest horizontal coordinate of the first judgment rectangle at this time is 44. Therefore, the organ grayscale threshold is 44.

[0023] Step S4: Obtain the real-time organ region based on the real-time detected grayscale value and the organ grayscale threshold; Step S4 includes the following sub-steps: Step S401: In the real-time detection grayscale image, real-time detection grayscale values ​​that are less than or equal to the organ grayscale threshold are marked as real-time organ grayscale values; real-time detection grayscale values ​​that are greater than or equal to the organ grayscale threshold are marked as real-time background grayscale values. Step S402: Obtain the region composed of real-time organ grayscale values ​​and mark it as the real-time initial region; Step S403: Obtain the region composed of real-time background grayscale values ​​and mark it as the real-time background region; Step S404: Obtain the real-time initial region that is largest within the real-time background region and mark it as the real-time organ region; eliminate the interference of noise regions and obtain the region of the gallbladder organ in the image. In practical applications, in real-time detection grayscale images, real-time detection grayscale values ​​less than or equal to 44 are marked as real-time organ grayscale values; real-time detection grayscale values ​​greater than or equal to 44 are marked as real-time background grayscale values.

[0024] Step S5: Construct real-time stone detection values ​​based on real-time organ regions; Step S5 includes the following sub-steps: Step S501: Obtain the outer contour of the real-time organ region and mark it as the real-time outer contour; Step S502: Draw a second number of coordinate points with equal intervals on the real-time outer contour and mark them as real-time contour coordinate points; the real-time contour coordinate points are used to observe the direction of the stone contour; for example, the second number is 30. Step S503: Starting from a real-time contour coordinate point, connect adjacent real-time contour coordinate points sequentially along the real-time outer contour to obtain line segments, which are marked as real-time connecting line segments; mark the starting point and ending point of the real-time connecting line segments as real-time starting point and real-time ending point respectively according to the order of connection. Step S504: Using the real-time start point as the starting point of the vector and the real-time end point as the ending point of the vector, convert each real-time connecting line segment into a vector and mark it as a real-time edge vector. Step S505: Obtain the angle between adjacent real-time edge vectors and mark it as the real-time stone detection value. Because organs appear as circles or ellipses in the image, the real-time stone detection value is small. If there are stones on the side wall of the organ, the real-time stone detection value will change abruptly, that is, the real-time stone detection value is too large. For practical applications, please refer to Figure 3 As shown, a real-time edge vector is obtained. If the angle between adjacent real-time edge vectors is 23°, then the real-time stone detection value is 23°.

[0025] Step S6: Obtain historical normal boundary values ​​based on ultrasound images in the database; Step S6 includes the following sub-steps: Step S601: Treat normal organ ultrasound images in the database as real-time detection images to obtain real-time stone detection values, and mark them as historical normal boundary values; in order to obtain the range of real-time stone detection values ​​when there are no stones.

[0026] Step S7: Obtain the stone boundary threshold based on historical normal boundary values; Step S7 includes the following sub-steps: Step S701: Obtain a third number of historical normal boundary values; in order to obtain the range of historical normal boundary values, the third number should not be set too small, for example, the third number is 500; Step S702: Establish a Cartesian coordinate system with historical normal boundary values ​​as the horizontal axis data and the number of historical normal boundary values ​​as the vertical axis data, and mark it as the boundary data coordinate system; Step S703: Obtain all historical normal boundary values ​​and their corresponding coordinate points (x-coordinate and y-coordinate, respectively), and mark them as boundary data coordinate points; Step S703: Plot all boundary data coordinate points in the boundary data coordinate system.

[0027] Step S704: Obtain the maximum value of the ordinate among all boundary data coordinate points and mark it as the boundary data height; Step S705: Set a length, marked as the second set length; the second set length is set to construct the second judgment rectangle, which is used to observe historical normal boundary values; therefore, the second set length should not be too large, for example, 1; Step S706: Create a rectangle on the horizontal axis of the boundary data coordinate points with a height equal to the boundary data height and a width equal to the second set length, and mark it as the second judgment rectangle. Step S707: Mark the total number of historical normal boundary values ​​corresponding to the boundary data coordinate points included within the second judgment rectangle as the second judgment quantity; Step S708: Mark the range length of historical normal boundary values ​​as the boundary data range; Step S709: Assuming that the historical normal boundary values ​​are uniformly distributed within the boundary data range, obtain the second judgment quantity at this time and mark it as the second average quantity; In practical applications, the second average quantity is: (1÷40)×500=1.25; where 1 is the second set length, 40 is the boundary data range, and 500 is the third quantity.

[0028] Step S710: Set a second ratio, obtain the product of the second average quantity and the second ratio, and mark it as the second quantity threshold; the second quantity threshold is set in order to obtain areas with less historical normal boundary value distribution, that is, the second quantity threshold should be set small, that is, the second ratio should be set small, for example, the second ratio is 0.4. In practical applications, the first quantity threshold is: 0.4 × 1.25 = 5.

[0029] Step S711: In the boundary data coordinate system, the second judgment rectangle is shifted to the left from the rightmost historical normal boundary value. When the second judgment quantity is greater than or equal to the second quantity threshold, the first judgment rectangle is stopped from moving. The historical normal boundary value corresponding to the largest horizontal coordinate of the second judgment rectangle at this time is obtained and marked as the stone boundary threshold. In practical applications, within the boundary data coordinate system, the second judgment rectangle is shifted to the left from the rightmost historical normal boundary value. The movement of the first judgment rectangle stops when the number of judgments exceeds or equals the second threshold value. (See [link to relevant documentation]). Figure 4 As shown, the first judgment rectangle stops at a position where the stone boundary threshold is 48°.

[0030] Step S8: Determine whether gallstones are present based on real-time stone detection values ​​and stone boundary thresholds; Step S8 includes the following sub-steps: Step S801: If a real-time background region appears inside the real-time organ region, a stone presence signal is emitted; for example, from this perspective, the stone is in the middle of the gallbladder. Step S802: If no real-time background area appears inside the real-time organ area, determine whether the real-time stone detection value is greater than the stone boundary threshold. If so, issue a stone presence signal; otherwise, issue a no-stone presence signal. Determine whether the stones overlap at the gallbladder boundary to prevent missed detection of stones in this case. In practical applications, if no real-time background area appears within the real-time organ region, for example, if a real-time stone detection value of 20° is less than the stone boundary threshold of 48°, and if no real-time stone detection value is greater than the stone boundary threshold, then a signal indicating that no stone has been detected is issued.

[0031] Example 2: This application also provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound images are performed to achieve the following functions: acquiring an ultrasound image to be detected and marking it as a real-time detection image; acquiring a real-time detection grayscale value based on the real-time detection image; acquiring an organ grayscale threshold based on ultrasound images in the database; acquiring a real-time organ region based on the real-time detection grayscale value and the organ grayscale threshold; constructing a real-time stone detection value based on the real-time organ region; acquiring historical normal boundary values ​​based on ultrasound images in the database; acquiring a stone boundary threshold based on the historical normal boundary values; and determining whether gallstones are present based on the real-time stone detection value and the stone boundary threshold.

[0032] Furthermore, when the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0033] Example 3: This application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound images provided by the above methods. The method includes: acquiring an ultrasound image to be detected and marking it as a real-time detection image; acquiring a real-time detection grayscale value based on the real-time detection image; acquiring an organ grayscale threshold based on ultrasound images in a database; acquiring a real-time organ region based on the real-time detection grayscale value and the organ grayscale threshold; constructing a real-time stone detection value based on the real-time organ region; acquiring historical normal boundary values ​​based on ultrasound images in a database; acquiring a stone boundary threshold based on the historical normal boundary values; and determining whether gallstones are present based on the real-time stone detection value and the stone boundary threshold.

[0034] Example 4: This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it performs the steps of the above-described intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound images to achieve the following functions: acquiring an ultrasound image to be detected and marking it as a real-time detection image; acquiring a real-time detection grayscale value based on the real-time detection image; acquiring an organ grayscale threshold based on ultrasound images in a database; acquiring a real-time organ region based on the real-time detection grayscale value and the organ grayscale threshold; constructing a real-time stone detection value based on the real-time organ region; acquiring historical normal boundary values ​​based on ultrasound images in a database; acquiring a stone boundary threshold based on the historical normal boundary values; and determining whether gallstones are present based on the real-time stone detection value and the stone boundary threshold.

[0035] Based on the above description of the embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the above technical solutions, in essence or in terms of their contribution to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or certain parts of the embodiments.

[0036] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces. The indirect coupling or communication connection between systems, modules, and units may be electrical, mechanical, or other forms.

[0037] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for intelligent identification of hepatobiliary and renal stones based on ultrasound imaging, characterized in that, Includes the following steps: Acquire the ultrasound image to be detected and mark it as a real-time detection image; Real-time detection grayscale values ​​are obtained based on real-time detected images; Organ grayscale thresholds are obtained from ultrasound images within the database; Real-time organ regions are obtained based on real-time detection of grayscale values ​​and organ grayscale thresholds; Real-time stone detection values ​​are constructed based on real-time organ regions; Historical normal boundary values ​​were obtained from ultrasound images in the database. Stone boundary thresholds are obtained based on historical normal boundary values; The presence of gallstones is determined based on real-time stone detection values ​​and stone boundary thresholds.

2. The intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound imaging according to claim 1, characterized in that, Obtaining real-time detection grayscale values ​​based on real-time detected images includes the following sub-steps: The real-time detected image is converted to grayscale to obtain an image, which is then labeled as a real-time detection grayscale image. The grayscale values ​​of pixels in the real-time detected grayscale image are marked as the real-time detected grayscale values.

3. The intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound imaging according to claim 2, characterized in that, Obtaining organ grayscale thresholds based on ultrasound images from a database includes the following sub-steps: Obtain the grayscale values ​​of normal organ pixels in ultrasound images from the database and mark them as historical organ grayscale values; Obtain the grayscale values ​​of the first number of historical organs; A Cartesian coordinate system is established with the historical organ grayscale values ​​as the horizontal axis data and the number of historical organ grayscale values ​​as the vertical axis data, and this system is marked as the organ data coordinate system. Obtain all historical organ grayscale values ​​and their corresponding quantities as coordinate points on the x and y axes, and mark them as organ data coordinate points; Plot all organ data coordinates in the organ data coordinate system.

4. The intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound imaging according to claim 3, characterized in that, Obtaining organ grayscale thresholds based on ultrasound images from a database also includes the following sub-steps: Obtain the maximum value of the ordinate among all organ data coordinate points and mark it as the organ data height; Set a length and mark it as the first set length; Create a rectangle on the horizontal axis of the organ data coordinate points with a height equal to the organ data height and a width equal to the first set length, and be able to move left and right. Mark this rectangle as the first judgment rectangle. The total number of historical organ grayscale values ​​corresponding to the organ data coordinate points included within the first judgment rectangle is marked as the first judgment quantity. Mark the range length of historical organ grayscale values ​​as the organ data range; Assuming that the historical organ grayscale values ​​are uniformly distributed within the organ data range, the first judgment quantity at this time is obtained and marked as the first average quantity; Set a first ratio, obtain the product of the first average quantity and the first ratio, and mark it as the first quantity threshold; In the organ data coordinate system, the first judgment rectangle is shifted to the left starting from the rightmost historical organ grayscale value. When the number of first judgments is greater than or equal to the first number threshold, the first judgment rectangle is stopped from moving. The historical organ grayscale value corresponding to the largest horizontal coordinate of the first judgment rectangle at this time is obtained and marked as the organ grayscale threshold.

5. The intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound imaging according to claim 4, characterized in that, Obtaining real-time organ regions based on real-time detection of grayscale values ​​and organ grayscale thresholds includes the following sub-steps: In the real-time detection grayscale image, real-time detection grayscale values ​​that are less than or equal to the organ grayscale threshold are marked as real-time organ grayscale values; real-time detection grayscale values ​​that are greater than or equal to the organ grayscale threshold are marked as real-time background grayscale values. Obtain the region composed of real-time organ grayscale values ​​and mark it as the real-time initial region; Obtain the region composed of real-time background grayscale values ​​and mark it as the real-time background region; Obtain the largest real-time initial region encompassed by the real-time background region and mark it as the real-time organ region.

6. The intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound imaging according to claim 5, characterized in that, Constructing real-time stone detection values ​​based on real-time organ regions includes the following sub-steps: Obtain the real-time outer contour of the organ region and label it as the real-time outer contour; Draw a second number of coordinate points with equal intervals on the real-time outer contour and mark them as real-time contour coordinate points; Starting from a real-time contour coordinate point, line segments are obtained by sequentially connecting adjacent real-time contour coordinate points along the real-time outer contour, and these segments are marked as real-time connecting line segments. Mark the starting and ending points of the real-time connecting segments as the real-time starting point and real-time ending point, respectively, according to the order of connection. Using the real-time start point as the starting point of the vector and the real-time end point as the ending point of the vector, each real-time connecting line segment is converted into a vector and marked as a real-time edge vector; Obtain the angle between adjacent real-time edge vectors and mark it as the real-time stone detection value.

7. The intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound imaging according to claim 6, characterized in that, Obtaining historical normal boundary values ​​based on ultrasound images from the database includes the following sub-steps: By treating normal organ ultrasound images in the database as real-time detection images, real-time stone detection values ​​are obtained and marked as historical normal boundary values.

8. The intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound imaging according to claim 7, characterized in that, Obtaining the stone boundary threshold based on historical normal boundary values ​​includes the following sub-steps: Obtain the third number of historical normal boundary values; A Cartesian coordinate system is established with historical normal boundary values ​​as the horizontal axis data and the number of historical normal boundary values ​​as the vertical axis data, and this system is marked as the boundary data coordinate system. Obtain all historical normal boundary values ​​and their corresponding quantities as coordinate points on the x and y axes, and mark them as boundary data coordinate points; Plot all boundary data coordinate points in the boundary data coordinate system.

9. The intelligent identification method for liver, gallbladder and kidney stones based on ultrasound imaging according to claim 8, characterized in that, Obtaining the stone boundary threshold based on historical normal boundary values ​​also includes the following sub-steps: Get the maximum value of the ordinate among all boundary data coordinate points and mark it as the boundary data height; Set a length and mark it as the second set length; Create a rectangle on the horizontal axis of the boundary data coordinate points with a height equal to the boundary data height and a width equal to the second set length, and allow it to move left and right. Mark this rectangle as the second judgment rectangle. The total number of historical normal boundary values ​​corresponding to the boundary data coordinate points included within the second judgment rectangle is marked as the second judgment quantity; Mark the range length of historical normal boundary values ​​as the boundary data range; Assuming that the historical normal boundary values ​​are uniformly distributed within the boundary data range, obtain the second judgment quantity at this time and mark it as the second average quantity; Set a second ratio, obtain the product of the second average quantity and the second ratio, and mark it as the second quantity threshold; In the boundary data coordinate system, the second judgment rectangle is shifted to the left from the rightmost historical normal boundary value. When the number of second judgments is greater than or equal to the second quantity threshold, the first judgment rectangle is stopped from moving. The historical normal boundary value corresponding to the largest horizontal coordinate of the second judgment rectangle at this time is obtained and marked as the stone boundary threshold.

10. The intelligent identification method for liver, gallbladder, and kidney stones based on ultrasound imaging according to claim 9, characterized in that, Determining the presence of gallstones based on real-time stone detection values ​​and stone boundary thresholds includes the following sub-steps: If a real-time background area appears within the real-time organ area, a signal indicating the presence of stones is emitted. If no real-time background area appears within the real-time organ region, determine whether the real-time stone detection value is greater than the stone boundary threshold. If so, issue a stone presence signal; otherwise, issue a no-stone presence signal.