Intelligent image analysis system and method for urinary system calculus detection

By combining the grayscale processing of ultrasound images and urine pH value in urinary stone detection, the threshold is adjusted, and the problem of insufficient detection accuracy in the prior art is solved, achieving more accurate and flexible stone detection.

CN119515874AInactive Publication Date: 2025-02-25THE AFFILIATED HOSPITAL OF XUZHOU MEDICAL UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411927061.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-02-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, in the detection of urinary stones, the image gray value threshold cannot be flexibly adjusted, resulting in the boundary between the stone area and the surrounding tissues and insufficient detection accuracy.

Method used

Urinary system images were collected by ultrasound equipment, RGB value extraction and grayscale processing were performed, combined with urine pH, and the threshold was adjusted using the root mean square contrast and pH value of grayscale to improve the accuracy of stone detection.

Benefits of technology

It realizes more accurate, flexible and intelligent stone detection, improves detection accuracy, and can adjust the threshold according to different urine pH values ​​to adapt to the detection of different types of stones.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515874A_ABST
    Figure CN119515874A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent image analysis system and method for urinary system calculus detection, relates to the technical field of intelligent image systems for urinary system calculus detection, and is used for solving the dynamic adjustment of an ultrasonic image gray scale fixed value. More accurate, flexible and intelligent calculus detection is realized by combining the gray processing of the urinary system ultrasonic image, the boundary judgment of the root mean square contrast and the influence of the urine pH value on the calculus type. Through fusion of multi-modal information, dynamic adjustment of a threshold value, calculus type identification capability and automatic processing capability, the detection precision can be improved, and the method can be applied to clinical application of urinary system calculus detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and more specifically, to an intelligent imaging method for detecting urinary system stones. Background Art

[0002] Urinary stones (such as kidney stones, bladder stones and urethral stones) are common urinary system diseases. In severe cases, they can cause symptoms such as pain, hematuria, urinary tract infection, and may even lead to renal damage. With the development of medical imaging technology, the diagnosis and treatment management of urinary stones have gradually become digital and intelligent, and intelligent image analysis technology has played an increasingly important role in the detection of urinary stones. With the continuous advancement of technology, the application of intelligent image analysis in the diagnosis and treatment of urinary stones will become more and more extensive. In the future, AI technology may be more accurate and intelligent, capable of real-time stone monitoring and dynamic analysis, and even combined with genetic, medical history and other information to tailor the most appropriate treatment plan for each patient.

[0003] The prior art has the following deficiencies:

[0004] In the past, during intelligent image analysis for urinary stone detection, the grayscale value set after the image was adjusted could not adjust the grayscale value threshold according to different situations, resulting in unclear boundaries between the stone area and the surrounding tissue part, and the inability to adjust the threshold according to different types of stones, making it impossible to detect stones more accurately, flexibly and intelligently.

[0005] In view of the above problems, the present invention proposes a solution. Summary of the invention

[0006] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides an intelligent image analysis method for urinary stone detection to solve the problems raised in the above-mentioned background technology.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] The intelligent image analysis method for detecting urinary system stones comprises the following steps:

[0009] Step S1, save the image generated by the ultrasonic device through the reflected sound wave data into a standard color image format, and save the values ​​of the three channels of red, green and blue for each pixel as a digital image file for image processing extraction, traverse each pixel and extract the RGB value, and save it in the format of (R, G, B) for further analysis or processing.

[0010] Step S2: Perform grayscale processing on the digital signals of the collected urinary system ultrasound images. Calculate the grayscale value by weighted averaging the pixel values of the red, green, and blue channels, determine the stone area based on the grayscale value, and extract the stone area of the urinary system.

[0011] Step S3: Through the root mean square contrast of the grayscale values within the area, determine whether the boundary is clear based on the root mean square contrast of the grayscale values, and determine the possible types of stones according to the pH value of the urine.

[0012] Step S4: And determine how to adjust the threshold based on the root mean square contrast of the grayscale values and the pH value. In a preferred embodiment, step S1 includes the following content:

[0013] Save the image generated by the ultrasonic device from the reflected acoustic wave data as a standard color image format, and save the values of the three channels of red, green, and blue included in each pixel as a digital image file for image processing extraction. Traverse each pixel and extract the RGB values, and save them in the format of (R, G, B) for further analysis or processing later.

