A method and system for real-time image correction of hysteroscope

By grading and comprehensive quality evaluation of real-time hysteroscopic images, the image correction method is automatically selected, which solves the problem of insufficient image quality in hysteroscopic surgery, improves the safety and success rate of the surgery, adapts to different environmental conditions, and improves the The level of automation and intelligence of image processing.

CN118822916BActive Publication Date: 2024-12-24SHANGHAI YODO MEDICAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411307668.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-24
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

The quality of real-time images in hysteroscopy is insufficient, resulting in doctors’ misjudgment and operational errors, increasing surgical risks and patient pain. The existing technology image correction methods have inconsistent effects under different circumstances, making it difficult to meet actual surgical needs.

Method used

By grading the real-time hysteroscopic images, we can obtain the image complexity index and environmental change index, use pre-trained machine learning models to conduct comprehensive quality evaluation, divide low-quality and high-quality windows, and use the image complexity index, environmental change index and Comprehensively use quality to perform fuzzy inference, and automatically select image correction method for correction.

Benefits of technology

Real-time identification and correction of hidden dangers of insufficient image quality, ensure image clarity and richness of details in hysteroscopy, reduce doctors' misjudgment and operational errors, significantly enhance surgical safety and success rate, and improve surgical efficiency and fluency. Adapt to different environmental conditions and improve the automation and intelligence level of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118822916B_ABST
    Figure CN118822916B_ABST
Patent Text Reader

Abstract

The invention discloses a hysteroscope real-time image correction method and system, which specifically relate to the technical field of medical image processing, and comprise the following steps: quality scoring of hysteroscope real-time images, judging image quality risks of acquisition windows, performing abnormal analysis on windows with risks, obtaining image complexity index and environmental change index, substituting into a pre-trained machine learning model, evaluating the comprehensive use quality of the images, dividing the images into low-quality and high-quality windows, judging and executing corresponding image correction operations for the low-quality windows according to the image complexity index, environmental change index and comprehensive use quality; the invention can accurately identify the risks of insufficient image quality, and perform corrections in time, thereby ensuring the clarity and detail richness of images during hysteroscopic surgery, being able to adapt to different surgical environment conditions, effectively managing changes in image quality, and ensuring that high-quality images can still be obtained in complex environments.
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 a hysteroscope real-time image correction method and system. Background Art

[0002] In the modern medical field, hysteroscopy is a common and important minimally invasive surgical method, which uses hysteroscopic equipment to examine and treat the inside of the patient's uterus. During hysteroscopic surgery, the quality of real-time images is crucial to the success of the operation. High-quality images can help doctors diagnose and operate accurately, reducing surgical risks. However, due to the influence of equipment and environmental factors, the real-time images of hysteroscopy may have insufficient quality, such as blurred images, unclear details, poor contrast, etc. These problems may lead to misjudgment and operational errors by doctors, increasing surgical risks and patient pain.

[0003] The image correction methods in the prior art, such as the image correction method based on geometric correction and the image correction method based on image processing, have different applicability and different effects of image correction in different situations. It is a problem that needs to be solved to explore and adopt which image correction method can better meet the needs of the actual surgical process. Therefore, a real-time image correction method and system for hysteroscopy are proposed herein. Summary of the invention

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

[0005] A hysteroscope real-time image correction method comprises the following steps:

[0006] Performing a quality score on the initial image of the hysteroscope real-time image to obtain a quality score of the initial image;

[0007] Based on the quality score of the initial image, it is judged whether the acquisition window of the initial image has a hidden danger of insufficient image quality;

[0008] An abnormal analysis is performed on the acquisition windows with hidden dangers of insufficient image quality to obtain the image complexity index and environmental change index respectively. Then, the image complexity index and environmental change index are substituted into the pre-trained machine learning model to evaluate the comprehensive use quality of the image and obtain the comprehensive use quality coefficient of the image.

[0009] Based on the comprehensive use quality coefficient of the image, the acquisition window is divided into a low-quality window and a high-quality window;

[0010] For low-quality windows, the image correction method is judged based on the image complexity index, environmental change index, and comprehensive usage quality;

[0011] Based on the judgment result of the image correction method, corresponding image correction operations are performed on all initial images of the low-quality window.

