A method and system for optimizing hysteroscopic images
Through dynamic resource allocation and intelligent image processing technology, the image processing mode of the hysteroscopy system is optimized, which solves the problems of high-performance hardware dependence, high processing complexity and poor real-time performance in the existing technology, and achieves more efficient and stable image processing. The effect improves the accuracy and safety of surgery.
Patent Information
- Application Number
- CN202411352058.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The existing hysteroscopic systems have high performance hardware dependence, high processing complexity, poor real-time performance, lack of dynamic optimization capabilities and resource allocation mechanisms in image processing, resulting in high system cost, limited application scope and poor surgical results.
Through dynamic resource allocation and intelligent image processing technology, it automatically identifies the type of surgery, analyzes historical operation data, monitors the processing task load in real time, and uses a priority queue algorithm to optimize resource allocation based on the pressure level assessment results to ensure that the image processing resources of the main screen are given priority. Guaranteed, the resource allocation of secondary screens is adjusted according to the remaining resources.
It effectively improves the image processing efficiency and quality of hysteroscopy, enhances the accuracy and safety of surgical operations, and solves the problems of poor real-time performance of image processing and unreasonable resource allocation in the existing technology.
Smart Images

Figure CN118864222B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and more specifically, to a hysteroscopic image optimization method and system. Background Art
[0002] As an endoscopic device used for inspection and surgery, hysteroscope plays an important role in gynecological surgery. This device can provide high-definition internal views, allowing doctors to make accurate diagnoses and treatments. However, the image processing quality and real-time performance of the hysteroscopic system are crucial to the success of the operation. In existing hysteroscopic systems, image processing usually relies on high-performance hardware and software algorithms to ensure real-time and image quality. However, when the system turns on multi-function or the performance requirements of a single function are too high, the processing complexity increases, resulting in observation delays and affecting real-time performance. In addition, excessive reliance on system performance also increases the cost and operational complexity of the equipment, limiting its widespread application.
[0003] Existing hysteroscopy systems have several deficiencies in image processing. First, image processing is highly dependent on high-performance hardware, such as advanced GPUs and high-speed CPUs, which makes the system costly and has high requirements for the hardware environment, limiting its popularity in medical institutions with limited resources. Secondly, when the system turns on multiple functions at the same time or the performance requirements of a certain function are too high, the processor load increases significantly, resulting in a significant increase in the complexity of image processing. In this case, the system may experience processing delays, which directly affect the real-time and clarity of the image, thereby affecting the doctor's operating accuracy and surgical results.
[0004] In addition, the image processing algorithms of existing systems are usually fixed and lack dynamic adjustment capabilities, and cannot be optimized according to real-time load and specific surgical needs. Such static processing methods are prone to cause system performance bottlenecks when the load is high, and the image processing quality is reduced, affecting the safety and efficiency of the surgery. More importantly, due to the lack of intelligent load management and resource allocation mechanisms, it is difficult for existing systems to maintain the optimal state of image processing under different load conditions, and resources are prone to waste or shortage.
[0005] At the same time, most existing image processing technologies only focus on improving the quality of the image itself, while ignoring the real-time processing and the comprehensive utilization of hardware resources. This single optimization method cannot meet the needs of efficient image processing in complex surgical environments, resulting in many limitations in the actual application of the system. In addition, over-reliance on high-performance hardware also increases the maintenance and upgrade costs of the system, bringing additional economic burdens to medical institutions.
[0006] In summary, the shortcomings of existing hysteroscopic systems in image processing are mainly reflected in the reliance on high-performance hardware, high processing complexity, poor real-time performance, lack of dynamic optimization capabilities and resource allocation mechanisms, etc. These problems limit the performance and application scope of hysteroscopic systems, and further technical improvements and optimizations are needed to provide more efficient and stable image processing solutions to meet the needs of clinical surgery.
[0007] In order to solve the above problems, a technical solution is now provided. Summary of the invention
[0008] In order to overcome the above-mentioned defects of the prior art, the embodiments of the present invention provide a hysteroscopic image optimization method and system, which improves the real-time performance and quality of image processing through dynamic resource allocation and intelligent image processing technology. In the startup phase, the hardware and software status check is automatically performed, including verifying the status of the image capture device. The image processing mode is automatically selected according to the type of surgery, the historical operation data is analyzed by the deep learning algorithm to set the image parameters, and the load of the processing task on the CPU and GPU is monitored in real time, so as to clarify the current image processing pressure. The edge detection and feature point matching technology are applied to automatically identify the key medical areas in the image, and the image is divided into primary and secondary screens according to the preset or recommended. Based on the pressure level assessment results, the priority queue algorithm is used to optimize resource allocation, and the image processing resources of the main screen are prioritized to maintain its clarity and frame rate. The resource allocation of the secondary screen is adjusted according to the remaining resources to maintain acceptable image quality. The processing load is continuously monitored, and the resource allocation of the secondary screen is automatically increased when the load is reduced. At the same time, according to the real-time changes in surgical requirements, the boundaries of the primary and secondary screens are dynamically adjusted to ensure that they meet the visual needs during the operation. Through the above steps, the present invention effectively improves the efficiency and quality of hysteroscopic image processing, enhances the accuracy and safety of surgical operations, and solves the problems raised in the above background technology.
[0009] To achieve the above object, the present invention provides the following technical solutions:
[0010] S1: During the hysteroscopy startup phase, automatically perform hardware and software status checks and generate comprehensive status reports to ensure that all hardware and software components are working properly.
[0011] S2: Automatically select the image processing mode according to the type of surgery, use deep learning algorithms to analyze the corresponding historical operation data to set image parameters, and monitor the load of processing tasks on the CPU and GPU in real time to clarify the current image processing pressure.
[0012] S3: Apply edge detection and feature point matching technology to automatically identify key medical areas in the image and divide the image into primary and secondary frames according to settings or recommendations.
[0013] S4: Based on the stress level assessment results, a priority queue algorithm is used to optimize resource allocation, giving priority to image processing resources for the primary screen to maintain its clarity and frame rate. Resource allocation for the secondary screen is adjusted based on the remaining resources to maintain acceptable image quality.
[0014] S5: Continuously monitor the image processing pressure, and dynamically adjust the boundary between the primary and secondary screens when the image processing pressure is stable and reduced, until the primary screen completely covers the secondary screen. Otherwise, maintain the primary and secondary screens divided in the previous step S3, and give corresponding early warning prompts according to the current image processing pressure.
[0015] In a preferred embodiment, S2 includes the following contents:
[0016] S2-1, automatically identifying the current surgery type according to the surgery plan, calling the preset image processing mode library to select the corresponding processing mode;
[0017] S2-2, using deep learning algorithms to analyze the corresponding historical operation data, including processing mode, image quality parameters and processing time, extract key features from the historical data, and apply the following formula to generate the image parameters of the current operation:
[0018] .
[0019] in:
[0020] Indicates the number of image frames processed per second.
[0021] Indicates the resolution of the image.
[0022] Indicates the time required to process a single frame of image.
[0023] The representative deep learning model accepts key features from historical operation data as input, including frame rate, resolution, and processing time, and then outputs a set of predicted image processing parameters.
[0024] Represents a set of image processing parameters for prediction.
[0025] In a preferred embodiment, S2-3 monitors the load of the current processing task on the CPU and GPU in real time, and the specific operations include:
[0026] Get CPU usage and GPU usage .
[0027] Calculate the current load index:
[0028] .
[0029] in:
[0030] Indicates the current CPU usage and is used to monitor CPU load.
[0031] Indicates the current usage of the GPU, used to monitor GPU load.
[0032] Indicates the current CPU operating frequency, which is used to measure the CPU's working intensity.
[0033] Indicates the current GPU operating frequency, which is used to measure the GPU's working intensity.
[0034] Indicates the current CPU temperature, used to evaluate the CPU thermal status.
[0035] Indicates the current GPU temperature, used to evaluate the thermal status of the GPU.
[0036] S2-4, judging the current image processing pressure according to the real-time load index and the preset load threshold in the image processing mode. The image processing pressure index is calculated by the following formula: ;
[0037] According to the Image Processing Stress Index, the stress levels are divided into three categories: low load, medium load, and high load. The following is a detailed stress rating process:
[0038] When the image processing pressure index is less than a first threshold, it is marked as low load;
[0039] When the image processing stress index is between the first threshold and the second threshold, it is marked as a medium load;
[0040] When the image processing pressure index is equal to or greater than the second threshold, it is marked as high load.
[0041] In a preferred embodiment, S3 includes the following contents:
[0042] S3-1, first, preprocessing the input hysteroscopic image;
[0043] S3-2, after image preprocessing, edges in the image are detected using the Canny edge detection algorithm;
[0044] S3-3, after detecting the edge, identify the feature points in the image. Use the Harris corner detection algorithm to complete this step. The corner response function is calculated as follows: ;in, is the autocorrelation matrix, is an empirical constant, is the determinant of the matrix, is the trace of the matrix;
[0045] S3-4, combining edge detection results and feature point distribution, using clustering algorithm to identify key medical areas in the image and set the number of cluster centers and the number of iterations , the cluster center is calculated by the following formula: ;in, For the Cluster centers, For the The feature point set of cluster centers, is the feature point;
[0046] S3-5, according to the identified key area, the image is divided into a primary image and a secondary image, the primary image focuses on the part containing the key area, and the secondary image contains the rest, and the division is performed by the following formula: , ;in, The main screen area. For the secondary screen area, Pixel To the nearest cluster center distance.
[0047] In a preferred embodiment, S4 includes the following contents:
[0048] S4-1, obtaining the pressure level obtained in step S2 and the primary and secondary images obtained in step S3;
[0049] S4-2, uses priority queues to manage resource allocation: the primary screen is assigned the highest priority to ensure its image processing resources; the secondary screen is dynamically adjusted according to the remaining resources and current load conditions;
[0050] S4-3, under low and medium load conditions, resource allocation for the main screen gives priority to meeting its highest requirements, including maximum frame rate and resolution. Before allocating resources, it is necessary to make corrections based on the image processing pressure index to ensure the accuracy and dynamic adjustment capability of resource allocation. The specific calculation is as follows: ;
[0051] in, This is the main screen area after proofreading. is the total system resources, The biggest requirement for the main screen, is the image processing stress index;
[0052] S4-4, resource allocation of the secondary screen is adjusted according to the remaining resources and current load conditions:
[0053] Under high load conditions, the resources of the primary screen are prioritized, and then the frame rate and resolution of the secondary screen are adjusted based on the remaining resources. The adjustment formula is as follows:
[0054] ;
[0055] .
[0056] in, and They are the frame rate and resolution adjustment values of the secondary screen. and They are the maximum frame rate and maximum resolution of the secondary picture respectively.
[0057] In a preferred embodiment, S5 includes the following contents:
[0058] S5-1, firstly, continuously monitor the system load pressure of the hysteroscope according to the image processing pressure index;
[0059] Obtain multiple image processing pressure index data within the recent rated time, construct the current analysis data set, and calculate the standard deviation;
[0060] In order to analyze the overall trend of the current overall complexity, the slope of the image processing pressure index is calculated. The slope of the image processing pressure index is obtained by linear regression of the load index in the time window. , the formula is as follows:
[0061] ;
[0062] Among them, the slope of the image processing stress index represents the changing trend of the load index;
[0063] S5-2, taking into account the volatility and trend of the load index, the standard deviation of the pressure index is processed by comprehensive image processing , the average value of image processing stress index The steady-state load reduction coefficient is calculated by the slope of the image processing pressure index. The calculation formula is as follows: ; The steady-state load reduction coefficient is used to determine whether the load is stable and reduced.
[0064] In a preferred embodiment, S5-3, the initial boundary between the primary and secondary pictures is set to ;
[0065] In each time interval, the number of key feature points of the main picture and the secondary picture is calculated and ;
[0066] If the steady-state load reduction coefficient is less than the instability threshold, the boundary is dynamically adjusted using the steady-state load reduction coefficient combined with the number of characteristic points. The adjustment formula is as follows: ;in, is the boundary adjustment amount, is the adjustment coefficient, which is used to control the adjustment range. and They are the number of feature points of the main picture and the secondary picture respectively.
[0067] According to the calculated border adjustment amount, the border positions of the primary and secondary pictures are updated until the primary picture completely covers the secondary picture.
[0068] If the steady-state load reduction coefficient is greater than or equal to the instability threshold, in this case, the boundary obtained in the previous step S3 will be maintained as the boundary between the main and secondary screens without adjustment. At the same time, if a high load is still indicated, an early warning prompt will be issued.
[0069] A hysteroscopic image optimization system comprises a system comprehensive inspection module, a mode intelligent selection module, an edge recognition module, a resource optimization module and a load control module.
[0070] During the startup phase of the hysteroscope, the system comprehensive inspection module automatically performs a hardware and software status check, generates a comprehensive status report, ensures that all hardware and software components are working properly, and outputs the comprehensive status report to the mode intelligent selection module.
[0071] The mode intelligent selection module automatically selects the image processing mode according to the type of surgery, uses deep learning algorithms to analyze historical operation data to set image parameters, and monitors the load of processing tasks on the CPU and GPU in real time, clarifies the current image processing pressure, outputs the image processing mode and initial load pressure data, and passes it to the edge recognition module.
[0072] The edge recognition module uses edge detection and feature point matching technology to automatically identify key medical areas in the image, and divides the image into primary and secondary images according to settings or recommendations, outputs the key area coordinates and the initial boundary data of the primary and secondary images, and passes them to the resource optimization module.
[0073] The resource optimization module optimizes resource allocation based on the pressure level assessment results and uses a priority queue algorithm to prioritize image processing resources for the main screen to maintain its clarity and frame rate. Resource allocation for the secondary screen is adjusted based on the remaining resources to maintain acceptable image quality. The optimized resource allocation plan is output and passed to the load control module.
[0074] The load control module continuously monitors the image processing pressure, analyzes the pressure data in the recent time, calculates the standard deviation and pressure slope, and obtains the steady-state load reduction coefficient; when the image processing pressure is stable and reduced, the boundary between the primary and secondary screens is dynamically adjusted until the primary screen completely covers the secondary screen; otherwise, the previously divided primary and secondary screens are maintained, and corresponding early warning prompts are given according to the current image processing pressure.
[0075] The technical effects and advantages of a hysteroscopic image optimization method and system of the present invention are as follows:
[0076] 1. The present invention effectively optimizes the image processing mode and performance by automatically identifying the type of surgery, analyzing historical operation data, monitoring the load of processing tasks in real time, and dynamically adjusting image processing parameters. Specifically, through the analysis of historical data by deep learning algorithms, the optimal image parameters required for the current surgery can be accurately predicted and set; the load status of the CPU and GPU is monitored in real time, and the load index and processing pressure are calculated to ensure that the system can still run smoothly under high load conditions; the frame rate and resolution are dynamically adjusted according to the processing pressure to maintain key image quality while avoiding system overload. This process ensures the efficiency and stability of the hysteroscopic system, enabling doctors to obtain high-quality image support, thereby improving the accuracy of diagnosis and treatment.
[0077] 2. The present invention automatically identifies the key medical areas in the image by applying edge detection and feature point matching technology, and divides the image into primary and secondary images according to settings or recommendations, thereby ensuring the image processing quality and real-time performance of the key areas. In specific operations, image preprocessing is used to remove noise and enhance contrast, and then the Canny edge detection algorithm is used to accurately identify the image edge. Then, the Harris corner detection algorithm is used to identify significant feature points, and the K-means clustering algorithm is used to identify the key medical areas in combination with the edge detection results and feature point distribution. Finally, the image is reasonably divided into primary and secondary images by setting a division threshold. In this way, resources can be allocated to process the primary image first, ensuring that doctors obtain clear and real-time images during surgery, improving the accuracy and safety of surgery, and at the same time, by dynamically adjusting the processing of the secondary image, avoiding system overload and optimizing the overall image processing effect.
[0078] 3. Based on the results of the pressure level assessment, the present invention uses a priority queue algorithm to optimize resource allocation, giving priority to image processing resources for the main screen, maintaining its clarity and frame rate, and dynamically adjusting the processing of the secondary screen according to the remaining resources. Ensure that the main screen obtains sufficient resources under low and medium load conditions, and reasonably control resource allocation under high load conditions to avoid system overload; ensure that the image quality of the secondary screen is optimized under high load conditions to reduce the overall load pressure. In this way, the system can still provide high-quality image support under high load and optimize the overall effect of hysteroscopic surgery. Through this dynamic optimization of resource allocation, the system can provide high-quality and high-real-time image processing under different load conditions, improve the accuracy and safety of surgery, and optimize the overall performance of the hysteroscopic system.
[0079] 4. The present invention continuously monitors the system load pressure of the hysteroscope based on the image processing pressure index, and calculates the standard deviation and slope to evaluate the volatility and trend of the load, and obtains the steady-state load reduction coefficient to determine whether the load is stable and reduced. When the steady-state load reduction coefficient is less than the instability threshold, the system automatically expands the size of the main screen, gradually covers the secondary screen, and improves the image quality; if it is greater than or equal to the instability threshold, the original boundary is maintained and an early warning is issued under high load conditions, and it is recommended to shut down multiple functions or reduce the performance requirement level of a certain function. This intelligent load management and picture adjustment strategy effectively improves the real-time performance and performance stability of the system, and provides reliable image support for medical surgery. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 The present invention is a schematic diagram of a flow chart of a hysteroscopic image optimization method.
[0081] Figure 2 The present invention is a schematic structural diagram of a hysteroscopic image optimization system. DETAILED DESCRIPTION
[0082] 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.
[0083] Embodiment 1: Figure 1 The present invention provides a hysteroscopic image optimization method, comprising:
[0084] S1: During the hysteroscopy startup phase, automatically perform hardware and software status checks and generate comprehensive status reports to ensure that all hardware and software components are working properly.
[0085] S2: Automatically select the image processing mode according to the type of surgery, use deep learning algorithms to analyze the corresponding historical operation data to set image parameters, and monitor the load of the processing task on the CPU and GPU in real time to clarify the current image processing pressure.
[0086] S3: Apply edge detection and feature point matching technology to automatically identify key medical areas in the image and divide the image into primary and secondary frames based on settings or recommendations.
[0087] S4: Based on the stress level assessment results, a priority queue algorithm is used to optimize resource allocation, giving priority to image processing resources for the primary screen to maintain its clarity and frame rate. Resource allocation for the secondary screen is adjusted based on the remaining resources to maintain acceptable image quality.
[0088] S5: Continuously monitor the image processing pressure, and dynamically adjust the boundary between the primary and secondary screens when the image processing pressure is stable and reduced, until the primary screen completely covers the secondary screen. Otherwise, maintain the primary and secondary screens divided in the previous step S3, and give corresponding early warning prompts according to the current image processing pressure.
[0089] The present invention aims to improve the real-time performance and quality of image processing through dynamic resource allocation and intelligent image processing technology. In the startup phase, hardware and software status checks are automatically performed, including verifying the status of the image capture device. The image processing mode is automatically selected according to the type of surgery, the historical operation data is analyzed using a deep learning algorithm to set image parameters, and the load of the processing task on the CPU and GPU is monitored in real time, so as to clarify the current image processing pressure. Edge detection and feature point matching technology are applied to automatically identify the key medical areas in the image, and the image is divided into primary and secondary images according to preset or recommended settings. Based on the pressure level assessment results, a priority queue algorithm is used to optimize resource allocation, and the image processing resources of the main image are prioritized to maintain its clarity and frame rate. The resource allocation of the secondary image is adjusted according to the remaining resources to maintain acceptable image quality. The processing load is continuously monitored, and the resource allocation of the secondary image is automatically increased when the load is reduced. At the same time, according to the real-time changes in surgical requirements, the boundaries of the primary and secondary images are dynamically adjusted to ensure that they meet the visual requirements during the operation. Through the above steps, the present invention effectively improves the image processing efficiency and quality of hysteroscopy and enhances the accuracy and safety of surgical operations.
[0090] S1 includes the following:
[0091] S1-1, when the hysteroscopy system is started, the system initialization program is first executed.
[0092] The program is responsible for loading all necessary drivers and software modules to ensure that all components are functioning properly. During the initialization process, a basic system self-test is performed to check the connection status and basic functions of the core hardware components.
[0093] S1-2, hardware performance detection is performed immediately after the system is started, including the performance and availability of the processor (CPU), graphics processing unit (GPU), memory (RAM), and storage device (hard disk or solid state drive).
[0094] By performing a series of benchmark tests, the system can determine the current performance status of each hardware component. For example, it tests the load capacity of the CPU and GPU, checks the available capacity of the memory, and detects the read and write speed of the storage device.
[0095] S1-3, verify the status of the connected image capture device (such as camera, endoscope) to ensure it is working properly.
[0096] The system checks the stability of the device connection and the working status of the image sensor by sending a test signal and receiving a feedback signal. It also includes checking the device's firmware version and comparing it with the latest known version to ensure that the device firmware is up to date.
[0097] S1-4, load the necessary software modules and library files to ensure the normal operation of the image processing algorithm and operation interface.
[0098] Check the integrity and compatibility of each software module, including image processing software, data analysis modules, user interface programs, etc. Use hash value verification and version checks to ensure that all software modules have not been tampered with and are the latest versions.
[0099] S1-5, check the status of network connection and other communication interfaces to ensure that the system can communicate normally with external devices and servers.
[0100] By sending and receiving test data packets, the system verifies the working status of network interfaces (such as Ethernet, Wi-Fi) and other communication interfaces (such as USB, serial port) to ensure the stability and reliability of data transmission.
[0101] S1-6, after completing all detection and verification steps, the system generates a comprehensive status report.
[0102] The report includes detailed information on hardware performance, image capture device status, software module status, and network connection status. The report will display all test results, including any abnormalities or failures found, for the technician or doctor's reference.
[0103] Through steps S1 - 1 to S1 - 6 , the hysteroscopy system can ensure that all hardware and software components work properly during the startup phase, providing a reliable foundation for subsequent image processing and surgical operations.
[0104] Analyzing image processing pressure is of great significance for the use of hysteroscopy. By evaluating the system's processing pressure under different load conditions in real time, the system can dynamically adjust the image processing strategy to ensure the clarity and real-time nature of the image. This is crucial for doctors during surgery, as high-quality real-time images are the basis for accurate diagnosis and operation. If the image processing pressure is not analyzed and adjusted, the system may experience delays or image quality degradation under high load conditions, affecting the effectiveness and safety of the surgery. Therefore, real-time monitoring and dynamic adjustment of processing pressure not only improves the stability and performance of the system, but also ensures image quality and processing speed during surgery, thereby providing reliable clinical support.
[0105] S2 includes the following:
[0106] S2-1, automatically identifies the current surgery type (such as diagnosis, treatment or specific gynecological surgery type) according to the surgery plan, and calls the preset image processing mode library to select the corresponding processing mode. For example, when the surgery type is "diagnosis", select the high-resolution, low-latency mode.
[0107] S2-2, using deep learning algorithms to analyze the corresponding historical operation data, including processing mode, image quality parameters and processing time. Extract key features from historical data, such as frame rate (FPS), resolution (Res), processing time (T), etc., and apply the following formula to generate the image parameters of the current operation: .
[0108] in:
[0109] Indicates the number of image frames processed per second, which is used to measure the processing speed and smoothness of the system.
[0110] Indicates the resolution of an image, which determines the clarity and level of detail in the image.
[0111] Indicates the time required to process a single frame image, which is used to measure processing efficiency.
[0112] The representative deep learning model accepts key features in the historical operation data as input, including frame rate (FPS), resolution (Res), and processing time (T), and then outputs a set of predicted image processing parameters.
[0113] Represents a set of image processing parameters for prediction.
[0114] S2-3, real-time monitoring of the CPU and GPU load of the current processing task. Specific operations include:
[0115] Get CPU usage and GPU usage .
[0116] Calculate the current load index: .
[0117] in:
[0118] Indicates the current CPU usage and is used to monitor CPU load.
[0119] Indicates the current usage of the GPU, used to monitor GPU load.
[0120] Indicates the current CPU operating frequency, which is used to measure the CPU's working intensity.
[0121] Indicates the current GPU operating frequency, which is used to measure the GPU's working intensity.
[0122] Indicates the current CPU temperature, used to evaluate the CPU thermal status.
[0123] Indicates the current GPU temperature, used to evaluate the thermal status of the GPU.
[0124] S2-4, judging the current image processing pressure according to the real-time load index (LI) and the preset load threshold (Th_{load}) in the image processing mode. The image processing pressure index (PL) is calculated by the following formula: .
[0125] S2-5, dynamically adjust image parameters according to the image processing pressure index (PL), giving priority to ensuring key image quality. For example, if the current pressure is too high, reduce secondary parameters such as frame rate (FPS) or resolution (Res). The adjusted parameters are calculated by the following formula: , ;in, Indicates the adjusted frame rate, which is used to reduce the processing speed to reduce the load under high load conditions; Indicates the adjusted resolution, which is used to reduce the image clarity to reduce the load under high load conditions.
[0126] The image processing pressure index is used to represent and reflect the overall pressure of the system to process images under current conditions. This index comprehensively considers the proportion of the adjusted frame rate and resolution to the maximum possible value, as well as the impact of the system's current load index on processing performance. The larger the image processing pressure index, the greater the pressure on the system to process images under the current load, which means that the system resources are tight and the image processing parameters need to be adjusted to reduce the load; on the contrary, the smaller the image processing pressure index, the lighter the system load, the more ideal the image processing performance, and the sufficient system resources to maintain or improve the image quality and processing speed. Through the image processing pressure index, the system can dynamically evaluate and adjust the image processing strategy to ensure stable and efficient operation under different load conditions.
[0127] According to the image processing stress index, the stress level is divided into three categories: low load, medium load and high load. The following is the detailed stress rating process:
[0128] When the image processing pressure index is less than the first threshold, the system is running in an ideal state, the load is light, the image processing performance is ideal, and the system resources are sufficient, and it is marked as low load. At this time, there is no need to adjust the image processing parameters, and the current processing speed and image quality can be maintained.
[0129] When the image processing pressure index is between the first threshold and the second threshold, the system load is moderate, and the image processing performance begins to be affected to a certain extent, but it is still within an acceptable range and is marked as medium load. At this time, it may be necessary to slightly adjust the image processing parameters, such as moderately reducing the frame rate or resolution, to ensure the smooth operation of the system and the basic guarantee of image quality.
[0130] When the image processing pressure index is equal to or greater than the second threshold, the system load is high, the image processing pressure increases significantly, the system resources are tight, the processing performance is seriously affected, and it is marked as high load. At this time, it is necessary to significantly adjust the image processing parameters, such as significantly reducing the frame rate and resolution, to reduce the system load, ensure stable system operation and avoid overload.
[0131] The present invention effectively optimizes the image processing mode and performance by automatically identifying the type of surgery, analyzing historical operation data, monitoring the load of processing tasks in real time, and dynamically adjusting image processing parameters. Specifically, through the analysis of historical data by deep learning algorithms, the optimal image parameters required for the current surgery can be accurately predicted and set; the load status of the CPU and GPU is monitored in real time, and the load index and processing pressure are calculated to ensure that the system can still run smoothly under high load conditions; the frame rate and resolution are dynamically adjusted according to the processing pressure to maintain key image quality while avoiding system overload. This process ensures the efficiency and stability of the hysteroscopic system, enabling doctors to obtain high-quality image support, thereby improving the accuracy of diagnosis and treatment.
[0132] During hysteroscopic image processing, the purpose of dividing images into primary and secondary images is to optimize the utilization of system resources and ensure the quality and real-time performance of image processing in key medical areas. During complex surgical procedures, the image quality of key areas is crucial to the doctor's diagnosis and operation, while the image quality of secondary areas is relatively secondary. Through this division, image processing resources in key areas can be prioritized, allowing doctors to obtain clear, real-time images, improving the accuracy and safety of surgery, while image processing in secondary areas can be adjusted according to resource conditions to avoid system overload.
[0133] S3 includes the following:
[0134] In the process of hysteroscopic image processing, it is very important to identify and divide the key medical areas. By applying edge detection and feature point matching technology, the key areas in the image can be automatically identified to optimize resource allocation. The following are the specific steps for executing the technical features:
[0135] S3-1, first, preprocess the input hysteroscopic image. The purpose of preprocessing is to remove noise and enhance the contrast of the image, so that the subsequent edge detection and feature point recognition are more accurate. Use Gaussian filter to smooth the image and reduce noise.
[0136] S3-2, after image preprocessing, the Canny edge detection algorithm is used to detect the edges in the image. Canny edge detection includes multiple steps, such as calculating image gradient, non-maximum suppression and double threshold detection.
[0137] First, by calculating the image gradient, we find the places where the brightness changes most significantly in the image, which are usually the edges. The specific process is as follows:
[0138] First, a Gaussian filter is applied to the image to smooth it and remove noise.
[0139] Then, a first-order differential operator (such as the Sobel operator) is used to calculate the gradients of the image in the horizontal and vertical directions respectively.
[0140] Finally, the gradients in these two directions are combined to calculate the gradient magnitude and gradient direction of each pixel. The gradient magnitude reflects the degree of change in the brightness of the pixel, while the gradient direction indicates the direction of the change.
[0141] By calculating the image gradient, a gradient magnitude map and a gradient direction map are obtained for subsequent edge detection.
[0142] The purpose of non-maximum suppression is to refine the edge and make it more accurate and clear. The specific process is as follows:
[0143] For each pixel, according to its gradient direction, its gradient magnitude is compared with the gradient magnitudes of two adjacent pixel points along that direction.
[0144] If the gradient magnitude of the current pixel is greater than the gradient magnitudes of the two neighboring pixels, the gradient magnitude of the pixel is retained; otherwise, its gradient magnitude is set to zero.
[0145] Through non-maximum suppression, a refined edge map is obtained, in which the retained edge pixels are clearer and those pixels that are not true edges are removed.
[0146] The purpose of dual threshold detection is to ultimately determine which pixels belong to the edge. The specific process is as follows:
[0147] By setting the high threshold and the low threshold, the gradient amplitude in the image is divided into three categories: strong edge, weak edge and non-edge.
[0148] First, pixels with gradient magnitudes above a high threshold are marked as strong edges.
[0149] Then, the pixels whose gradient magnitude is between the high threshold and the low threshold are marked as weak edges.
[0150] Finally, all weak edge pixels are checked and if they are connected to strong edge pixels, they are kept as edges; otherwise, they are discarded.
[0151] Through dual threshold detection, the edge and non-edge parts in the image can be effectively distinguished, and finally a binary image with clear edges can be obtained.
[0152] Through the above three steps of calculating image gradient, non-maximum suppression and double threshold detection, the Canny edge detection algorithm can effectively detect the edges in the image and provide accurate and detailed edge information. This edge information is of great significance for subsequent image processing and analysis.
[0153] S3-3, after detecting the edge, it is necessary to identify the feature points in the image, which have significant corner or edge features in the image. Use the Harris corner detection algorithm to complete this step. The corner response function is calculated as follows: ;in, is the autocorrelation matrix, is an empirical constant (usually between 0.04 and 0.06), is the determinant of the matrix, is the trace of the matrix. Calculating the corner response function can help identify points with significant features in the image.
[0154] S3-4, combine the edge detection results and feature point distribution, and use clustering algorithms (such as K-means) to identify the key medical areas in the image. Set the number of cluster centers and the number of iterations , the cluster center is calculated by the following formula: ;in, For the Cluster centers, For the The feature point set of cluster centers, is the feature point.
[0155] This process helps cluster feature points in the image together, thereby identifying key areas.
[0156] S3-5, based on the identified key areas, the image is divided into a primary image and a secondary image. The primary image focuses on the portion containing the key areas, and the secondary image contains the rest. The division is performed using the following formula: , ;in, The main screen area. For the secondary screen area, Pixel To the nearest cluster center distance.
[0157] By dividing the image into primary and secondary frames, the processing quality and real-time performance of the primary frame can be ensured, thereby optimizing the overall processing effect of the hysteroscopic image.
[0158] The present invention automatically identifies the key medical areas in the image by applying edge detection and feature point matching technology, and divides the image into primary and secondary images according to settings or recommendations, thereby ensuring the image processing quality and real-time performance of the key areas. In specific operations, image preprocessing is used to remove noise and enhance contrast, and then the Canny edge detection algorithm is used to accurately identify the image edge, and then the Harris corner detection algorithm is used to identify significant feature points, and the K-means clustering algorithm is used to identify the key medical areas in combination with the edge detection results and feature point distribution, and finally the image is reasonably divided into primary and secondary images by setting a partitioning threshold. In this way, resources can be allocated to process the primary image first, ensuring that the doctor obtains clear and real-time images during the operation, improving the accuracy and safety of the operation, and at the same time, by dynamically adjusting the processing of the secondary image, avoiding system overload and optimizing the overall image processing effect.
[0159] S4 includes the following:
[0160] S4-1, obtaining the pressure level obtained in step S2 and the primary and secondary images obtained in step S3.
[0161] S4-2, uses priority queues to manage resource allocation: the primary screen is assigned the highest priority to ensure its image processing resources; the secondary screen is dynamically adjusted according to the remaining resources and current load conditions.
[0162] S4-3, under low and medium load conditions, resource allocation for the main screen prioritizes its highest requirements, including maximum frame rate and resolution. Before resource allocation, it is necessary to make corrections based on the image processing pressure index to ensure the accuracy and dynamic adjustment capability of resource allocation. The specific calculation is as follows: ;in, This is the main screen area after proofreading. is the total system resources, The biggest requirement for the main screen, It is the image processing pressure index. The larger the value, the higher the system load.
[0163] Through the correction factor Dynamically adjust the resource allocation of the main screen so that it can still be given priority under different load conditions.
[0164] Through the correction factor, when the image processing pressure index is small (indicating a low system load), the correction factor is close to 1, and the main screen almost obtains the resources it needs for the maximum. When the image processing pressure index increases (indicating a high system load), the correction factor decreases, thereby reducing the resource requirements of the main screen accordingly. The benefit of this is that it ensures that the main screen obtains sufficient resources under low and medium load conditions, and reasonably controls resource allocation under high load conditions to avoid system overload and maintain the stability and real-time performance of image processing.
[0165] S4-4, resource allocation of the secondary screen is adjusted according to the remaining resources and the current load condition.
[0166] Under high load conditions, the resources of the primary screen are prioritized, and then the frame rate and resolution of the secondary screen are adjusted based on the remaining resources. The adjustment formula is as follows:
[0167] .
[0168] .
[0169] in, and They are the frame rate and resolution adjustment values of the secondary screen respectively. and They are the maximum frame rate and maximum resolution of the secondary picture respectively.
[0170] The image processing stress index indicates the overall load stress of the system. When the image processing stress index and the processing stress are low, the correction factor When it is close to 1, the secondary screen almost gets its maximum resource requirement. When the image processing pressure index and processing pressure increase, the correction factor decreases, and the resource requirement of the secondary screen also decreases. This dynamic adjustment mechanism ensures that under high load conditions, the resource allocation of the secondary screen can be optimized according to the real-time load of the system, thereby ensuring the high quality and real-time performance of the primary screen.
[0171] By introducing the image processing pressure index into the resource allocation formula for the primary and secondary screens, dynamic resource optimization can be performed under different load conditions. For the primary screen, ensure that it obtains sufficient resources under low and medium load conditions, and reasonably control resource allocation under high load conditions to avoid system overload. For the secondary screen, by dynamically adjusting resource allocation in real time, ensure that resources are reasonably used when system resources are tight, and ensure the stability and efficiency of the overall system. The benefit of this approach is that by dynamically optimizing resource allocation, high-quality and high-real-time image processing can be provided under different load conditions, improving the accuracy and safety of surgery, and optimizing the overall performance of the hysteroscopy system.
[0172] During hysteroscopic image processing, the purpose of dividing images into primary and secondary images is to optimize the utilization of system resources and ensure the quality and real-time performance of image processing in key medical areas. During complex surgical procedures, the image quality of key areas is crucial to the doctor's diagnosis and operation, while the image quality of secondary areas is relatively secondary. Through this division, image processing resources in key areas can be prioritized, allowing doctors to obtain clear, real-time images, improving the accuracy and safety of surgery, while image processing in secondary areas can be adjusted according to resource conditions to avoid system overload.
[0173] Based on the results of pressure level assessment, the present invention adopts a priority queue algorithm to optimize resource allocation, giving priority to image processing resources for the main screen, maintaining its clarity and frame rate, and dynamically adjusting the processing of the secondary screen according to the remaining resources. Ensure that the main screen obtains sufficient resources under low and medium load conditions, and reasonably control resource allocation under high load conditions to avoid system overload; ensure that the image quality of the secondary screen is optimized under high load conditions to reduce the overall load pressure. In this way, the system can still provide high-quality image support under high load and optimize the overall effect of hysteroscopic surgery. Through this dynamic optimization of resource allocation, the system can provide high-quality and high-real-time image processing under different load conditions, improve the accuracy and safety of surgery, and optimize the overall performance of the hysteroscopic system.
[0174] In the hysteroscopic system, the purpose of dynamically adjusting the primary and secondary images is to ensure the best visual support during surgery, optimize system resource utilization, and improve the real-time and quality of image processing. Although the previous steps have optimized image processing by initially setting boundaries and resource allocation, the load during surgery may change, resulting in fluctuations in system performance and image quality. Therefore, real-time monitoring of the load and dynamic adjustment of the boundaries of the primary and secondary images can ensure that the image quality of key areas is prioritized when the load changes, and at the same time reasonably adjust resource allocation according to the load conditions to avoid system overload or resource waste, thereby improving the safety and effectiveness of surgery.
[0175] The necessity of dynamically adjusting the primary and secondary images is to ensure that the hysteroscopic system always provides the best image quality and real-time performance during the operation to meet the high requirements of doctors for the surgical field of view. During the operation, the system load and resource requirements may change with the complexity of the operation and the activation of functions. Without dynamic adjustment, the fixed resource allocation and screen boundaries may not be able to adapt to the real-time changing load, resulting in a decrease in image quality in key areas, which in turn affects the doctor's judgment and operation accuracy. By dynamically adjusting the primary and secondary images, the high-quality processing of the primary image can be prioritized to ensure that the doctor always has a clear and real-time field of view, which is crucial for the accuracy and safety of the operation. In addition, this dynamic adjustment mechanism can reasonably expand the coverage of the primary image when the load is reduced, optimize resource utilization efficiency, and avoid resource waste; when the load is increased, it can issue an early warning in time to prompt the doctor to adjust the system function settings to prevent system overload. In summary, the dynamic adjustment of the primary and secondary images not only improves the performance and reliability of the hysteroscopic system, but also significantly improves the success rate and safety of the operation, providing doctors with a more stable and efficient surgical auxiliary tool.
[0176] S5 includes the following:
[0177] S5-1, firstly, continuously monitor the system load pressure of the hysteroscope based on the image processing pressure index.
[0178] Obtain multiple image processing pressure index data within the recent rated time, build the current analysis data set, and calculate the standard deviation to determine the volatility of the load.
[0179] In order to analyze the overall trend of the current overall complexity, the slope of the image processing pressure index is calculated. The slope of the image processing pressure index is obtained by linear regression of the load index in the time window. , the formula is as follows:
[0180] ; The slope of the image processing pressure index represents the changing trend of the load index. If the slope is a negative value, it means that the load index is decreasing.
[0181] S5-2, taking into account the volatility and trend of the load index, the standard deviation of the pressure index is processed by comprehensive image processing , the average value of image processing stress index The steady-state load reduction coefficient is calculated by the slope of the image processing pressure index. The calculation formula is as follows: ; The steady-state load reduction coefficient is used to determine whether the load is stable and reduced.
[0182] The steady-state load reduction coefficient is used to represent and reflect the stability and reduction of the system load. Specifically, the steady-state load reduction coefficient comprehensively considers the volatility and change trend of the load index, and provides a quantitative indicator to determine whether the system load is stable and reduced. The larger the steady-state load reduction coefficient, the greater the load fluctuation and the less obvious reduction trend, and the system load is not stable enough; on the contrary, the smaller the steady-state load reduction coefficient, the smaller the load fluctuation and the more obvious reduction trend, and the system load is more stable and shows a decreasing trend. Therefore, by monitoring the steady-state load reduction coefficient, the system load status can be dynamically evaluated, and when the load is stable and reduced, resource allocation can be optimized to improve the real-time performance and quality of image processing.
[0183] S5-3, let the initial boundary between the primary and secondary images be .
[0184] In each time interval, the number of key feature points of the main picture and the secondary picture is calculated and Feature points can be obtained through edge detection and feature point matching technology, reflecting the importance and complexity of each area.
[0185] The boundary is adjusted dynamically using the steady-state load reduction coefficient combined with the number of feature points. The smaller the steady-state load reduction coefficient, the more stable and lighter the load is, and the system can gradually expand the range of the main screen. First, calculate the ratio of the difference in the number of feature points, which reflects the distribution of feature points in each area. Then, calculate the boundary adjustment amount combined with the steady-state load reduction coefficient to ensure that the adjustment range is adapted to the current load status.
[0186] If the steady-state load reduction coefficient is less than the instability threshold, the boundary is dynamically adjusted using the steady-state load reduction coefficient combined with the number of characteristic points. The adjustment formula is as follows: ;in, is the boundary adjustment amount, is the adjustment coefficient, which is used to control the adjustment range. and They are the number of feature points of the main picture and the secondary picture respectively.
[0187] According to the calculated border adjustment amount, the border positions of the primary and secondary pictures are updated until the primary picture completely covers the secondary picture.
[0188] When the steady-state load reduction coefficient is less than the instability threshold, it is judged that the current load is in a stable and reduced state, so the size of the main screen will be automatically expanded to gradually cover the secondary screen to maximize the image quality and clarity of the main screen. However, if the steady-state load reduction coefficient is greater than or equal to the instability threshold, it indicates that the main screen cannot bear more load and is still in a high-load state. In this case, the system will maintain the boundary obtained in the previous step S3 as the boundary between the main and secondary screens without adjustment. At the same time, if the system still prompts a high load, the system will issue an early warning prompt and recommend turning off multiple functions that are turned on at the same time or reducing the performance requirement level of a certain function to alleviate the load pressure and ensure the stability and safety of the system operation. This intelligent load management and screen adjustment strategy effectively improves the real-time performance and performance stability of the system and provides reliable image support for medical surgery.
[0189] The present invention continuously monitors the system load pressure of the hysteroscope based on the image processing pressure index, and calculates the standard deviation and slope to evaluate the volatility and trend of the load, and obtains the steady-state load reduction coefficient to determine whether the load is stable and reduced. When the steady-state load reduction coefficient is less than the instability threshold, the system automatically expands the size of the main screen, gradually covers the secondary screen, and improves the image quality; if it is greater than or equal to the instability threshold, the original boundary is maintained and an early warning is issued under high load conditions, and it is recommended to shut down multiple functions or reduce the performance requirement level of a certain function. This intelligent load management and picture adjustment strategy effectively improves the real-time performance and performance stability of the system, and provides reliable image support for medical surgery.
[0190] Embodiment 2: Figure 2 The invention provides a hysteroscopic image optimization system, comprising: a system comprehensive inspection module, a mode intelligent selection module, an edge recognition module, a resource optimization module and a load control module.
[0191] During the startup phase of the hysteroscope, the system comprehensive inspection module automatically performs a hardware and software status check, generates a comprehensive status report, ensures that all hardware and software components are working properly, and outputs the comprehensive status report to the mode intelligent selection module.
[0192] The mode intelligent selection module automatically selects the image processing mode according to the type of surgery, uses deep learning algorithms to analyze historical operation data to set image parameters, and monitors the load of processing tasks on the CPU and GPU in real time, clarifies the current image processing pressure, outputs the image processing mode and initial load pressure data, and passes it to the edge recognition module.
[0193] The edge recognition module uses edge detection and feature point matching technology to automatically identify key medical areas in the image, and divides the image into primary and secondary images according to settings or recommendations, outputs the key area coordinates and the initial boundary data of the primary and secondary images, and passes them to the resource optimization module.
[0194] The resource optimization module optimizes resource allocation based on the pressure level assessment results and uses a priority queue algorithm to prioritize image processing resources for the main screen to maintain its clarity and frame rate. Resource allocation for the secondary screen is adjusted based on the remaining resources to maintain acceptable image quality. The optimized resource allocation plan is output and passed to the load control module.
[0195] The load control module continuously monitors the image processing pressure, analyzes the pressure data in the recent time, calculates the standard deviation and pressure slope, and obtains the steady-state load reduction coefficient; when the image processing pressure is stable and reduced, the boundary between the primary and secondary screens is dynamically adjusted until the primary screen completely covers the secondary screen; otherwise, the previously divided primary and secondary screens are maintained, and corresponding early warning prompts are given according to the current image processing pressure.
[0196] 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 and thresholds in the formula are set by technicians in this field according to actual conditions.
[0197] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.
[0198] 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.
[0199] In the several embodiments provided in the present application, it should be understood that the disclosed systems and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0200] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0202] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0203] 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.
[0204] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A hysteroscopic image optimization method, characterized in that: S1: During the hysteroscopy startup phase, automatically perform hardware and software status checks and generate comprehensive status reports to ensure that all hardware and software components are working properly; S2: Automatically selects image processing mode according to the type of surgery, uses deep learning algorithms to analyze corresponding historical operation data to set image parameters, and monitors the load of processing tasks on the CPU and GPU in real time to clarify the current image processing pressure; S3: Apply edge detection and feature point matching technology to automatically identify key medical areas in the image and divide the image into primary and secondary images according to settings or recommendations; S4: Based on the stress level assessment results, a priority queue algorithm is used to optimize resource allocation, giving priority to image processing resources for the primary screen to maintain its clarity and frame rate. Resource allocation for the secondary screen is adjusted based on the remaining resources to maintain acceptable image quality. S5: continuously monitor the image processing pressure, and dynamically adjust the boundary between the primary and secondary images when the image processing pressure is stable and reduced, until the primary image completely covers the secondary image; otherwise, maintain the primary and secondary images divided in the previous step S3, and give a corresponding warning prompt according to the current image processing pressure; S2 includes the following: S2-1, automatically identifying the current surgery type according to the surgery plan, calling the preset image processing mode library to select the corresponding processing mode; S2-2, using deep learning algorithms to analyze the corresponding historical operation data, including processing mode, image quality parameters and processing time, extract key features from the historical data, and apply the following formula to generate the image parameters of the current operation: ; in: Indicates the number of image frames processed per second; Indicates the resolution of the image; Indicates the time required to process a single frame of image; The representative deep learning model accepts key features from historical operation data as input, including frame rate, resolution, and processing time, and then outputs a set of predicted image processing parameters; represents a set of predicted image processing parameters; S2-3, real-time monitoring of the CPU and GPU load of the current processing task. Specific operations include: Get CPU usage and GPU usage ; Calculate the current load index: ; in: Indicates the current CPU usage, used to monitor CPU load; Indicates the current usage of the GPU, used to monitor GPU load; Indicates the current CPU operating frequency, which is used to measure the CPU's working intensity; Indicates the current GPU operating frequency, which is used to measure the GPU's working intensity; Indicates the current CPU temperature, used to evaluate the CPU thermal status; Indicates the current GPU temperature, used to evaluate the thermal status of the GPU; S2-4, judging the current image processing pressure according to the real-time load index and the preset load threshold in the image processing mode. The image processing pressure index is calculated by the following formula: ; According to the Image Processing Stress Index, the stress levels are divided into three categories: low load, medium load, and high load. The following is a detailed stress rating process: When the image processing pressure index is less than a first threshold, it is marked as low load; When the image processing stress index is between the first threshold and the second threshold, it is marked as a medium load; When the image processing pressure index is equal to or greater than a second threshold, it is marked as high load; S3 includes the following: S3-1, first, preprocessing the input hysteroscopic image; S3-2, after image preprocessing, edges in the image are detected using the Canny edge detection algorithm; S3-3, after detecting the edge, identify the feature points in the image. Use the Harris corner detection algorithm to complete this step. The corner response function is calculated as follows: ; in, is the autocorrelation matrix, is an empirical constant, is the determinant of the matrix, is the trace of the matrix; S3-4, combining edge detection results and feature point distribution, using clustering algorithm to identify key medical areas in the image and set the number of cluster centers and the number of iterations , the cluster center is calculated by the following formula: ; in, For the Cluster centers, For the The feature point set of cluster centers, is the feature point; S3-5, according to the identified key area, the image is divided into a primary image and a secondary image, the primary image focuses on the part containing the key area, and the secondary image contains the rest, and the division is performed by the following formula: , ; in, The main screen area. For the secondary screen area, Pixel To the nearest cluster center distance; S4 includes the following: S4-1, obtaining the pressure level obtained in step S2 and the primary and secondary images obtained in step S3; S4-2, uses priority queues to manage resource allocation: the primary screen is assigned the highest priority to ensure its image processing resources; the secondary screen is dynamically adjusted according to the remaining resources and current load conditions; S4-3, under low and medium load conditions, resource allocation for the main screen gives priority to meeting its highest requirements, including maximum frame rate and resolution. Before allocating resources, it is necessary to make corrections based on the image processing pressure index to ensure the accuracy and dynamic adjustment capability of resource allocation. The specific calculation is as follows: ; in, This is the main screen area after proofreading. is the total system resources, The biggest requirement for the main screen, is the image processing stress index; S4-4, resource allocation of the secondary screen is adjusted according to the remaining resources and current load conditions: Under high load conditions, the resources of the primary screen are prioritized, and then the frame rate and resolution of the secondary screen are adjusted based on the remaining resources. The adjustment formula is as follows: ; ; in, and They are the frame rate and resolution adjustment values of the secondary screen. and They are the maximum frame rate and maximum resolution of the secondary screen respectively; S5 includes the following: S5-1, firstly, continuously monitor the system load pressure of the hysteroscope according to the image processing pressure index; Obtain multiple image processing pressure index data within the recent rated time, construct the current analysis data set, and calculate the standard deviation; In order to analyze the overall trend of the current overall complexity, the slope of the image processing pressure index is calculated. The slope of the image processing pressure index is obtained by linear regression of the load index in the time window. , the formula is as follows: ; Among them, the slope of the image processing stress index represents the changing trend of the load index; S5-2, taking into account the volatility and trend of the load index, the standard deviation of the pressure index is processed by comprehensive image processing , the average value of image processing stress index The steady-state load reduction coefficient is calculated by the slope of the image processing pressure index. The calculation formula is as follows: ; The steady-state load reduction factor is used to determine whether the load is stable and reduced; S5-3, let the initial boundary between the primary and secondary images be ; In each time interval, the number of key feature points of the main picture and the secondary picture is calculated and ; If the steady-state load reduction coefficient is less than the instability threshold, the boundary is dynamically adjusted using the steady-state load reduction coefficient combined with the number of characteristic points. The adjustment formula is as follows: ; in, is the boundary adjustment amount, is the adjustment coefficient, which is used to control the adjustment range. and are the number of feature points of the primary and secondary images respectively; According to the calculated border adjustment amount, the border positions of the primary and secondary images are updated until the primary image completely covers the secondary image; If the steady-state load reduction coefficient is greater than or equal to the instability threshold, in this case, the boundary obtained in the previous step S3 will be maintained as the boundary between the main and secondary screens without adjustment. At the same time, if a high load is still indicated, an early warning prompt will be issued.
2. A hysteroscopic image optimization system, used to implement the hysteroscopic image optimization method according to claim 1, comprising a system comprehensive inspection module, a mode intelligent selection module, an edge recognition module, a resource optimization module and a load control module; During the start-up phase of the hysteroscope, the system comprehensive inspection module automatically performs hardware and software status checks, generates a comprehensive status report, ensures that all hardware and software components are working properly, and outputs the comprehensive status report to the mode intelligent selection module; The mode intelligent selection module automatically selects the image processing mode according to the type of surgery, uses deep learning algorithms to analyze historical operation data to set image parameters, and monitors the load of the processing task on the CPU and GPU in real time, clarifies the current image processing pressure, outputs the image processing mode and initial load pressure data, and transmits it to the edge recognition module; The edge recognition module automatically identifies the key medical areas in the image using edge detection and feature point matching technology, and divides the image into primary and secondary images according to settings or recommendations, outputs the key area coordinates and the initial boundary data of the primary and secondary images, and passes them to the resource optimization module; The resource optimization module optimizes resource allocation based on the pressure level assessment results using a priority queue algorithm, giving priority to image processing resources for the main screen to maintain its clarity and frame rate. Resource allocation for the secondary screen is adjusted based on the remaining resources to maintain acceptable image quality. The optimized resource allocation plan is output and passed to the load control module. The load control module continuously monitors the image processing pressure, analyzes the pressure data in the recent time, calculates the standard deviation and pressure slope, and obtains the steady-state load reduction coefficient; when the image processing pressure is stable and reduced, the boundary between the primary and secondary screens is dynamically adjusted until the primary screen completely covers the secondary screen; otherwise, the previously divided primary and secondary screens are maintained, and corresponding early warning prompts are given according to the current image processing pressure.
Citation Information
Patent Citations
Endoscope display imaging system and method based on wireless communication
CN118115453A
Real-time image processing method and system based on edge calculation
CN118467181A