[0014] In a preferred embodiment, step S2 includes the following content:

[0015] When processing the RGB image, convert the image to a grayscale image, calculate the grayscale value based on the weighted average of the RGB three channels, and obtain a grayscale image by calculating the weighted average value of all pixels;

[0016] The weighted average calculation formula for the grayscale value G(x,y) is: G(x,y) = α×R(x,y) + θ×G(x,y) + β×B(x,y);

[0017] By setting an appropriate threshold, distinguish the stone area from other areas. Stones have a higher grayscale value in the ultrasound image, so set a grayscale value threshold to distinguish the stone area. The grayscale value of the stone is higher, and use an automatic thresholding algorithm to determine the boundary of the stone area. For each pixel, when its grayscale value is greater than a certain set threshold, it is determined as the stone area, otherwise it is the background area. Set a threshold T, and the segmentation rule is: G(x,y) ≥ T is the stone area, G(x,y) < T is the background area;

[0018] And assign values to the stone area and the background area respectively. Generate a binary image through the thresholding result, which is called a binary mask. It represents the position of the stone area in the image. The size of the mask image is the same as the original image. Through the mask image, extract the stone area from the original image, and other areas will become black.

[0019] In a preferred embodiment, step S3 includes the following content:

[0020] The binary image obtained above contains several pixels with gray values ​​of G1, G2, ...G N , where N is the number of pixels in the area, and the formula for calculating the root mean square contrast is: RMS

[0021] RMS in this area Contrast A higher value indicates that the area has a more obvious structural boundary or a larger contrast. Contrast Low, the contrast of the area is not obvious or the boundaries are not clear;

[0022] The type of stones that appear is basically determined based on the pH value of urine: when the urine is acidic, uric acid stones and cystine stones are formed; when the urine is neutral or alkaline, phosphate stones, calcium oxalate stones and magnesium ammonium phosphate stones are formed.

[0023] In a preferred embodiment, step S4 includes the following contents:

[0024] Set a RMS contrast threshold RMS threshold , then the RMS is higher than the RMS contrast threshold RMS threshold This means that the grayscale changes in the image are large, indicating that the boundary in the area is obvious. In this case, the grayscale value threshold G(PH) does not need to be adjusted, and the RMS contrast is lower than the RMS threshold This means that the image is relatively flat and the grayscale difference is small, so the grayscale value threshold G(PH) in this case needs to be adjusted;

[0025] A linear or nonlinear adjustment strategy can be adopted according to the difference between the RMS contrast value and the threshold value. For example, the threshold value can be adjusted using the following linear formula: G = G0 + ɑ (RMS Contrast -RMS Threshold );

[0026] When RMS Contrast When it is greater than the threshold, the gray threshold changes slightly; when RMS Contrast When it is less than the threshold, the gray threshold is based on the RMS Contrast The difference increases or decreases linearly;

[0027] In acidic urine, the limescale values ​​of uric acid stones and cystine stones are small, so G(PH) should be adjusted down. When the urine is neutral or alkaline, the limescale values ​​of phosphate stones, calcium oxalate stones and magnesium ammonium phosphate stones are large, so G(PH) should be adjusted up.

[0028] By designing a linear relationship, the gray value G can be expressed as a function of pH value using the following formula: G(PH) = a × PH + b;

[0029] Combined with RMS Contrast And pH value, the final adjustment formula of gray value is expressed as: G final =(a×PH+b)+ɑ(RMS Contrast -RMS Threshold ).

[0030] The intelligent image analysis system for urinary stone detection includes: information acquisition module, feature extraction module, data processing module and evaluation and adjustment module.

[0031] Information acquisition module: The ultrasound equipment is used to collect images of the urinary system structure, obtain ultrasound images of different areas, and save the images in a standard color image format, where each pixel consists of the values ​​of three channels: red, green, and blue. The image processing tools and programming languages ​​are used to obtain the RGB value of each pixel in the image, and the pH value of the patient's urine is obtained through urine analysis;

[0032] Feature extraction module: grayscale processing is performed on the digital signals of the collected urinary system ultrasound images, and the grayscale value is obtained by weighted average of the pixel values ​​of the red, green and blue channels. The stone area is determined according to the grayscale value, and the stone area of ​​the urinary system is extracted;