[0012] In a preferred embodiment, the steps of performing quality scoring on the initial image of the hysteroscope real-time image to obtain the quality score of the initial image are as follows:

[0013] The real-time hysteroscopic image is obtained as the input image, and then the color image is converted into a grayscale image. The Laplace transform is used to calculate the second-order derivative of the image. The calculation formula is:

[0014] ; is the gray value of the image, and are the second-order derivatives of the image in the x and y directions, is the Laplace operator, and then the variance of the Laplace transform result is calculated using the following formula: ; represents the Laplace value of the i-th pixel in the image, μ represents the average value of the Laplace value, and N represents the total number of pixels in the image. Represents variance calculation, and finally obtains the quality score of the initial image, which is the value of the Laplace transform variance.

[0015] In a preferred embodiment, the logic for judging whether the acquisition window of the initial image has a hidden danger of insufficient image quality based on the quality score of the initial image is:

[0016] The quality scores of all initial images under the target acquisition window are obtained, and then the standard deviation of the quality scores of all initial images is calculated, the quality scores of the initial images are compared with a preset standard quality range, and the standard deviation of the quality scores is compared with a preset standard quality reference threshold. If the quality scores of all initial images are within the preset standard quality range and the standard deviation of the quality scores is less than or equal to the preset standard quality reference threshold, then it is judged that there is no hidden danger of insufficient image quality in the acquisition window of the initial images. If the quality scores of all initial images are not within the preset standard quality range and the standard deviation of the quality scores is less than or equal to the preset standard quality reference threshold, then it is judged that there is a hidden danger of insufficient image quality in the acquisition window of the initial images.

[0017] In a preferred embodiment, the logic for obtaining the image complexity index is:

[0018] Each acquired image in the acquisition window with the potential problem of insufficient image quality is converted into a grayscale image, and the edge density of each image is calculated using an edge detection algorithm. The calculation formula is:

[0019] ; Represents the binary image after edge detection of the kth image, where edge points are 1 and non-edge points are 0. represents the total number of pixels in the kth image, and ED represents the edge density of the image;

[0020] The feature point detection algorithm is used to calculate the feature point density of each image. The calculation formula is: ; represents the number of feature points of the kth image, and FFD represents the density of feature points of the image;

[0021] The image feature point density FFD and the image edge density ED are weightedly summed to obtain the image complexity coefficient, and then the image complexity coefficients of all collected images are averaged to obtain the image complexity index.

[0022] In a preferred embodiment, the logic for obtaining the environmental change index is:

[0023] Each acquired image in the acquisition window with the potential problem of insufficient image quality is used as an input image sequence, and each acquired image is converted into a grayscale image and an HSV image. The average brightness, brightness standard deviation, average hue, and hue standard deviation of each image are calculated respectively, and the texture features of the image are calculated using the grayscale co-occurrence matrix: ; represents the grayscale image of the kth image, represents the gray-level co-occurrence matrix of the k-th image; ; Represents the texture feature vector of the kth image extracted from the gray-level co-occurrence matrix. All eigenvalues ​​of each image are combined into a feature vector. The feature vectors of all images are reduced in dimension using principal component analysis. The reduced feature vectors are clustered using the K-means clustering algorithm. ; represents the clustering results after cluster analysis, It represents the feature vector after PCA dimensionality reduction. Finally, the environmental change index is calculated based on the characteristics of each cluster: ; C represents the number of clusters, γ represents the weight coefficient of cluster variance, δ represents the weight coefficient of the distance of cluster center points, represents the characteristic variance of the cth cluster, It represents the average distance from the cth cluster center to all points, and EVI represents the environmental change index.

[0024] In a preferred embodiment, dividing the acquisition window into a low-quality window and a high-quality window based on the comprehensive quality coefficient of the image means:

[0025] The comprehensive quality coefficient is compared with the preset image acceptance reference threshold. If the comprehensive quality coefficient is greater than or equal to the preset image acceptance reference threshold, the acquisition window is divided into a high-quality window. If the comprehensive quality coefficient is less than the preset image acceptance reference threshold, the acquisition window is divided into a low-quality window.

[0026] In a preferred embodiment, for low-quality windows, fuzzy reasoning is used to determine the image correction method.

[0027] In a preferred embodiment, the logic of fuzzy reasoning is:

