An image recognition method and system for urinary system stones
Through endoscopic image processing and multispectral feature fusion technology, real-time identification of urinary stone components and generation of precise laser parameters is solved, and the problems of insufficient identification of stone components and lack of laser gravel parameters in the existing technology are solved, improving the accuracy and safety of diagnosis and treatment.
Patent Information
- Application Number
- CN202510460401.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-14
AI Technical Summary
The prior art cannot accurately identify the composition of urinary stones in real time during surgery, lacks precise laser lithotripsy parameter optimization for different composition and size of stones, and insufficient processing of interference factors in endoscopic image processing, which affects the accuracy and safety of diagnosis and treatment.
The dynamic video stream of the stone area is obtained through the endoscopic image acquisition module, and the light compensation process is performed to eliminate vascular interference and reflection. The stone characteristics are separated based on multi-spectral feature fusion and adaptive texture analysis. The stone type is identified using the decision tree model, and the frequency-energy combination parameters of the laser lithotrip are generated based on the stone type and contour, and the laser pulse emission timing is controlled in real time.
It realizes rapid and accurate identification of stone types, improves the effect of laser gravel, reduces damage to surrounding tissues, improves the safety and adaptability of the surgery, and ensures accurate treatment of different stones during the operation.
Smart Images

Figure CN119993466B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing and intelligent diagnosis. More specifically, the present invention relates to an image recognition method and system for urinary system stones. Background Art
[0002] In the field of diagnosis and treatment of urinary system stones, traditional methods for stone composition analysis mainly rely on laboratory tests after the stones are discharged, such as chemical analysis, infrared spectroscopy analysis, etc. These methods not only take a long time and cannot provide real-time stone composition information during the operation, but also cannot directly judge the composition of the stones that have not been discharged. In terms of stone treatment, especially in the application of laser lithotripsy technology, currently, it mainly relies on doctors' experience to set the frequency and energy parameters of the laser, lacking precise matching for different stone compositions and sizes, which may lead to poor lithotripsy effect or unnecessary damage to surrounding tissues. In addition, in the field of endoscopic image processing of the existing technology, there are no effective real-time processing means for problems such as vascular interference and reflection in the stone area, affecting the accuracy and reliability of stone recognition.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the existing technology: inability to accurately identify the stone composition in real time during the operation, lack of precise optimization of laser lithotripsy parameters for stone composition and size, and insufficient processing of interference factors in endoscopic image processing. These problems limit the accuracy and safety of the diagnosis and treatment of urinary system stones. Summary of the Invention
[0004] The present invention provides an image recognition method for urinary system stones, including:
[0005] S1. Obtain a dynamic video stream of the urinary system stone area through an endoscopic image acquisition module, and extract the current frame image containing the stone contour;
[0006] S2. Perform vascular interference elimination and reflection suppression processing on the current frame image through a light compensation module to generate an enhanced stone main body image;
[0007] S3. Based on a multi-spectral feature fusion module, separate the yellowish spectral features of uric acid stones and the grayish-white spectral features of calcium stones from the stone main body image, and calculate the color distribution dispersion degree on the stone surface;
[0008] S4. Based on an adaptive texture analysis module, perform multi-angle texture energy detection on the stone surface using a direction-sensitive convolutional kernel to generate a calcification crystal density coefficient;
[0009] S5. Input the color distribution dispersion and the calcification crystal density coefficient into the stone composition decision tree model, and output a stone type identifier, which includes uric acid stones, calcium oxalate stones, and calcium phosphate stones;
[0010] S6. According to the stone type identifier and the three-dimensional projected area of the stone contour, generate the frequency-energy combination parameters of the laser lithotripter through the dynamic energy matching module, and control the laser pulse emission timing in real time.
[0011] Further, the step S2 includes:
[0012] S21. Use a hemoglobin absorption spectrum filter to eliminate the red interference in the blood vessel area of the image, and its filtering wavelength range is 580 - 620 nm;
[0013] S22. Perform polarization light reflection suppression processing on the filtered image, and dynamically adjust the compensation matrix weight by calculating the pixel saturation difference value in the specular reflection area;
[0014] S23. According to the edge sharpness difference between the stone and the surrounding tissues, use an adaptive contrast stretching algorithm to enhance the boundary of the stone body.
[0015] Further, the calculation method of the color distribution dispersion in the step S3 is:
[0016] S31. Extract the data of the a* channel (red-green axis) and the b* channel (yellow-blue axis) in the stone area in the CIELab color space;
[0017] S32. For the yellow feature of uric acid stones, calculate the coefficient of variation of the pixel values of the b* channel in the stone area:
[0018] ;
[0019] Wherein, is the standard deviation of the b* channel, is the mean value of the b* channel;
[0020] S33. For the gray-white feature of calcium stones, calculate the joint dispersion of the a* channel and the b* channel:
[0021] ;
[0022] Wherein, is the standard deviation of the a* channel, is the mean value of the a* channel;
[0023] S34. Weighted sum and as the color distribution dispersion.
[0024] Further, the generation process of the calcification crystal density coefficient in step S4 includes:
[0025] S41. Construct a directional Gabor filter bank with calcification characteristics along four directions of 0°, 45°, 90°, and 135° respectively;
[0026] S42. Perform multi-directional filtering on the stone surface image, and extract the energy peak values of the filtering responses in each direction:
[0027] ;
[0028] wherein, is the Gabor kernel function in the direction, and
[0029] is the stone surface image;
[0030] S43. Calculate the ratio of the variance to the mean of the energy peak values as the calcification crystal density coefficient.
[0031] Further, the construction method of the stone composition decision tree model is as follows:
[0032] S51. The first-level decision node judges whether the color distribution dispersion exceeds the calcium stone threshold. If not, it is classified as a uric acid stone;
[0033] S52. The second-level decision node divides the interval of the calcification crystal density coefficient. When the coefficient > 0.7, it is classified as a calcium phosphate stone, otherwise it is classified as a calcium oxalate stone;
[0034] S53. Dynamically adjust the decision tree node threshold according to the feedback of the intraoperative real-time collected stone disintegration rate.
[0035] Further, the generation logic of the frequency-energy combination parameter in step S6 includes:
[0036] S61. Establish a mapping table of stone type and basic energy. Among them, the uric acid stone corresponds to the low-frequency and low-energy mode, the calcium oxalate stone corresponds to the medium-frequency and medium-energy mode, and the calcium phosphate stone corresponds to the high-frequency and high-energy mode;
[0037] ;
[0038] wherein, A is the current stone projection area, is the reference area (5 mm²), is the empirical coefficient;
[0039] S63. Multiply the basic energy value by the compensation coefficient to generate the final laser output energy.
[0040] Further, the dynamic threshold adjustment method in step S53 includes:
[0041] S71. During the laser action, capture the maximum splash velocity of the stone fragments through the high-speed camera module ;
[0042] S72. When is lower than the expected value, proportionally increase the classification threshold of the calcification crystal density coefficient;
[0043] S73. When the velocity of the fragmented pieces fails to reach the standard for three consecutive times, trigger the retraining process of the decision tree model.
[0044] Further, the weighted summation formula in step S34 is:
[0045] ;
[0046] where is the weight coefficient of , is the weight coefficient of , and , are determined according to the color feature distribution difference of uric acid / calcium stones in the urinary stone sample library.
[0047] Further, the construction formula of the directional Gabor kernel function is:
[0048] ;
[0049] where and are the coordinate values after coordinate transformation, is the ellipticity, is the standard deviation, is the wavelength, is the phase shift.
[0050] Further, it further includes an intraoperative safety monitoring module:
[0051] S101. Calculate the minimum distance between the laser action area and the ureteral wall in real time, and trigger laser locking when the distance < 2 mm;
[0052] S102. Analyze the amount of melanin production in the image through the tissue carbonization detection sub-module, and dynamically reduce the energy output;
[0053] S103. When it is detected that the blood turbulence interference exceeds the safety threshold, start the pulse interval extension protection mechanism.
[0054] The above embodiments of the present invention have at least the following beneficial effects: Through multi-spectral feature fusion and adaptive texture analysis technology, the present invention can accurately separate the characteristics of uric acid stones and calcium stones, accurately calculate the dispersion degree of the surface color distribution of stones and the calcification crystal density coefficient, and then realize the rapid and accurate identification of stone types. Combining with the three-dimensional projected area of the stone contour, it can generate accurate frequency-energy combination parameters for the laser lithotripter and control the emission timing of laser pulses in real time, thereby improving the effect of laser lithotripsy, reducing damage to surrounding tissues, and enhancing the safety and effectiveness of the surgery.
[0055] In addition, the present invention also has good intraoperative adaptability and safety. Through the dynamic energy matching module, the laser parameters can be adjusted in real time according to the stone type and size to meet the treatment requirements of different stones. At the same time, the intraoperative safety monitoring module can monitor the distance between the laser action area and the ureteral wall in real time, analyze the interference of blood turbulence and tissue carbonization, and take protective measures in time to further reduce the surgical risk and ensure the safety of patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the drawings, several embodiments of the present invention are shown by way of example and not limitation, wherein:
[0057] Figure 1 It is a schematic flow chart of an image recognition method for urinary system stones provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are given only to enable those skilled in the art to better understand and then implement the present invention, and do not limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to be able to convey the scope of the present invention fully to those skilled in the art.
[0059] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, equipment, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms: completely hardware, completely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0060] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.
[0061] The following refers to Figure 1 , Figure 1The flowchart of the image recognition method for urinary system stones provided by an embodiment of the present invention is shown as follows. Figure 1 As shown, an image recognition method 100 for urinary system stones includes:
[0062] S1. Obtain a dynamic video stream of the urinary system stone area through an endoscopic image acquisition module, and extract the current frame image containing the stone contour;
[0063] S2. Perform blood vessel interference elimination and specular reflection suppression processing on the current frame image through a light compensation module to generate an enhanced stone main body image;
[0064] S3. Based on a multi-spectral feature fusion module, separate the yellowish spectral features of uric acid stones and the grayish-white spectral features of calcium stones from the stone main body image, and calculate the color distribution dispersion degree on the stone surface;
[0065] S4. Based on an adaptive texture analysis module, perform multi-angle texture energy detection on the stone surface using a direction-sensitive convolutional kernel to generate a calcification crystal density coefficient;
[0066] S5. Input the color distribution dispersion degree and the calcification crystal density coefficient into a stone composition decision tree model, and output a stone type identifier, where the identifier includes uric acid stones, calcium oxalate stones, and calcium phosphate stones;
[0067] S6. According to the stone type identifier and the three-dimensional projected area of the stone contour, generate frequency-energy combination parameters of a laser lithotripter through a dynamic energy matching module, and real-time control the laser pulse emission timing.
[0068] It should be noted that in the present invention, first, a dynamic video stream of the urinary system stone area is obtained through an endoscopic image acquisition module, and the current frame image containing the stone contour is extracted. Here, the endoscopic image acquisition module refers to a device specifically used to obtain internal images of the urinary system, which can capture the dynamic changes in the stone area in real time. Such a module usually includes a high-definition camera, a light source, and an image transmission system, and can transmit the images of the stone area to the processing system in the form of a video stream. The current frame image refers to an image at a specific moment extracted from the dynamic video stream, which contains the contour information of the stone and is the basic data for subsequent processing.
[0069] Specifically, the resolution of the endoscopic image acquisition module should be no less than 1920×1080 pixels to ensure that the detailed features of the stone can be clearly captured. The light source usually adopts a cold light source with a wavelength range between 400 - 700 nanometers to ensure the brightness and contrast of the image. When extracting the current frame image, the system will identify the contour of the stone through an image analysis algorithm, which can be based on edge detection techniques such as the Canny edge detection algorithm to accurately extract the boundary of the stone. In addition, the frame rate of the dynamic video stream should be no less than 30 frames per second to ensure that the changes of the stone at different positions and angles can be captured.
[0070] Preferably, to improve the accuracy of stone contour extraction, the endoscopic lens can be automatically calibrated before image acquisition to eliminate lens distortion. At the same time, multi-modal image fusion technology can be adopted to combine endoscopic images with ultrasonic images to further enhance the visualization effect of the stone. When extracting the current frame image, in addition to the Canny edge detection algorithm, a convolutional neural network (CNN) in deep learning can also be used for contour extraction to improve the accuracy and robustness of the extraction. In addition, to adapt to different surgical environments, the endoscopic image acquisition module can also be equipped with adjustable light source intensity and color temperature to optimize the image quality.
[0071] In some embodiments, step S2 includes:
[0072] S21. Use a hemoglobin absorption spectrum filter to eliminate the red interference in the vascular area of the image, and its filtering wavelength range is 580 - 620 nm;
[0073] S22. Perform polarization light reflection suppression processing on the filtered image, and dynamically adjust the compensation matrix weight by calculating the pixel saturation difference value in the specular reflection area;
[0074] S23. According to the edge sharpness difference between the stone and the surrounding tissues, use an adaptive contrast stretching algorithm to enhance the boundary of the main body of the stone.
[0075] It should be noted that in step S2, the illumination compensation module processes the current frame image to eliminate vascular interference and reflection, and at the same time enhance the boundary of the main body of the stone. Here, the illumination compensation module refers to an image processing unit that optimizes the image through specific algorithms to improve the visibility of the stone area. Specifically, this module includes three sub-steps: First, use a hemoglobin absorption spectrum filter to eliminate the red interference in the vascular area; second, perform polarization light reflection suppression processing on the filtered image; finally, enhance the boundary of the main body of the stone through an adaptive contrast stretching algorithm. These processing steps work together to make the stone clearer in the image for subsequent analysis.
[0076] Specifically, the function of the hemoglobin absorption spectrum filter is to remove the red interference in the vascular area of the image. Its filtering wavelength range is 580 - 620 nanometers because hemoglobin has a strong absorption effect on light within this wavelength range. The polarized light reflection suppression process calculates the pixel saturation difference value in the specular reflection area and dynamically adjusts the compensation matrix weights to reduce the impact of reflected light on the image. The adaptive contrast stretching algorithm enhances the boundary of the stone body based on the edge sharpness difference between the stone and the surrounding tissues, making the stone more prominent in the image. The setting of these parameters and the application of the algorithms are all aimed at improving the image quality and providing a better basis for the identification and analysis of stones.
[0077] Preferably, when performing hemoglobin absorption spectrum filtering, the filtering wavelength range can be adjusted according to different surgical environments and stone types to achieve the best filtering effect. For example, in some cases, the wavelength range can be extended to 570 - 630 nanometers to more comprehensively cover the absorption peak of hemoglobin. In the polarized light reflection suppression process, multi-angle polarized light detection technology can be used to capture the reflected light from different angles, thereby more accurately calculating the pixel saturation difference value. In addition, the adaptive contrast stretching algorithm can dynamically adjust the stretching parameters according to the size and shape of the stone to better highlight the stone boundary. These refined operation steps and alternative solutions can further improve the image processing effect and enhance the accuracy of stone identification.
[0078] In some embodiments, the calculation method of the color distribution dispersion degree in step S3 is as follows:
[0079] S31. Extract the a* channel (red - green axis) and b* channel (yellow - blue axis) data of the stone area in the CIELab color space;
[0080] S32. For the yellow feature of uric acid stones, calculate the coefficient of variation of the pixel values of the b* channel within the stone area:
[0081] ;
[0082] where, is the standard deviation of the b* channel, is the mean value of the b* channel;
[0083] S33. For the gray - white feature of calcium stones, calculate the joint dispersion degree of the a* channel and the b* channel:
[0084] ;
[0085] where, is the standard deviation of the a* channel, is the mean value of the a* channel;
[0086] S34. Take and weighted summation is used as the color distribution dispersion degree.
[0087] It should be noted that in step S3, the calculation of the color distribution dispersion degree is based on the color characteristics of the stone, and the purpose is to distinguish uric acid stones and calcium stones. The CIELab color space here is a color space defined by the International Commission on Illumination (CIE), which can accurately describe the three-dimensional characteristics of colors. Among them, the a* channel represents the red-green axis, and the b* channel represents the yellow-blue axis. By extracting the a* and b* channel data of the stone area in the CIELab color space, the color characteristics of the stone can be analyzed. For the yellow characteristic of uric acid stones, the coefficient of variation of the b* channel is calculated to evaluate the dispersion degree of the yellow distribution; for the gray-white characteristic of calcium stones, the combined dispersion degree of the a* channel and the b* channel is calculated to comprehensively evaluate the dispersion degree of the gray-white distribution. Finally, these two dispersion degrees are weighted and summed to obtain the comprehensive color distribution dispersion degree for subsequent stone type judgment.
[0088] Specifically, the extraction of the a* and b* channel data in the CIELab color space is completed through image processing algorithms, which can convert the RGB image into the CIELab color space. For the yellow characteristic of uric acid stones, the coefficient of variation is calculated by dividing the standard deviation of the b* channel by its mean and then multiplying by 100%, which reflects the relative dispersion degree of the yellow pixel values. For the gray-white characteristic of calcium stones, the combined dispersion degree is calculated by weighted summation of the ratios of the standard deviations and means of the a* channel and the b* channel, which comprehensively considers the changes in red-green and yellow-blue. In practical applications, the means and standard deviations of the a* and b* channels can be calculated through image analysis software or custom algorithms, and the settings and calculation methods of these parameters are conventional techniques in the field of image processing.
[0089] Preferably, when calculating the color distribution dispersion degree, the weight coefficient can be dynamically adjusted according to the data in the stone sample library. For example, if the yellow characteristic of uric acid stones in the sample library is more prominent, the weight of the coefficient of variation of the b* channel can be appropriately increased. In addition, in order to improve the extraction accuracy of color characteristics, a noise filtering step can be added in the image preprocessing stage, and methods such as Gaussian filtering or median filtering are used to remove the random noise in the image. In practical applications, other color characteristics, such as brightness information, can also be combined to further enhance the ability to distinguish stone types. These refined operation steps and alternative solutions can improve the accuracy and robustness of the calculation of the color distribution dispersion degree, thereby better supporting the identification of stone types.
[0090] In some embodiments, the generation process of the calcification crystal density coefficient in step S4 includes:
[0091] S41. Construct a directional Gabor filter bank with calcification characteristics along four directions of 0°, 45°, 90°, and 135° respectively;
[0092] S42. Perform multi-directional filtering on the stone surface image and extract the energy peaks of the filtering responses in each direction:
[0093] ;
[0094] Among them, is the Gabor kernel function in the direction, and
[0095] is the stone surface image;
[0096] It should be noted that in step S4, the generation process of the calcified crystal density coefficient is realized through multi-directional texture energy detection. The direction-sensitive convolution kernel here refers to a mathematical tool that can detect the texture features in a specific direction in an image and is usually used in the field of image analysis and processing. By constructing a directional Gabor filter bank with calcification characteristics, the stone surface image can be filtered in multiple directions, and the texture energy peaks in each direction can be extracted. These energy peaks reflect the distribution of calcified crystals on the stone surface. Furthermore, by calculating the ratio of the variance to the mean of the energy peaks, the calcified crystal density coefficient is obtained, which is used for subsequent stone type judgment.
[0097] Specifically, the directional Gabor filter bank is constructed along four directions of 0°, 45°, 90°, and 135°. These directions can comprehensively cover the texture features on the stone surface. The Gabor filter is a linear filter, and its kernel function has directionality and frequency selectivity, which can effectively extract the local texture information in the image. When applying the Gabor filter, first, the stone surface image needs to be filtered to extract the filtering responses in each direction. Then, by calculating the energy peaks of these responses, the texture intensity on the stone surface is evaluated. The calculation of the energy peak is obtained by summing the squares of each pixel value in the filtered response image, which reflects the significance of the texture in a specific direction. Finally, by calculating the ratio of the variance to the mean of these energy peaks, the calcified crystal density coefficient is obtained, and this coefficient can quantify the distribution density of calcified crystals on the stone surface.
[0098] Preferably, when constructing the directional Gabor filter, the parameters of the filter, such as wavelength, standard deviation, and ellipticity, can be adjusted according to the size and texture characteristics of the stone. For example, for smaller stones, shorter wavelengths and smaller standard deviations can be used to improve the detection ability of detailed textures. In addition, when calculating the energy peak, a multi-scale Gabor filter bank can be adopted to extract the texture energies at different scales respectively, and then these energies are fused to more comprehensively reflect the texture characteristics of the stone surface. In practical applications, other texture analysis methods, such as local binary pattern (LBP) features, can also be combined to further enhance the description ability of the stone surface texture. These refined operation steps and alternative solutions can improve the accuracy and robustness of the calculation of the calcified crystal density coefficient, thus better supporting the identification of stone types.
[0099] In some embodiments, the stone composition decision tree model is constructed as follows:
[0100] S51. The first-level decision node determines whether the color distribution dispersion exceeds the calcium stone threshold. If not, it is classified as a uric acid stone;
[0101] S52. The second-level decision node divides the calcified crystal density coefficient into intervals. When the coefficient > 0.7, it is classified as a calcium phosphate stone; otherwise, it is classified as a calcium oxalate stone;
[0102] S53. According to the feedback of the real-time stone disintegration rate collected during the operation, the decision tree node threshold is dynamically adjusted.
[0103] It should be noted that the construction of the stone composition decision tree model is based on two key features, namely the color distribution dispersion and the calcified crystal density coefficient. The decision tree is a common classification model that classifies data through a series of decision nodes. In the present invention, the decision tree model determines the type of stone through two main decision nodes. The first-level decision node uses the color distribution dispersion to distinguish between uric acid stones and calcium stones because uric acid stones usually have a lower color distribution dispersion, while calcium stones are relatively higher. The second-level decision node further subdivides the calcium stones according to the calcified crystal density coefficient, classifying them into calcium oxalate stones and calcium phosphate stones. In addition, the decision tree model can also dynamically adjust the decision tree node threshold according to the feedback of the real-time stone disintegration rate collected during the operation to adapt to different surgical situations and stone characteristics.
[0104] Specifically, the first-level decision node of the decision tree model sets a threshold for the color distribution dispersion. When the color distribution dispersion is lower than this threshold, the stone is classified as a uric acid stone; otherwise, it is classified as a calcium stone. The further classification of calcium stones is completed by the second-level decision node, which is based on the interval division of the calcified crystal density coefficient. When the calcified crystal density coefficient is greater than 0.7, the stone is classified as a calcium phosphate stone; otherwise, it is classified as a calcium oxalate stone. These thresholds and interval divisions are obtained based on a large amount of experimental data and clinical experience, and can effectively distinguish different types of stones. In addition, the dynamic adjustment mechanism of the decision tree model is achieved by monitoring the disintegration rate of the stone under the action of the laser. If the disintegration rate is lower than the expected value, it indicates that the current classification may be inaccurate, and the threshold of the decision tree node needs to be adjusted to improve the classification accuracy.
[0105] Preferably, in order to improve the accuracy and adaptability of the decision tree model, more features and sample data can be introduced during the model training stage. For example, in addition to the color distribution dispersion and the calcified crystal density coefficient, features such as the shape, size, and surface texture of the stone can also be considered to construct a more comprehensive decision tree model. In the dynamic adjustment mechanism, in addition to monitoring the stone disintegration rate, other feedback information such as the laser energy consumption and the degree of stone fragmentation can also be combined to comprehensively judge whether the threshold of the decision tree node needs to be adjusted. In addition, machine learning algorithms such as ID3, C4.5, or CART can be used for the training of the decision tree model. These algorithms can automatically optimize the structure and threshold settings of the decision tree according to the training data. In practical applications, the decision tree model can also be updated and optimized regularly to adapt to the changing clinical needs and stone characteristics.
[0106] In some embodiments, the generation logic of the frequency-energy combination parameter in step S6 includes:
[0107] S61. Establish a mapping table of stone type and basic energy: Uric acid stone corresponds to a low-frequency and low-energy mode (8Hz, 0.8J), calcium oxalate stone corresponds to a medium-frequency and medium-energy mode (12Hz, 1.2J), and calcium phosphate stone corresponds to a high-frequency and high-energy mode (15Hz, 1.5J);
[0108] S62. Calculate the energy compensation coefficient according to the projected area of the stone contour in the three-dimensional reconstruction model:
[0109] ;
[0110] where A is the projected area of the current stone, is the reference area (5mm²), is the empirical coefficient;
[0111] S63. Multiply the basic energy value by a compensation coefficient to generate the final laser output energy.
[0112] It should be noted that the generation logic of the frequency - energy combination parameters in step S6 is to optimize the working parameters of the laser lithotripter based on the stone type and the three - dimensional projected area of the stone contour. Here, the frequency - energy combination parameters refer to the combination of the emission frequency of laser pulses and the energy of each pulse during the operation of the laser lithotripter. By establishing a mapping table of stone type and basic energy, different basic energy modes can be set according to different stone types. At the same time, calculate the energy compensation coefficient according to the three - dimensional projected area of the stone contour to adjust the laser output energy, so as to achieve precise laser lithotripsy for stones of different sizes and types.
[0113] Specifically, the mapping table of stone type and basic energy is a preset table that matches the stone type with the corresponding laser frequency and energy parameters. For example, uric acid stones correspond to the low - frequency and low - energy mode (8Hz, 0.8J), calcium oxalate stones correspond to the medium - frequency and medium - energy mode (12Hz, 1.2J), and calcium phosphate stones correspond to the high - frequency and high - energy mode (15Hz, 1.5J). These parameters are set according to the physical properties of the stones and clinical experience, and can effectively break the corresponding types of stones. When calculating the energy compensation coefficient, first determine the projected area of the stone contour in the three - dimensional reconstruction model, and then calculate the compensation coefficient according to the formula. The reference area (5mm²) and the empirical coefficient (0.2) in the formula are obtained based on experimental data and clinical experience, and are used to adjust the laser energy to adapt to stones of different sizes.
[0114] Preferably, in order to further optimize the effect of laser lithotripsy, the parameters in the basic energy mapping table can be fine - tuned according to the specific position and shape of the stone. For example, for stones close to the ureteral wall, the laser energy can be appropriately reduced to reduce damage to surrounding tissues. When calculating the energy compensation coefficient, more factors can be introduced, such as the hardness of the stone and the individual differences of the patient, to more precisely adjust the laser energy. In addition, real - time image feedback and the doctor's operation experience can be combined to dynamically adjust the frequency and energy of the laser to achieve the best lithotripsy effect. In practical applications, the laser lithotripter can be equipped with an intelligent control system to automatically adjust the laser parameters according to the stone type and size, improving the safety and efficiency of the operation.
[0115] In some embodiments, the dynamic threshold adjustment method of step S53 includes:
[0116] S71. During the laser action, capture the maximum splash velocity of the stone fragments through the high - speed camera module ;
[0117] S72. When When it is lower than the expected value, proportionally increase the classification threshold of the calcification crystal density coefficient;
[0118] S73. When the fragment velocity fails to meet the standard for three consecutive times, trigger the retraining process of the decision tree model.
[0119] It should be noted that the dynamic threshold adjustment method in step S53 optimizes the classification threshold of the decision tree model based on the maximum splash velocity of the stone fragments. The high-speed camera module here is a device capable of capturing images at a high frame rate, used to monitor the splash situation of the stone fragments under the action of the laser in real time. By analyzing the maximum splash velocity of the fragments, it can be judged whether the classification of the current decision tree model is accurate. If the splash velocity is lower than the expected value, it indicates that the current classification may be inaccurate, and the classification threshold of the calcification crystal density coefficient needs to be adjusted. When the fragment velocity fails to meet the standard for multiple consecutive times, trigger the retraining process of the decision tree model to adapt to different stone characteristics and surgical conditions.
[0120] Specifically, the frame rate of the high-speed camera module should be not less than 1000 frames per second to ensure that the splash process of the fragments can be accurately captured. The maximum splash velocity of the fragments is calculated by analyzing the image sequence captured by the high-speed camera module. Usually, image recognition algorithms are used to track the movement trajectory of the fragments and calculate their velocity. The classification threshold of the calcification crystal density coefficient is set based on a large amount of experimental data and clinical experience, and the initial value can be adjusted according to the stone type and surgical conditions. For example, if the maximum splash velocity of the fragments is lower than the expected value, it indicates that the current calcification crystal density coefficient may be too high, and the classification threshold needs to be appropriately reduced. The specific number of times that the fragment velocity fails to meet the standard for multiple consecutive times can be set according to the actual situation, such as 3 times or 5 times, to ensure the reliability of the adjustment of the decision tree model.
[0121] Preferably, in order to improve the accuracy and adaptability of the dynamic threshold adjustment, multi-view shooting technology can be introduced into the high-speed camera module to capture the splash situation of the fragments from different angles to reduce the error caused by the perspective deviation. When adjusting the classification threshold of the calcification crystal density coefficient, other feedback information, such as the consumption of laser energy and the degree of stone fragmentation, can be combined for comprehensive judgment. In addition, the retraining process of the decision tree model can adopt machine learning algorithms, such as random forest or gradient boosting tree, etc. These algorithms can automatically optimize the structure and threshold settings of the decision tree according to new data. In practical applications, the decision tree model can also be updated and optimized regularly to adapt to the changing clinical needs and stone characteristics.
[0122] In some embodiments, the weighted summation formula in step S34 is:
[0123] ;
[0124] Among them, is the weight coefficient of is the weight coefficient of and are determined according to the difference in the color feature distribution of uric acid / calcium stones in the urinary stone sample library.
[0125] It should be noted that the weighted summation formula in step S34 is used to synthesize the yellow feature of uric acid stones and the gray-white feature of calcium stones to obtain an index that comprehensively reflects the dispersion degree of the stone color distribution. The weighted summation here is a mathematical operation method that combines multiple feature values into a comprehensive value by assigning different weights to different features. The weight coefficients ( and ) reflect the importance of different features in the comprehensive index, and their values are determined according to the difference in the color feature distribution of uric acid stones and calcium stones in the urinary stone sample library. This method of weighted summation can more accurately reflect the color features of stones, thereby improving the accuracy of stone type identification.
[0126] Specifically, the color distribution dispersion degree is obtained by weighted summation of the yellow feature of uric acid stones (coefficient of variation of the b* channel) and the gray-white feature of calcium stones (joint dispersion of the a* channel and the b* channel). In practical applications, the values of the weight coefficients and can be adjusted according to the statistical data in the stone sample library. For example, if the yellow feature of uric acid stones in the sample library is more prominent, the value of can be appropriately increased; conversely, if the gray-white feature of calcium stones is more important, the value of can be increased. The determination of these weight coefficients can be automatically optimized according to the sample data through machine learning algorithms such as linear regression or support vector machine. In addition, the result of the weighted summation can be used as a feature value and input into the subsequent decision tree model for stone type classification.
[0127] Preferably, in order to further improve the accuracy and robustness of the calculation of the color distribution dispersion degree, more color features can be introduced into the weighted summation formula. For example, in addition to the a* and b* channels, the features of the L* channel (luminance channel) can also be considered to more comprehensively describe the color information of the stones. When determining the weight coefficients, the method of cross-validation can be adopted, and the weight coefficients can be adjusted through multiple experiments to find the optimal combination. In addition, the features of other color spaces (such as RGB or HSV) can be combined to further enhance the ability to describe the stone color. In practical applications, the weight coefficients can be dynamically adjusted according to different stone types and surgical conditions to meet different identification requirements.
[0128] In some embodiments, the construction formula of the directional Gabor kernel function is as follows:
[0129] ;
[0130] where and are the coordinate values after coordinate transformation, is the ellipticity, is the standard deviation, is the wavelength, is the phase shift.
[0131] It should be noted that the construction formula of the directional Gabor kernel function is used to generate filters with specific directions and frequencies to extract the texture features on the surface of the stone. The Gabor kernel function here is a linear filter, whose design inspiration comes from the human visual system and can effectively capture the local texture information in the image. The parameters in the formula include the coordinate values after coordinate transformation ( and ), ellipticity, standard deviation, wavelength, and phase shift. These parameters jointly determine the shape and characteristics of the Gabor filter. By adjusting these parameters, Gabor filters applicable to different directions and frequencies can be generated for multi-directional and multi-scale texture analysis of the stone surface image.
[0132] Specifically, the construction process of the Gabor kernel function includes the following steps: First, determine the center frequency and direction of the filter, which determine the sensitivity of the filter to textures with specific frequencies and directions. Then, select appropriate standard deviation and ellipticity to control the spatial expansion and shape of the filter. The standard deviation determines the bandwidth of the filter, and the ellipticity affects the directionality of the filter. Finally, set the phase shift to adjust the response characteristics of the filter. In practical applications, according to the texture characteristics of the stone surface, appropriate parameter combinations can be selected to generate an optimal Gabor filter bank. For example, for fine and dense textures, smaller standard deviation and higher center frequency can be selected; for thick and sparse textures, larger standard deviation and lower center frequency can be selected.
[0133] Preferably, in order to improve the extraction effect of the Gabor filter on the texture features of the stone surface, a filter bank with multiple scales and multiple directions can be adopted. Specifically, a set of Gabor filters can be generated at different scales, and each set of filters covers different direction and frequency ranges to comprehensively capture the texture information of the stone surface. In addition, other texture analysis methods, such as Local Binary Pattern (LBP) or Gray Level Co-occurrence Matrix (GLCM), can be combined to further enhance the description ability of the texture features of the stone surface. In practical applications, the parameters of the Gabor filter can be dynamically adjusted according to the specific type of the stone and the surgical requirements to achieve the best texture feature extraction effect. These refined operation steps and alternative solutions can improve the accuracy and robustness of stone recognition, thus better supporting subsequent diagnosis and treatment.
[0134] In some embodiments, it further includes an intraoperative safety monitoring module:
[0135] S101. Calculate the minimum distance between the laser action area and the ureteral wall in real time, and trigger laser locking when the distance < 2 mm;
[0136] S102. Analyze the amount of melanin generation in the image through the tissue carbonization detection sub-module and dynamically reduce the energy output;
[0137] S103. When it is detected that the blood turbulence interference exceeds the safety threshold, start the pulse interval extension protection mechanism.
[0138] It should be noted that the setting of the intraoperative safety monitoring module is to monitor the surgical environment in real time during the laser lithotripsy process to ensure the safety of the surgery. Here, the intraoperative safety monitoring module is an integrated monitoring system that uses multiple sensors and image analysis technologies to detect key parameters such as the distance between the laser action area and the ureteral wall, tissue carbonization, and blood turbulence interference in real time. When these parameters exceed the safety threshold, the system will automatically take corresponding protection measures, such as laser locking, energy reduction, or pulse interval extension, to prevent damage to the surrounding tissues.
[0139] Specifically, the intraoperative safety monitoring module includes the following three sub-modules: First, it calculates the minimum distance between the laser action area and the ureteral wall in real time, which is achieved through an image analysis algorithm. When the distance is less than 2 millimeters, the system will trigger the laser locking mechanism to avoid damage to the ureteral wall by the laser. Second, the tissue carbonization detection sub-module dynamically adjusts the laser energy output by analyzing the melanin generation amount in the image. When signs of tissue carbonization are detected, the system will automatically reduce the laser energy to reduce thermal damage. Finally, the blood turbulence interference detection sub-module monitors the blood flow situation. When the blood turbulence interference exceeds the safety threshold, the system will activate the pulse interval extension protection mechanism to ensure the safety of the surgical procedure. The setting of these parameters and the monitoring mechanism are based on a large amount of experimental data and clinical experience, which can effectively guarantee the safety and effectiveness of the surgery.
[0140] Preferably, in order to further improve the accuracy and reliability of the intraoperative safety monitoring module, three-dimensional reconstruction technology can be introduced in the real-time distance calculation to more accurately measure the distance between the laser action area and the ureteral wall. In addition, the tissue carbonization detection sub-module can be combined with spectral analysis technology to more accurately judge the degree of tissue carbonization by detecting changes in light absorption at specific wavelengths. For blood turbulence interference detection, Doppler ultrasound technology can be introduced to monitor the blood flow velocity and direction in real time, so as to more accurately evaluate the blood turbulence situation. In practical applications, these monitoring modules can also be integrated with an intelligent control system to achieve automated surgical safety monitoring and protection, further reducing the surgical risk and ensuring patient safety.
[0141] The above-described embodiments of the present invention have the following beneficial effects: The present invention obtains the dynamic video stream of the urinary system stone area in real time through the endoscopic image acquisition module, and extracts the current frame image containing the stone contour, providing accurate data for subsequent processing. The light compensation module eliminates vascular interference and reflection, enhances the boundary of the stone body, and improves the image quality. The multi-spectral feature fusion module separates the yellowish spectral features of uric acid stones and the grayish-white spectral features of calcium stones, calculates the color distribution dispersion, and provides a color feature basis for stone type recognition. The adaptive texture analysis module uses a direction-sensitive convolutional kernel to detect the texture energy of the stone surface from multiple angles, generates a calcification crystal density coefficient, further enriches the stone feature information, and improves the recognition accuracy. The stone composition decision tree model outputs a stone type identifier according to the color distribution dispersion and the calcification crystal density coefficient, realizing the rapid and accurate classification of stone types. The dynamic energy matching module generates the frequency-energy combination parameters of the laser lithotripter according to the stone type identifier and the three-dimensional projected area of the stone contour, and controls the laser pulse emission timing in real time, realizing the precise matching and real-time adjustment of the laser lithotripsy parameters, improving the lithotripsy effect, reducing the damage to surrounding tissues, and enhancing the safety and effectiveness of the operation. At the same time, the intraoperative safety monitoring module monitors key parameters such as the distance between the laser action area and the ureteral wall, tissue carbonization, and blood turbulence interference in real time. When these parameters exceed the safety threshold, the system automatically takes corresponding protection measures, such as laser locking, energy reduction, or pulse interval extension, effectively ensuring the safety of the operation and reducing the risk of damage to surrounding tissues.
[0142] Further, the storage medium of the embodiment of the present application stores program instructions capable of implementing all the above methods. Among them, the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, or terminal devices such as computers, servers, mobile phones, and tablets.
[0143] The above description is only some preferred embodiments of the present invention and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the embodiments of the present invention.
Claims
1. An image recognition method for urinary system stones, characterized in that, Including the following steps: Obtain a dynamic video stream of the urinary system stone area through an endoscopic image acquisition module, and extract the current frame image containing the stone contour; Perform vascular interference elimination and specular reflection suppression processing on the current frame image through a light compensation module to generate an enhanced stone main body image; Extract the yellow spectral features of uric acid stones and the gray-white spectral features of calcium stones from the enhanced stone main body image, and then calculate the color distribution dispersion degree on the surface of the stone main body; Adopt a direction-sensitive convolutional kernel to perform multi-angle texture energy detection on the surface of the stone main body to generate a calcification crystal density coefficient; Input the color distribution dispersion degree and the calcification crystal density coefficient into a stone composition decision tree model, and output a stone type identifier, where the stone types include uric acid stones, calcium oxalate stones, and calcium phosphate stones; According to the stone type identifier and the three-dimensional projected area of the stone contour, generate the frequency energy combination parameters of a laser lithotripter through a dynamic energy matching module, and real-time control the laser pulse emission timing; The color distribution dispersion degree is obtained through the following method: Extract the a* channel data and b* channel data of the stone area in the CIELab color space; among them, the a* channel data is the red-green axis data, and the b* channel data is the yellow-blue axis data; For the yellow feature of uric acid stones, calculate the coefficient of variation of the pixel values of the b* channel in the stone area; ; Among them, is the standard deviation of the b* channel, is the mean value of the b* channel, is the coefficient of variation of the pixel values of the b* channel within the stone area; Based on the gray-white feature of calcium stones, calculate the joint dispersion degree of the a* channel and the b* channel; ; Among them, is the standard deviation of the a* channel, is the mean value of the a* channel, is the joint dispersion of the a* channel and the b* channel; The coefficient of variation of the pixel values of the b* channel within the stone area and the joint dispersion of the a* channel and the b* channel are weighted and summed as the color distribution dispersion.
2. The method according to claim 1, characterized in that, The process of performing vascular interference elimination and specular reflection suppression processing on the current frame image through the light compensation module to generate an enhanced stone main body image includes the following steps: Based on the current frame image, use a hemoglobin absorption spectrum filter to eliminate the red interference in the vascular area of the image to obtain a filtered image, where the filtering wavelength range is 580 - 620 nm; Perform polarized light specular reflection suppression processing on the filtered image, calculate the pixel saturation difference value in the specular reflection area, and then dynamically adjust the compensation matrix weight; According to the pixel saturation difference value between the stone and the surrounding tissues, use an adaptive contrast stretching algorithm to enhance the boundary of the stone main body.
3. The method according to claim 1, characterized in that The calcification crystal density coefficient is generated through the following steps: Construct a directional Gabor filter bank with calcification characteristics along four directions of 0°, 45°, 90°, and 135° respectively; Perform multi-directional filtering on the stone surface image, and extract the energy peak values of the filtering responses in each direction, as shown in the following formula: ; Among them, is the Gabor kernel function in the direction, is the peak energy in the Calculate the ratio of the variance to the mean value of the energy peak values, and use the ratio as the calcification crystal density coefficient.
4. The method according to claim 1, wherein The stone composition decision tree model is optimized through the following steps: The first-level decision node judges whether the color distribution dispersion degree exceeds the calcium stone threshold. If not, it is classified as a uric acid stone; The second-level decision node divides the interval of the calcification crystal density coefficient. When the coefficient > 0.7, it is classified as a calcium phosphate stone, otherwise it is classified as a calcium oxalate stone; According to the feedback of the intraoperative real-time collected stone disintegration rate, dynamically adjust the decision tree node threshold.
5. The method according to claim 1, characterized in that, The frequency energy combination parameters, that is, the combination of the pulse frequency and the energy parameters, are obtained through the following method: Establish a mapping table between stone types and basic energies, where uric acid stones correspond to low-frequency and low-energy modes, calcium oxalate stones correspond to medium-frequency and medium-energy modes, and calcium phosphate stones correspond to high-frequency and high-energy modes; Calculate the energy compensation coefficient according to the projected area of the stone contour in the three-dimensional reconstruction model: ; where A is the current projected area of the calculus, is the reference area (5 mm²), is the empirical coefficient, is the energy compensation coefficient; Multiply the basic energy value by the compensation coefficient to generate the final laser output energy.
6. The method according to claim 5, wherein Dynamically adjust the decision tree node threshold according to the feedback of the real-time stone disintegration rate during the operation, including the following steps: During the laser action, capture the maximum splash speed of the stone fragments through the high-speed camera module; When the maximum splash speed is lower than the expected value, proportionally increase the classification threshold of the calcification crystal density coefficient; When the speed of the fragments fails to meet the standard for 3 consecutive times, trigger the retraining process of the decision tree model.
7. The method according to claim 1, characterized in that, The weighted summation is expressed as follows: ; Among them, is 's weight coefficient, is 's weight coefficient, , is determined according to the difference in the color feature distribution of uric acid / calcium stones in the urinary stone sample library, represents the weighted summation result.
8. The method according to claim 3, wherein The directional Gabor kernel function is expressed as: ; Among them, and are the coordinate values after coordinate transformation, is the ellipticity, is the standard deviation, is the wavelength, is the phase shift.
9. An image recognition system for urinary system stones, characterized in that, including: A data acquisition module that obtains the dynamic video stream of the urinary system stone area through the endoscope image acquisition module and extracts the current frame image containing the stone contour; A light compensation module that performs blood vessel interference elimination and specular reflection suppression processing on the current frame image to generate an enhanced stone main body image; A spectral feature fusion module that extracts the yellow-like spectral features of uric acid stones and the grayish-white-like spectral features of calcium stones from the enhanced stone main body image, and then calculates the color distribution dispersion degree on the surface of the stone main body; An adaptive texture analysis module that uses a direction-sensitive convolutional kernel to perform multi-angle texture energy detection on the surface of the stone main body to generate a calcification crystal density coefficient; An identification module that inputs the color distribution dispersion degree and the calcification crystal density coefficient into the stone composition decision tree model and outputs a stone type identifier, where the stone types include uric acid stones, calcium oxalate stones, and calcium phosphate stones; According to the stone type identifier and the three-dimensional projected area of the stone contour, generate the frequency energy combination parameters of the laser lithotripter through the dynamic energy matching module and control the laser pulse emission timing in real time; The color distribution dispersion degree is obtained through the following method: Extract the a* channel data and b* channel data of the stone area in the CIELab color space; among them, the a* channel data is the red-green axis data, and the b* channel yellow-blue axis data is the yellow-blue axis data; Calculate the coefficient of variation of the pixel values of the b* channel in the stone area for the yellow characteristics of uric acid stones; ; Among them, is the standard deviation of the b* channel, is the mean value of the b* channel, is the coefficient of variation of the pixel values of the b* channel within the stone area; Calculate the joint dispersion degree of the a* channel and the b* channel based on the grayish-white characteristics of calcium stones; ; Among them, is the standard deviation of the a* channel, is the mean value of the a* channel, is the joint dispersion of the a* channel and the b* channel; The coefficient of variation of the pixel values of the b* channel within the stone area and the joint dispersion of the a* channel and the b* channel are weighted and summed as the color distribution dispersion.
Citation Information
Patent Citations
Intelligent lithotripsy system
CN110811826A
Urinary calculus ultrasonic image processing method, medium and system
CN117669334A