[0033] Data processing module: through the gray value root mean square contrast in the area, judge whether the boundary is clear according to the gray value root mean square contrast, and determine the possible type of stones according to the pH value of urine;

[0034] Evaluation and adjustment module: Determine how to adjust the threshold based on the grayscale root mean square contrast and pH value.

[0035] The effects and advantages of the intelligent image analysis for urinary system stone detection of the present invention: combining the grayscale processing of urinary system ultrasound images, the boundary judgment of the root mean square contrast, and the influence of urine pH value on stone types, more accurate, flexible and intelligent stone detection is achieved. Through the fusion of multimodal information, dynamic adjustment of thresholds, stone type identification capabilities and automated processing capabilities, the detection accuracy can be improved and used for clinical applications of urinary system stone detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 The figure is a schematic diagram of an intelligent image analysis method for detecting urinary system stones according to the present invention.

[0037] Figure 2 The present invention is a schematic diagram of an intelligent image analysis system for detecting urinary stones. DETAILED DESCRIPTION

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

[0039] Example 1

[0040] Figure 1 The present invention provides an intelligent image analysis method for detecting urinary system stones, comprising:

[0041] S1, collect images of the urinary system structure through ultrasound equipment, obtain ultrasound images of different areas, save the images in a standard color image format, where each pixel consists of the values ​​of three channels: red, green, and blue. Use image processing tools and programming languages ​​to obtain the RGB value of each pixel in the image, and obtain the pH value of the patient's urine through urine analysis.

[0042] S2, grayscale processing is performed on the digital signal of the collected urinary system ultrasound image, and the grayscale value is obtained by weighted average of the pixel values ​​of the red, green and blue channels. The stone area is determined according to the grayscale value, and the stone area of ​​the urinary system is extracted.

[0043] S3, through the gray value root mean square contrast in the area, judge whether the boundary is clear according to the gray value root mean square contrast, and determine the type of stones that may appear according to the pH value of the urine.

[0044] S4, and determine how to adjust the threshold based on the grayscale value root mean square contrast and pH value

[0045] The specific implementation is as follows:

[0046] In step S1, the structure of the urinary system is imaged by ultrasound equipment to obtain ultrasound images of different areas, and the images are saved in a standard color image format, where each pixel consists of the values ​​of three channels: red, green, and blue. Image processing tools and programming languages ​​are used to obtain the RGB value of each pixel in the image, and urine analysis is performed to obtain the pH value of the patient's urine, including:

[0047] Ultrasound devices typically generate images from reflected sound wave data to show the structures of the urinary system. These images are usually saved in a standard color image format (such as PNG or JPEG), where each pixel contains the values ​​of three channels (red, green, and blue) (RGB). These images are saved as digital image files such as PNG, JPEG, or TIFF formats and can be imported into image processing tools for subsequent analysis.

[0048] The RGB values ​​of each pixel in an image are usually extracted through image processing tools such as OpenCV, Pillow, etc. These tools allow us to access the pixel data of an image file and read the values ​​of the red (R), green (G), and blue (B) channels of each pixel, iterate over each pixel and extract the RGB value, and save it in the format of (R, G, B) for further analysis or processing.

[0049] For example: (255,0,0) represents red, and (255,255,255) represents white.

[0050] In step S2, grayscale processing is performed on the digital signal of the collected urinary system ultrasound image, and the grayscale value is obtained by weighted average of the pixel values ​​of the red, green and blue channels. The stone area is determined according to the grayscale value, and the stone area of ​​the urinary system is extracted. The specific contents include:

[0051] When processing RGB images, in order to extract the stone area, the image can be converted into a grayscale image. The usual practice is to calculate the grayscale value based on the weighted average of the three RGB channels. By calculating the weighted average of all pixels, a grayscale image can be obtained.

[0052] Weighted average calculation formula:

[0053] The gray value G(x,y)G(x,y) can be calculated by the following formula:

[0054] G(x,y)=α×R(x,y)+θ×G(x,y)+β×B(x,y)