[0028] The image complexity index, environmental change index and comprehensive use quality of the low-quality window are obtained, the image complexity index, environmental change index and comprehensive use quality are taken as input variables, the image correction method is taken as the output variable, the input variables are fuzzy processed, and the values ​​of the input variables are converted into fuzzy sets. The output variables are fuzzy processed and the output variables are converted into fuzzy sets. Fuzzy rules are formulated to describe the image correction requirements under different data type combinations. The fuzzified input variables are inferred through fuzzy rules to determine the correction method that needs to be performed on all initial images of the low-quality window.

[0029] In a preferred embodiment, a hysteroscope real-time image correction system includes a quality assessment module, a preliminary analysis module, an abnormality assessment module, a division module, and a correction module;

[0030] The quality assessment module is used to score the quality of the initial image of the hysteroscope real-time image to obtain the quality score of the initial image;

[0031] The preliminary analysis module is used to judge whether there is a hidden danger of insufficient image quality in the acquisition window of the initial image based on the quality score of the initial image;

[0032] The abnormality assessment module is used to perform abnormal analysis on the acquisition window with hidden dangers of insufficient image quality, obtain the image complexity index and environmental change index respectively, and then substitute the image complexity index and environmental change index into the pre-trained machine learning model to evaluate the comprehensive use quality of the image and obtain the comprehensive use quality coefficient of the image;

[0033] The division module is used to divide the acquisition window into a low-quality window and a high-quality window based on the comprehensive use quality coefficient of the image;

[0034] The correction module is used to judge the image correction method for low-quality windows based on the image complexity index, environmental change index, and comprehensive usage quality, and based on the judgment result of the image correction method, perform corresponding image correction operations on all initial images of the low-quality windows.

[0035] Technical effects and advantages of the present invention:

[0036] The present invention can accurately identify hidden dangers of insufficient image quality by real-time evaluation of the image complexity index and environmental change index, and make corrections in a timely manner to ensure the clarity and detail richness of the image during hysteroscopic surgery. By improving image quality, the doctor's misjudgment and operational errors during the operation are reduced, the safety and success rate of the operation are significantly enhanced, and the surgical risk of the patient is reduced.

[0037] The present invention can monitor image quality in real time, and automatically select the most suitable image correction method through fuzzy reasoning, provide instant feedback and adjustment, and improve the efficiency and fluency of the surgical process. By comprehensively analyzing the image complexity index and the environmental change index, the present invention can adapt to different surgical environment conditions and effectively manage the changes in image quality to ensure that high-quality images can still be obtained in complex environments. The present invention uses fuzzy reasoning technology to intelligently judge and select image correction methods according to the image complexity index, environmental change index and comprehensive usage quality, thereby improving the automation and intelligence level of image processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings;

[0039] Figure 1 The figure is a schematic diagram of a hysteroscope real-time image correction method in the present invention.

[0040] Figure 2 The figure is a schematic diagram of a hysteroscope real-time image correction system in the present invention. DETAILED DESCRIPTION

[0041] 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.

[0042] Reference Figure 1 - Figure 2 The following embodiments are obtained:

[0043] Embodiment 1: A hysteroscopic real-time image correction method, comprising the following steps:

[0044] Performing a quality score on the initial image of the hysteroscope real-time image to obtain a quality score of the initial image;

[0045] Based on the quality score of the initial image, it is judged whether the acquisition window of the initial image has a hidden danger of insufficient image quality;

[0046] An abnormal analysis is performed on the acquisition windows with hidden dangers of insufficient image quality to obtain the image complexity index and environmental change index respectively. Then, the image complexity index and environmental change index are substituted into the pre-trained machine learning model to evaluate the comprehensive use quality of the image and obtain the comprehensive use quality coefficient of the image.

[0047] Based on the comprehensive use quality coefficient of the image, the acquisition window is divided into a low-quality window and a high-quality window;

[0048] For low-quality windows, the image correction method is judged based on the image complexity index, environmental change index, and comprehensive usage quality;

[0049] Based on the judgment result of the image correction method, corresponding image correction operations are performed on all initial images of the low-quality window.

[0050] It should be noted that the image correction method in the present invention is:

[0051] 1. Image correction method based on geometric correction, literature source: Automatic camera and distance sensor calibration using a single shot, see the IEEE International Conference on Robotics and Automation (ICRA) Proceedings (pages 3936-3943). This method uses a geometric correction model to correct the geometric distortion in the image by calibrating the parameters of the camera and optical system. By taking a series of images using a calibration plate in a laboratory environment, the internal and external parameters of the camera are calculated, and these parameters are applied in real time during the operation for image correction. Advantages: High precision: Most geometric distortions can be corrected through an accurate geometric model. Consistency: Once the correction parameters are determined, the correction effect can be maintained in a similar environment. Disadvantages: Dependence on laboratory calibration: Detailed calibration experiments are required before surgery. It should be clear that when the present invention makes a judgment during the operation, because it involves the judgment of these two image correction methods, a calibration experiment will be conducted for the environment of the operating room before the operation. The selection is because the applicability of the two is different, and the effects of image correction in different situations are different. The present invention is to explore which image correction method can better meet the needs of the actual operation.

[0052] 2. Image correction method based on image processing, reference: Image alignment and stitching: Tutorial see Computer Graphics and Vision Foundations and Trends, 2(1), 1-104. This method uses image processing algorithms, such as feature point detection, image registration and transformation, to correct the image. By detecting feature points in the image and calculating the transformation matrix, the distortion in the image can be corrected in real time. High flexibility: No pre-calibration is required and it can be used in different environments. Good real-time performance: Some efficient image processing algorithms can complete the correction in a short time. Disadvantages: Low accuracy: In complex surgical environments, it may not provide sufficiently high correction accuracy. Susceptible to interference: Interference such as changes in lighting and blood may affect the accuracy of feature point detection.

[0053] The steps for scoring the quality of the initial image of the hysteroscopic real-time image and obtaining the quality score of the initial image are as follows:

[0054] The real-time hysteroscopic image is obtained as the input image, and then the color image is converted into a grayscale image to simplify processing and calculation. The Laplace transform is used to calculate the second-order derivative of the image to capture the edges and details in the image. The calculation formula is: ; is the gray value of the image, and are the second-order derivatives of the image in the x and y directions, is the Laplace operator, and then the variance of the Laplace transform result is calculated to quantify the richness of details and edges in the image. The calculation formula is: ; represents the Laplace value of the i-th pixel in the image, μ represents the average value of the Laplace value, and N represents the total number of pixels in the image. Represents variance calculation, and finally obtains the quality score of the initial image. The quality score of the initial image is the value of the Laplace transform variance. Calculating the variance of the Laplace transform can effectively evaluate the clarity of the image. A high quality score: indicates that the edges and details in the image are very clear, and the image quality is high; a low quality score: indicates that the edges and details in the image are not clear, and the image quality is low; clarity is an important indicator for measuring image quality, which reflects the clarity of the details and edges in the image. In hysteroscopic surgery, the clarity of the image directly affects the accuracy and safety of the surgery. High-quality images can help doctors diagnose and operate more accurately. Real-time calculation of image quality scores can provide instant feedback during the operation. In the subsequent implementation of the present invention, the image quality score can be used to automatically determine whether image correction is required or what kind of processing method is required to ensure that the best quality image is always provided.

[0055] The logic for judging whether the acquisition window of the initial image has a hidden danger of insufficient image quality based on the quality score of the initial image is as follows:

[0056] The quality scores of all the initial images under the target acquisition window are obtained, and then the standard deviation of the quality scores of all the initial images is calculated, the quality scores of the initial images are compared with the preset standard quality range, and the standard deviation of the quality scores is compared with the preset standard quality reference threshold. If the quality scores of all the initial images are within the preset standard quality range and the standard deviation of the quality scores is less than or equal to the preset standard quality reference threshold, it is judged that there is no hidden danger of insufficient image quality in the acquisition window of the initial image. If the quality scores of all the initial images are not within the preset standard quality range and the standard deviation of the quality scores is less than or equal to the preset standard quality reference threshold, it is judged that The acquisition window of the initial image has the hidden danger of insufficient image quality; Condition judgment: 1. The quality scores of all initial images are within the preset standard quality range; 2. The standard deviation of the quality score is less than or equal to the preset standard quality reference threshold; If both conditions are met, it is judged that there is no hidden danger of insufficient image quality in the acquisition window of the initial image; If any one of the conditions is not met, it is judged that there is a hidden danger of insufficient image quality in the acquisition window of the initial image. The standard deviation of the initial image quality score reflects the consistency of image quality. A lower standard deviation indicates stable image quality, which reduces the uncertainty caused by image quality fluctuations. During surgery, image quality directly affects the doctor's decision-making and operation. By detecting quality hidden dangers, potential problems can be discovered in advance to prevent surgical risks caused by image blur or distortion. If quality hidden dangers are detected, further abnormal analysis can be performed to determine whether to trigger the automatic image correction mechanism to ensure that the image quality remains in the best state, thereby improving surgical accuracy. Real-time monitoring and feedback of image quality help doctors make timely adjustments during surgery to ensure the controllability and safety of the surgical environment. Maintaining high-quality images helps doctors diagnose and operate more accurately, thereby improving the success rate of surgery and the safety of patients.