[0055] Among them, α, θ and β are the weighting coefficients of the RGB channels, which are adjusted based on the sensitivity of the human eye to different colors. R(x,y), G(x,y), B(x,y) are the values ​​of the red, green and blue channels of the pixel position (x,y) in the image.

[0056] For example: α = 0.299, θ = 0.587 and β = 0.114 are the common weighting coefficients of the three channels of RGB, then G(x,y) = 0.299 × R(x,y) + 0.587 × G(x,y) + 0.114 × B(x,y)

[0057] By setting an appropriate threshold, the stone area and other areas are distinguished. Stones usually have a relatively high gray value in ultrasonic images, so a gray value threshold can be set to distinguish the stone area.

[0058] Assuming that the gray values of stones are relatively high (because they are usually brighter areas in ultrasonic images), the boundary of the stone area can be determined by manually selecting the threshold or using an automatic thresholding algorithm. For each pixel, if its gray value is greater than a set threshold, it is determined to be in the stone area; otherwise, it is in the background area. Setting a threshold T, the segmentation rule is: if G(x,y)≥T, it is the stone area; if G(x,y)<T, it is the background area.

[0059] Assuming that the gray value range of the ultrasonic image is from 0 to 255, after observing the gray histogram of the image, it is found that the gray values of stones are roughly concentrated between 180 and 255. Therefore, a threshold T = 180 can be selected for segmentation. By comparing with the gray value of each pixel, a binary image is obtained, where the area with a gray value greater than 180 represents the stone.

[0060] For each pixel, if its gray value is greater than a set threshold, the pixel is considered to belong to the stone area; otherwise, the pixel is considered to belong to the background area, and values are assigned to the stone area and the background area respectively. A binary image is generated from the thresholding result, called a binary mask. It represents the position of the stone area in the image. The size of the mask image is the same as that of the original image. In this way, through the mask image, it is clear which areas may contain stones. By this method, the stone area can be extracted from the original image, and other areas will become black.

[0061] Example: The pixel value of the stone area is 255 (white), and the pixel value of this area in the original image will be retained. The pixel value of other areas is 0 (black), and the pixel value of this area in the original image will be set to 0.

[0062] In step S3, according to the root mean square contrast of the gray values within the area, it is judged whether the boundary is clear based on the root mean square contrast of the gray values, and the possible types of stones are determined according to the pH value of the urine. The specific content includes:

[0063] In the binary image obtained above, there are several pixels with gray values G1, G2,... G N , where N is the number of pixels in this area. The calculation formula of the root mean square contrast is as follows:

[0064]

[0065] Among them: G i is the gray value of the i-th pixel in the image.

[0066] α is the average gray value (mean) of the area, and the calculation formula is:

[0067] N is the total number of pixels in the region.

[0068] If the RMS of the area Contrast A higher value means that the gray value of the area changes more, which may mean that the area has a more obvious structural boundary or a larger contrast (for example, the boundary between the stone and the surrounding soft tissue is clear). Contrast A lower value means that the grayscale value of the area changes less, which may mean that the contrast of the area is not obvious or the boundary is not clear.

[0069] The pH of urine is an important factor affecting the formation of stones in urine. Changes in urine pH directly affect the substances dissolved in urine, which in turn affects the formation of different types of stones. The following is a common classification of the types of stones that may appear based on urine pH:

[0070] 1. Acidic urine (pH <7)

[0071] Acidic urine is often associated with the formation of certain types of stones, especially the following:

[0072] 1.1 Uric acid stones. Uric acid stones usually form in an acidic environment. When the pH of urine is low, uric acid (usually present in dissolved form) may precipitate to form stones. The formation of uric acid stones is related to excessive uric acid concentration in urine and strong urine acidity. Excessive uric acid concentration can cause uric acid to precipitate from the solution and form stones.

[0073] 1.2 Cystine stones. Cystine stones also tend to form in an acidic environment. Cystine stones are caused by the hereditary disease cystinuria, which causes excessive concentrations of cystine in the urine. Cystine easily precipitates and forms stones under acidic conditions.

[0074] 2. Neutral urine (pH ≈ 7)

[0075] Neutral urine does not favor the formation of any type of stone, but it may provide a transitional condition for certain stone types. At this time, some dissolved substances in the urine remain dissolved under this condition and are not likely to form stones. Although neutral urine itself is not prone to stone formation, it may also form phosphate stones or calcium oxalate stones under certain disease conditions.