[0057] The logic for obtaining the image complexity index is as follows: convert each acquired image in the acquisition window with the potential problem of insufficient image quality into a grayscale image, and use an edge detection algorithm such as Canny edge detection to calculate the edge density of each image. The calculation formula is:

[0058] ; Represents the binary image after edge detection of the kth image, where edge points are 1 and non-edge points are 0. represents the total number of pixels in the kth image, and ED represents the edge density of the image; the edge density reflects the richness of edges and details in the image. A higher edge density means there are more edges and details in the image, which usually means a more complex image.

[0059] The feature point detection algorithm is used to calculate the feature point density of each image. The calculation formula is: ; It represents the number of feature points of the kth image, and FFD represents the feature point density of the image. The feature point density reflects the number of unique features in the image. More feature points usually mean that the image contains more details and structures and is more complex.

[0060] The image feature point density FFD and the image edge density ED are weighted and summed to obtain the image complexity coefficient. An example is as follows: ; represents the complex coefficient of the kth image, α and β are weight coefficients, which are adjusted according to the actual application. represents the edge density of the kth image, It represents the density of feature points of the kth image. The image complexity coefficient comprehensively considers the edge density and feature point density, reflects the overall complexity of the image through weighted summation, and then calculates the average value of the image complexity coefficients of all collected images: ; M represents the total number of images in the acquisition window, ICI represents the image complexity index, which is the average value of the complexity coefficients of all images in the acquisition window, reflecting the overall complexity of the images in the entire window.

[0061] The logic for obtaining the environmental change index is:

[0062] Each acquired image in the acquisition window with the potential problem of insufficient image quality is used as an input image sequence, and each acquired image is converted into a grayscale image and an HSV (hue, saturation, value) image. The average brightness, brightness standard deviation, average hue, and hue standard deviation of each image are calculated respectively. The gray level co-occurrence matrix (GLCM) is used to calculate the texture features of the image such as contrast, energy, homogeneity, etc.: ; represents the grayscale image of the kth image, represents the gray-level co-occurrence matrix of the k-th image; ; represents the texture feature vector of the kth image extracted from the gray-level co-occurrence matrix, combining all the eigenvalues ​​of each image into a feature vector, and converting the grayscale image Quantify into several gray levels (usually 8 or 16 levels), calculate the gray level co-occurrence matrix under different directions (such as 0°, 45°, 90°, 135°) and distances (usually 1 pixel), each matrix element (i, h) represents the number of times a pixel with gray value i and a pixel with gray value h appear in a given direction and distance. For example, the texture features extracted from GLCM are as follows: contrast is used to measure the degree of local variation between gray levels in an image. The higher the contrast, the coarser the texture of the image; homogeneity is used to measure the degree of similarity of gray levels in an image. The higher the homogeneity, the more uniform the texture of the image; correlation is used to measure the correlation between pixel gray levels in an image. The higher the correlation, the more consistent the texture of the image; combine all eigenvalues ​​(brightness, hue and texture features) of each image into a feature vector, use principal component analysis (PCA) to reduce the dimensionality of the feature vectors of all images to reduce the dimension and remove redundant information, and use the K-means clustering algorithm to cluster the reduced eigenvectors. ; represents the clustering results after cluster analysis, It represents the feature vector after PCA dimensionality reduction. Finally, the environmental change index is calculated based on the characteristics of each cluster and the variance and center point distance of each cluster: ; C represents the number of clusters, γ represents the weight coefficient of cluster variance, δ represents the weight coefficient of the distance of cluster center points, represents the characteristic variance of the cth cluster, represents the average distance from the cth cluster center to all points, and EVI represents the environmental change index; the environmental change index comprehensively considers the brightness, hue and texture characteristics of the image, provides a comprehensive evaluation of the image quality, uses PCA for feature dimensionality reduction, reduces the dimension of the feature space, removes redundant information, and improves computational efficiency and clustering effect. The K-means clustering algorithm can effectively identify environmental change patterns and quantify the degree of change in image quality by analyzing the variance and center point distance of the clusters. The environmental change index can monitor the change in image quality in real time. When EVI is small, the brightness, hue and texture characteristics of the image change less in different acquisition windows, indicating that the impact of environmental changes on image quality is low, and the image quality consistency is high, which helps doctors obtain stable visual information during surgery; when EVI is large, the brightness, hue and texture characteristics of the image change more in different acquisition windows, indicating that the impact of environmental changes on image quality is high, and the image quality fluctuates greatly, which may cause doctors to obtain inconsistent visual information during surgery.

[0063] The machine learning model is not specifically specified in the present invention. A model that can generate a comprehensive image quality coefficient by comprehensive analysis of the image complexity index and the environmental change index can be used. The present invention provides a specific implementation method: for example, the image complexity index and the environmental change index are standardized respectively, and the processing method is exemplified by Z-score standardization, and then the standardized image complexity index and environmental change index are substituted into the following formula: ; w1, w2 are preset proportional coefficients, is the image complexity index after normalization. It is the environmental change index after standardized processing. OQS is the comprehensive quality coefficient of the image. A high OQS value means that the image has a high enough quality when it is collected and does not require post-processing correction. An image with a low OQS value means that more real-time adjustment and correction are required to maintain a high image quality.

[0064] Based on the comprehensive usage quality coefficient of the image, dividing the acquisition window into a low-quality window and a high-quality window means: comparing the comprehensive usage quality coefficient with a preset image adoption reference threshold; if the comprehensive usage quality coefficient is greater than or equal to the preset image adoption reference threshold, the acquisition window is divided into a high-quality window; if the comprehensive usage quality coefficient is less than the preset image adoption reference threshold, the acquisition window is divided into a low-quality window.

[0065] For low-quality windows, fuzzy reasoning is used to judge the image correction method. The logic of fuzzy reasoning is: obtain the image complexity index, environmental change index, and comprehensive use quality of the low-quality window, use the image complexity index, environmental change index, and comprehensive use quality as input variables, use the image correction method as the output variable, fuzzify the input variables, convert the input variable values ​​into fuzzy sets, fuzzify the output variables, convert the output variables into fuzzy sets, formulate fuzzy rules, describe the image correction requirements under different data type combinations, and reason the fuzzified input variables through fuzzy rules to judge the correction method required for all initial images of the low-quality window; assume that the input variables and output variables can be defined as the following fuzzy sets respectively: Image Complexity Index (ICI): Low, Medium, High; Environmental Change Index (EVI): Low, Medium, High; Environmental Change Index (EVI): High, Low, Medium, High; Fuzzy Rules: Low, Medium, High; Fuzzy Rules: Low, Medium, High; Fuzzy Rules: Low, Medium, High; Fuzzy Rules: Low, Medium, High; Environmental Change Index (EVI): Low, Medium, High; Fuzzy Rules: ... Medium, High; Fuzzy Rules: Low, Medium, Medium, High; Fuzzy Rules: Low, Medium, Medium, High; Fuzzy Rules: Low, Medium, Medium, High; Fuzzy Rules: Low, Medium, Medium, High; Fuzzy Rules: Low, Medium, Medium, High; Fuzzy Rules: Low, Medium, Medium, High; Fuzzy Rules: Low, Medium, ): Low, Medium, High; Overall usage quality (OQS): Poor, Fair, Good; Image correction methods: geometric correction, image processing correction; Formulate fuzzy rules to describe the image correction requirements under different data type combinations, for example: if ICI is "high" and EVI is "high" and OQS is "poor", then the image correction method is "geometric correction"; if ICI is "medium" and EVI is "medium" and OQS is "fair", then the image correction method is "image processing correction"; The fuzzified input variables are inferred through fuzzy rules, and the maximum membership method is used to obtain the final decision. Through this fuzzy reasoning method, the most suitable image correction method can be determined according to the image complexity index, environmental change index and overall usage quality, ensuring the best image quality under different conditions.