[0076] 3. Alkaline urine (pH>7)

[0077] 3.1 Calcium phosphate stones, calcium phosphate stones are common in alkaline urine, especially dicalcium phosphate stones (CaP). In an alkaline environment, calcium and phosphate easily combine to form calcium phosphate crystals.

[0078] 3.2 Calcium oxalate stones. Although calcium oxalate stones are more easily formed in a neutral or slightly alkaline environment, they can also form in strongly alkaline urine. The formation of calcium oxalate stones is closely related to high concentrations of oxalic acid and calcium, and is usually associated with a high-oxalate diet (such as eating a lot of spinach, nuts, etc.) or hereditary metabolic disorders (such as hyperoxaluria).

[0079] 3.3 Magnesium ammonium phosphate stones (struvite stones), magnesium ammonium phosphate stones (struvite stones) are also usually formed in alkaline urine. The formation of this type of stone is often associated with urinary tract infections (especially urinary tract infections caused by urea-decomposing bacteria such as Klebsiella). Urea-decomposing bacteria decompose urea in urine, releasing ammonia, causing the urine to become alkaline, thereby promoting the formation of magnesium ammonium phosphate crystals.

[0080] That is, when the urine is acidic (pH < 7), uric acid stones and cystine stones may form, and when the urine is neutral or alkaline (pH ≥ 7), phosphate stones, calcium oxalate stones and magnesium ammonium phosphate stones may form.

[0081] In step S4, how to adjust the threshold is determined according to the gray value root mean square contrast and the pH value, and the specific contents include:

[0082] Set a RMS contrast threshold RMS threshold , then if the RMS is higher than the RMS contrast threshold RMS threshold This means that the grayscale changes in the image are large, indicating that the boundary in the area is obvious. In this case, the grayscale value threshold T adjust No adjustment is required, RMS contrast is lower than RMS threshold This means that the image is relatively flat and the grayscale difference is small. In this case, the grayscale value threshold T adjust Needs adjustment.

[0083] A linear or nonlinear adjustment strategy can be used based on the difference between the RMS contrast value and the threshold. For example, the threshold can be adjusted using the following linear formula:

[0084] G=G0+ɑ(RMS Contrast -RMS Threshold )

[0085] in:

[0086] G0 is the initial grayscale threshold.

[0087] ɑ is an adjustment coefficient that controls the speed at which the grayscale threshold changes.

[0088] RMS threshold is the set RMS contrast threshold.

[0089] RMS Contrast is the currently calculated RMS contrast.

[0090] When RMS Contrast When it is greater than the threshold, the gray threshold changes slightly; when RMS Contrast When it is less than the threshold, the gray threshold is based on the RMS Contrast The difference increases or decreases linearly.

[0091] Due to the different pH values, the possible urinary stones may also be different. In acidic urine (pH < 7), the uric acid stones and cystine stones that may be formed have a lower lime value. In this case, T adjust When the urine is neutral or alkaline (pH ≥ 7), phosphate stones, calcium oxalate stones, and magnesium ammonium phosphate stones may form. The lime value is high, so at this time, T adjust Increase.

[0092] For example: for acidic urine, the range of grayscale values ​​is smaller, such as from 50 to 180.

[0093] For neutral or alkaline urine, the range of grayscale values ​​is larger, such as from 180 to 255.

[0094] By designing a linear relationship, the gray value G can be expressed as a function of pH value using the following formula:

[0095] G(pH)=a×PH+b

[0096] Among them, a and b are constants to be determined.

[0097] Set boundary conditions to solve for constants a and b. Assume:

[0098] When pH=8 (neutral or alkaline urine), the grayscale value G should be close to the maximum value (eg, 255).

[0099] When pH=5 (acidic urine), the gray value G should be close to the minimum value (eg, 0).

[0100] When pH=5, the gray value G=0; when pH=8, the gray value G=255

[0101] Thus, G(pH) = 85 × PH-425 is obtained under the setting again.

[0102] Combined with RMS Contrast and pH value, the final adjustment formula of gray value can be expressed as:

[0103] G final =(a×PH+b)+ɑ(RMS Contrast -RMS Threshold )