[0066] Embodiment 2: A hysteroscope real-time image correction system, comprising a quality assessment module, a preliminary analysis module, an abnormality assessment module, a division module, and a correction module;

[0067] The quality assessment module is used to score the quality of the initial image of the hysteroscope real-time image to obtain the quality score of the initial image;

[0068] The preliminary analysis module is used to judge whether there is a hidden danger of insufficient image quality in the acquisition window of the initial image based on the quality score of the initial image;

[0069] The abnormality assessment module is used to perform abnormal analysis on the acquisition window with hidden dangers of insufficient image quality, obtain the image complexity index and environmental change index respectively, and then substitute the image complexity index and environmental change index into the pre-trained machine learning model to evaluate the comprehensive use quality of the image and obtain the comprehensive use quality coefficient of the image;

[0070] The division module is used to divide the acquisition window into a low-quality window and a high-quality window based on the comprehensive use quality coefficient of the image;

[0071] The correction module is used to judge the image correction method for low-quality windows based on the image complexity index, environmental change index, and comprehensive usage quality, and based on the judgment result of the image correction method, perform corresponding image correction operations on all initial images of the low-quality windows. The image correction operation refers to the image correction method corresponding to the result of the judgment selected from the image correction method based on geometric correction and the image correction method based on image processing.

[0072] 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.

[0073] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0074] Those of ordinary skill in the art will appreciate that the units 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 and design constraints of the technical solution. 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.

[0075] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0076] 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.

Claims

1. A hysteroscopic real-time image correction method, characterized in that: The following steps are involved: Performing a quality score on the initial image of the hysteroscope real-time image to obtain a quality score of the initial image; Based on the quality score of the initial image, it is judged whether the acquisition window of the initial image has a hidden danger of insufficient image quality; Perform abnormal analysis on the acquisition windows with potential problems of insufficient image quality to obtain the image complexity index and environmental change index respectively. Then substitute the image complexity index and environmental change index into the pre-trained machine learning model to evaluate the comprehensive use quality of the image and obtain the comprehensive use quality coefficient of the image. Based on the comprehensive use quality coefficient of the image, the acquisition window is divided into a low-quality window and a high-quality window; For low-quality windows, the image correction method is judged based on the image complexity index, environmental change index, and comprehensive usage quality; Based on the judgment result of the image correction method, corresponding image correction operations are performed on all initial images of the low-quality window; The logic for obtaining the image complexity index is: Each acquired image in the acquisition window with the potential problem of insufficient image quality is converted into a grayscale image, and the edge density of each image is calculated using an edge detection algorithm. The calculation formula is: ; Represents the binary image after edge detection of the kth image, where edge points are 1 and non-edge points are 0. represents the total number of pixels in the kth image, and ED represents the edge density of the image; The feature point detection algorithm is used to calculate the feature point density of each image. The calculation formula is: ; represents the number of feature points of the kth image, and FFD represents the density of feature points of the image; The image feature point density FFD and the image edge density ED are weightedly summed to obtain the image complexity coefficient, and then the image complexity coefficients of all collected images are averaged to obtain the image complexity index; The logic for obtaining the environmental change index is: Each acquired image in the acquisition window with the potential problem of insufficient image quality is used as an input image sequence, and each acquired image is converted into a grayscale image and an HSV image. The average brightness, brightness standard deviation, average hue, and hue standard deviation of each image are calculated respectively, and the texture features of the image are calculated using the grayscale co-occurrence matrix: ; represents the grayscale image of the kth image, represents the gray-level co-occurrence matrix of the k-th image; ; Represents the texture feature vector of the kth image extracted from the gray-level co-occurrence matrix. All eigenvalues ​​of each image are combined into a feature vector. The feature vectors of all images are reduced in dimension using principal component analysis. The reduced feature vectors are clustered using the K-means clustering algorithm. ; represents the clustering results after cluster analysis, It represents the feature vector after PCA dimensionality reduction. Finally, the environmental change index is calculated based on the characteristics of each cluster: ; C represents the number of clusters, γ represents the weight coefficient of cluster variance, δ represents the weight coefficient of the distance of cluster center points, represents the characteristic variance of the cth cluster, It represents the average distance from the cth cluster center to all points, and EVI represents the environmental change index.