[0104] Among them, G final Based on pH and RMS Contrast The final grayscale value after common adjustment.

[0105] For example, the current RMS contrast threshold is 0.5, and the calculated RMS contrast is 0.3. The pH value is 6, indicating that the urine is close to acidity. And the above assumption formula G (pH) = 85 × PH-425 is used for calculation:

[0106] Based on the above information, you can adjust the threshold as follows:

[0107] Calculate the grayscale value: Use the known grayscale value adjustment formula G(pH)=85×PH-425. When pH=6, G(6)=85×6-425=510-425=85.

[0108] Adjust RMS contrast: Since the current RMS contrast (0.3) is lower than the threshold (0.5), it means that the image is relatively flat and the grayscale value needs to be adjusted.

[0109] Use the linear adjustment formula G final =(a×PH+b)+ɑ(RMS Contrast -RMS Threshold ), where ɑ is the adjustment coefficient, assuming ɑ=10.

[0110] Since the RMS is below the threshold, the adjustment formula is:

[0111] G final =85+10×(0.3-0.5)=85+10×(-0.2)=85-2=83

[0112] Therefore, the final adjusted grayscale value is 83.

[0113] Example 2

[0114] Figure 2 The invention provides an algorithm-based subway crew scheduling optimization system, which includes an information acquisition module, a feature extraction module, a data processing module and an evaluation and adjustment module.

[0115] Information acquisition module: The ultrasound equipment is used to collect images of the urinary system structure, obtain ultrasound images of different areas, and save the images in a standard color image format, where each pixel consists of the values ​​of three channels: red, green, and blue. Image processing tools and programming languages ​​are used to obtain the RGB value of each pixel in the image, and the pH value of the patient's urine is obtained through urine analysis.

[0116] Feature extraction module: grayscale processing is performed on the digital signals of the collected urinary system ultrasound images, and the grayscale value is obtained by weighted average of the pixel values ​​of the red, green and blue channels. The stone area is determined according to the grayscale value, and the stone area of ​​the urinary system is extracted.

[0117] Data processing module: through the gray value root mean square contrast in the area, judge whether the boundary is clear according to the gray value root mean square contrast, and determine the type of stones that may appear according to the pH value of urine.

[0118] Evaluation and adjustment module: Determine how to adjust the threshold based on the grayscale root mean square contrast and pH value

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

[0120] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0121] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product.

[0122] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application of the technical solution and the invention constraints. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0123] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0124] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0125] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. An intelligent image analysis method for detecting urinary stones, characterized in that: Including the steps: Step S1: Use an ultrasound device to collect images of the urinary system structure, obtain ultrasound images of different regions, save the images in a standard color image format, where each pixel consists of values of three channels: red, green, and blue. Use an image processing tool and programming language to obtain the RGB values of each pixel in the image, and obtain the pH value of the patient's urine through urine analysis; Step S2: Perform grayscale processing on the digital signals of the collected urinary system ultrasound images. Calculate the grayscale value by weighted averaging the pixel values of the red, green, and blue channels, and determine the stone area based on the grayscale value. Extract the stone area of the urinary system; Step S3: Through the root mean square contrast of the grayscale values within the region, judge whether the boundary is clear based on the root mean square contrast of the grayscale values, and determine the possible types of stones according to the pH value of the urine; Step S4: And judge how to adjust the threshold based on the root mean square contrast of the grayscale values and the pH value.

2. The intelligent image analysis method for urinary system stone detection according to claim 1, characterized in that: Save the image generated by the ultrasound device through the reflected acoustic wave data in a standard color image format, and save the values of the three channels of red, green, and blue included in each pixel as a digital image file for image processing and extraction. Traverse each pixel and extract the RGB values, and save them in the format of (R, G, B) for further analysis or processing later.

3. The intelligent image analysis method for urinary system stone detection according to claim 2, characterized in that: When processing the RGB image, convert the image to a grayscale image, calculate the grayscale value based on the weighted average of the RGB three channels, and obtain a grayscale image by calculating the weighted average value of all pixels; The weighted average calculation formula of the grayscale value G(x,y) is: G(x,y) = α×R(x,y) + θ×G(x,y) + β×B(x,y); By setting an appropriate threshold, distinguish the stone area from other areas. Stones have a higher grayscale value in the ultrasound image, so set a grayscale value threshold to distinguish the stone area. Since the grayscale value of the stone is high, use an automatic thresholding algorithm to determine the boundary of the stone area. For each pixel, when its grayscale value is greater than a certain set threshold, it is determined as the stone area, otherwise it is the background area. Set a threshold T, and the segmentation rule is: G(x,y)≥T is the stone area, G(x,y)<T is the background area; And assign values to the stone area and the background area respectively. Generate a binary image through the thresholding result, which is called a binary mask. It represents the position of the stone area in the image. The size of the mask image is the same as the original image. Through the mask image, extract the stone area from the original image, and other areas will become black.

4. The intelligent image analysis method for urinary system stone detection according to claim 3, characterized in that: The binary image obtained above contains several pixels with gray values ​​of G1, G2, ...G N , where N is the number of pixels in the area, and the formula for calculating the root mean square contrast is: RMS in this area Contrast A higher value indicates that the area has a more obvious structural boundary or a larger contrast. Contrast Low, the contrast of the area is not obvious or the boundaries are not clear; The type of stones that appear is basically determined based on the pH value of urine: when the urine is acidic, uric acid stones and cystine stones are formed; when the urine is neutral or alkaline, phosphate stones, calcium oxalate stones and magnesium ammonium phosphate stones are formed.

5. The intelligent image analysis method for detecting urinary system stones according to claim 4, characterized in that: Set a RMS contrast threshold RMS threshold , then the RMS is higher than the RMS contrast threshold RMS threshold This means that the grayscale changes in the image are large, indicating that the boundary in the area is obvious. In this case, the grayscale value threshold G(PH) does not need to be adjusted, and the RMS contrast is lower than the RMS threshold This means that the image is relatively flat and the grayscale difference is small, so the grayscale value threshold G(PH) in this case needs to be adjusted; A linear or nonlinear adjustment strategy can be adopted according to the difference between the RMS contrast value and the threshold value. For example, the threshold value can be adjusted using the following linear formula: G = G0 + ɑ (RMS Contrast -RMS Threshold ); When RMS Contrast When it is greater than the threshold, the gray threshold changes slightly; when RMS Contrast When it is less than the threshold, the gray threshold is based on the RMS Contrast The difference increases or decreases linearly; In acidic urine, the limescale values ​​of uric acid stones and cystine stones are small, so G(PH) should be adjusted down. When the urine is neutral or alkaline, the limescale values ​​of phosphate stones, calcium oxalate stones and magnesium ammonium phosphate stones are large, so G(PH) should be adjusted up. By designing a linear relationship, the gray value G can be expressed as a function of pH value using the following formula: G(PH) = a × PH + b; Combined with RMS Contrast And pH value, the final adjustment formula of gray value is expressed as: G final =(a×PH+b)+ɑ(RMS Contrast -RMS Threshold ).

6. An intelligent image analysis system for detecting urinary system stones, used to implement the intelligent image analysis method for detecting urinary system stones according to any one of claims 1 to 5, characterized in that: include: Information acquisition module, feature extraction module, data processing module and evaluation and adjustment module; Information acquisition module: The ultrasound equipment is used to collect images of the urinary system structure, obtain ultrasound images of different areas, and save the images in a standard color image format, where each pixel consists of the values ​​of three channels: red, green, and blue. The image processing tools and programming languages ​​are used to obtain the RGB value of each pixel in the image, and the pH value of the patient's urine is obtained through urine analysis; Feature extraction module: grayscale processing is performed on the digital signals of the collected urinary system ultrasound images, and the grayscale value is obtained by weighted average of the pixel values ​​of the red, green and blue channels. The stone area is determined according to the grayscale value, and the stone area of ​​the urinary system is extracted; Data processing module: through the gray value root mean square contrast in the area, judge whether the boundary is clear according to the gray value root mean square contrast, and determine the possible type of stones according to the pH value of urine; Evaluation and adjustment module: Determine how to adjust the threshold based on the grayscale root mean square contrast and pH value.

Citation Information

Cited By

  • Intelligent analysis method and system for urinary calculus components

    CN120388009A

  • Urinary calculus component report generation method and system

    CN120412873A