2. A hysteroscopic real-time image correction method according to claim 1, characterized in that: The steps for scoring the quality of the initial image of the hysteroscopic real-time image and obtaining the quality score of the initial image are as follows: The real-time hysteroscopic image is obtained as the input image, and then the color image is converted into a grayscale image. The Laplace transform is used to calculate the second-order derivative of the image. The calculation formula is: ; is the gray value of the image, and are the second-order derivatives of the image in the x and y directions, is the Laplace operator, and then the variance of the Laplace transform result is calculated using the following formula: ; represents the Laplace value of the i-th pixel in the image, μ represents the average value of the Laplace value, and N represents the total number of pixels in the image. Represents variance calculation, and finally obtains the quality score of the initial image, which is the value of the Laplace transform variance.

3. A hysteroscopic real-time image correction method according to claim 2, characterized in that: The logic for judging whether the acquisition window of the initial image has a hidden danger of insufficient image quality based on the quality score of the initial image is as follows: The quality scores of all initial images under the target acquisition window are obtained, and then the standard deviation of the quality scores of all initial images is calculated, the quality scores of the initial images are compared with a preset standard quality range, and the standard deviation of the quality scores is compared with a preset standard quality reference threshold. If the quality scores of all initial images are within the preset standard quality range and the standard deviation of the quality scores is less than or equal to the preset standard quality reference threshold, then it is judged that there is no hidden danger of insufficient image quality in the acquisition window of the initial images. If the quality scores of all initial images are not within the preset standard quality range and the standard deviation of the quality scores is less than or equal to the preset standard quality reference threshold, then it is judged that there is a hidden danger of insufficient image quality in the acquisition window of the initial images.

4. A hysteroscopic real-time image correction method according to claim 3, characterized in that: Based on the comprehensive use of the image quality coefficient, the acquisition window is divided into a low-quality window and a high-quality window, which means: The comprehensive quality coefficient is compared with the preset image acceptance reference threshold. If the comprehensive quality coefficient is greater than or equal to the preset image acceptance reference threshold, the acquisition window is divided into a high-quality window. If the comprehensive quality coefficient is less than the preset image acceptance reference threshold, the acquisition window is divided into a low-quality window.

5. A hysteroscopic real-time image correction method according to claim 4, characterized in that: For low-quality windows, fuzzy reasoning is used to determine the image correction method.

6. A hysteroscopic real-time image correction method according to claim 5, characterized in that: The logic of fuzzy reasoning is: The image complexity index, environmental change index and comprehensive use quality of the low-quality window are obtained, the image complexity index, environmental change index and comprehensive use quality are taken as input variables, the image correction method is taken as the output variable, the input variables are fuzzy processed, and the values ​​of the input variables are converted into fuzzy sets. The output variables are fuzzy processed and the output variables are converted into fuzzy sets. Fuzzy rules are formulated to describe the image correction requirements under different data type combinations. The fuzzified input variables are inferred through fuzzy rules to determine the correction method that needs to be performed on all initial images of the low-quality window.

7. A hysteroscope real-time image correction system, based on a hysteroscope real-time image correction method according to any one of claims 1 to 6, characterized in that: It includes quality assessment module, preliminary analysis module, abnormality assessment module, division module and correction module; The quality assessment module is used to score the quality of the initial image of the hysteroscope real-time image to obtain the quality score of the initial image; The preliminary analysis module is used to judge whether there is a hidden danger of insufficient image quality in the acquisition window of the initial image based on the quality score of the initial image; The abnormality assessment module is used to perform abnormal analysis on the acquisition window with hidden dangers of insufficient image quality, obtain the image complexity index and environmental change index respectively, and then substitute the image complexity index and environmental change index into the pre-trained machine learning model to evaluate the comprehensive use quality of the image and obtain the comprehensive use quality coefficient of the image; The division module is used to divide the acquisition window into a low-quality window and a high-quality window based on the comprehensive use quality coefficient of the image; The correction module is used to judge the image correction method for low-quality windows based on the image complexity index, environmental change index, and comprehensive usage quality, and based on the judgment result of the image correction method, perform corresponding image correction operations on all initial images of the low-quality windows.