Medical endoscope image dynamic range self-adaptive adjustment method and system

An adaptive adjustment method based on multi-channel weighted histograms and dynamic Gamma value calculation solves the problems of insufficient dynamic range and flicker in medical endoscope videos, improves image quality and key target recognition capabilities, and adapts to different scenarios and image sensors.

CN121746261APending Publication Date: 2026-03-27KUNMING FEIKANG INTELLIGENT MANUFACTURING TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies cannot effectively solve the problems of insufficient dynamic range, loss of dark details, overexposure of bright areas, poor overall contrast, and inter-frame flicker in medical endoscope videos. In particular, they cannot adapt to changes in image brightness and optimize red targets in different scenarios within the human body cavity environment.

Method used

By employing multi-channel weighted histogram statistics, time-series fusion histogram calculation, image statistical feature extraction, dynamic Gamma value calculation, and adaptive grayscale histogram mapping table, brightness and contrast are dynamically adjusted, especially enhancing the recognition capability of red targets, and a parameterized high-precision processing framework is constructed.

Benefits of technology

It significantly improves the visibility of details in dark areas of images and overall contrast, eliminates inter-frame flicker, increases the speed and accuracy of key target recognition, reduces visual fatigue, and adapts to image sensors with different depths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746261A_ABST
    Figure CN121746261A_ABST
Patent Text Reader

Abstract

The invention relates to a medical endoscope image dynamic range self-adaptive adjustment method and system, and belongs to the technical field of digital image processing. The method comprises the following steps: dynamically calculating the following two key parameters by using statistical information of a current frame and a historical frame of an endoscope image: a dynamic Gamma value for brightness adjustment and a self-adaptive gray histogram mapping table for contrast optimization; the method comprises the following specific steps: carrying out multi-channel weighted histogram statistics to obtain a gray value statistical histogram; calculating a time sequence fusion histogram; image statistical feature extraction; calculating a dynamic Gamma value; adaptive adjustment of histogram distribution is carried out; generating and applying a self-adaptive grey level histogram mapping table; according to the invention, the brightness and contrast of each frame of image of the endoscope video are dynamically and adaptively optimized, and fixed parameters are prevented from being used; while the details of the dark part and the overall contrast ratio are improved, the stability of the inter-frame brightness is maintained, and the flicker phenomenon caused by the scene change is eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method and system for adaptive adjustment of the dynamic range of medical endoscope images, belonging to the field of digital image processing technology. Background Technology

[0002] In minimally invasive endoscopic surgery, doctors rely heavily on real-time video images for diagnosis and procedures. However, due to the complexity of the intracavitary environment, such as uneven lighting, tissue reflection, and light absorption by blood, body fluids, and smoke, captured images often suffer from insufficient dynamic range, specifically manifested as loss of detail in dark areas, overexposure in bright areas, and poor overall contrast.

[0003] Currently, the industry commonly uses the following technologies for image enhancement:

[0004] 1. Fixed-parameter Gamma correction: This method adjusts the brightness of the entire image using a preset Gamma value (e.g., 2.2, 2.4). This method cannot adapt to changes in image brightness across different scenes, easily leading to images that are too dark or too bright, and it fails to balance detail in dark areas with tonal gradation in bright areas.

[0005] 2. Histogram Equalization (HE): Enhances contrast by redistributing pixel gray values. However, its drawback is that it globally stretches the contrast, which can easily lead to over-enhancement when the image gray value distribution is concentrated or extreme, resulting in image distortion, color blocks, and in video sequences, due to abrupt changes in the distribution between frames, causing severe brightness flicker, which can easily cause visual fatigue for surgeons.

[0006] Chinese invention patent CN 112488968 A discloses an "image enhancement method of graded histogram equalization fusion", but it is mainly for static images and does not calculate dynamic adjustment parameters based on image features, so it cannot guarantee the optimal adjustment effect, let alone solve the flickering problem of endoscopic video.

[0007] 3. Image Brightness Histogram: Traditional methods convert RGB images to brightness (Y = 0.299R + 0.587G + 0.114B) images before calculating their brightness histogram. The brightness formula stems from the physiological characteristic that the human eye is most sensitive to green light, followed by red light, and least sensitive to blue light. Therefore, in general image processing, the brightness channel is naturally dominated by the green channel, and its statistical distribution tends to reflect the characteristics of the green component in the image. However, this general design principle deviates significantly from the specificities of medical endoscopic surgery. In the intracavitary environment, the core target tissues of surgical operations—such as blood vessels, muscles, mucous membranes, and critical bleeding points—all exhibit strong red characteristics in their spectral reflectance. If the standard brightness histogram is continued to be used, its green-dominated statistical characteristics will underestimate or even mask the distribution information of these key red targets, causing subsequent enhancement algorithms to fail to focus on optimizing these areas that are crucial to surgical safety and efficiency.

[0008] Furthermore, in specific surgical scenarios involving low illumination or uniform tissue color, the brightness histogram of high bit-depth images (e.g., 13-bit) is prone to exhibiting a sparse distribution (i.e., pixel counts at a large number of gray levels are zero or close to zero). Subsequent equalization mapping using this sparse histogram leads to drastic abrupt changes in the mapping curve, ultimately producing noticeable color blocks or spots on the enhanced image, severely impacting visual appeal and diagnosis. Therefore, image equalization methods using brightness histograms are clinically unsuitable for endoscopic surgical applications.

[0009] Therefore, existing technologies cannot meet the high requirements of endoscopic minimally invasive surgery for dynamic video images that are "stable in brightness, clear in dark areas, rich in detail, and smooth and flicker-free in scene transitions". Summary of the Invention

[0010] To overcome the aforementioned deficiencies in the prior art, this invention provides a method and system for adaptive dynamic range adjustment of medical endoscopic images. This invention achieves dynamic and adaptive optimization of the brightness and contrast of each frame of endoscopic video, avoiding the use of fixed parameters; ensuring the stability of inter-frame brightness while improving dark detail and overall contrast, eliminating flickering caused by scene changes; particularly enhancing the ability to distinguish red targets (such as blood vessels, muscles, and bleeding points) to meet the specific needs of clinical surgery; and constructing a parameterized high-precision processing framework that can adapt to image sensors of different depths, ensuring the algorithm's versatility and forward-looking nature.

[0011] The technical solution of the present invention is: a method for adaptive adjustment of the dynamic range of medical endoscope images, comprising: using statistical information of the current frame and historical frames of the endoscope image to dynamically calculate the following two key parameters: a dynamic Gamma value for brightness adjustment and an adaptive grayscale histogram mapping table for contrast optimization;

[0012] The specific steps of the method are as follows:

[0013] Step 1: Perform multi-channel weighted histogram statistics to obtain a grayscale value statistical histogram;

[0014] Step 2: Calculate the time series fusion histogram;

[0015] Step 3: Image statistical feature extraction;

[0016] Step 4: Calculation of dynamic Gamma value;

[0017] Step 5: Adaptive adjustment of histogram distribution;

[0018] Step 6: Generate and apply an adaptive grayscale histogram mapping table.

[0019] Furthermore, Step 1 specifically includes:

[0020] Calculate the grayscale histogram of the current image Ic. The histograms for the R, G, and B channels were calculated separately and then weighted and fused to enhance the weight of the red channel, thus highlighting clinically relevant red tissues. The mathematical expression for the grayscale value histogram is as follows:

[0021] ;

[0022] in, , , It is a weighted value for the RGB three channels, which is preset according to the surgical department, such as abdominal surgery. = 2, , ; Where L is the number of gray levels in the image.

[0023] Furthermore, Step 2 specifically includes:

[0024] Calculate the statistical histogram of grayscale values ​​in the current frame. Histogram of historical sequences Mean histogram :

[0025]

[0026] Then, Update to a new sequence histogram For use in the next frame; for the first frame, initialize. = , L represents the number of gray levels in the image.

[0027] Furthermore, Step 3 specifically includes:

[0028] Based on the mean histogram Calculate three key feature values:

[0029] Gray mean The average brightness level of the image;

[0030]

[0031] Percentage of pixels below the mean Used to reflect the shape of brightness distribution;

[0032]

[0033] Median gray Grayscale values ​​used to divide a pixel into light and dark parts;

[0034] , L represents the number of gray levels in the image.

[0035] Furthermore, Step 4 specifically includes:

[0036] Based on the features extracted in Step 3, the Gamma correction value is dynamically calculated. :

[0037]

[0038]

[0039] =

[0040]

[0041] in, The grayscale mean is... The percentage of pixels below the mean. The user's desired brightness value. It is the median gray level.

[0042] Furthermore, Step 5 specifically includes:

[0043] Step 5.1. Calculate the standard deviation of the histogram. :

[0044]

[0045]

[0046] in, L is the number of gray levels in the image. This is a histogram of the mean.

[0047] Step 5.2. Calculate the distribution adjustment index :

[0048]

[0049] in, This is an input, adjustable intensity parameter;

[0050] Step 5.3. Adjust the shape of the histogram to obtain the adjusted histogram. :

[0051]

[0052]

[0053]

[0054] Histogram of Mean Histogram A new histogram is obtained after performing the exponential operation. The values ​​are all greater than 1; The value is between 0 and 1.0, and it is used for suppression through exponential operations. The maximum value, The description means to put Add the original value Then return to middle.

[0055] Furthermore, Step 6 specifically includes:

[0056] Based on the adjusted histogram The adaptive gray-level histogram mapping table is calculated using the equalization principle. :

[0057]

[0058] in, It is an integer rounding function that rounds to the nearest whole number after the decimal point. L is the number of gray levels in the image;

[0059] For each pixel in the image, the processing flow is as follows:

[0060] (1) Extracting brightness values : ;

[0061] (2) Dynamic Gamma correction: ;

[0062] (3) Table lookup mapping: ;

[0063] Ultimately, Combined with the original chrominance components, an enhanced color image is output; where, It is the Gamma correction value. It involves performing gamma mapping on the brightness value Y of each pixel. The final output brightness value of the pixel is obtained by looking up the gamma-mapped value in the brightness equalization table H-lut.

[0064] The present invention also provides a dynamic range adaptive adjustment system for medical endoscope images, the system comprising: a module for performing the aforementioned dynamic range adaptive adjustment method for medical endoscope images.

[0065] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned method for adaptive adjustment of the dynamic range of medical endoscope images.

[0066] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the aforementioned method for adaptive adjustment of the dynamic range of medical endoscope images.

[0067] The beneficial effects of this invention are:

[0068] 1. Image quality improvement: In real-world tests across multiple clinical scenarios, the processed image showed an average improvement of approximately 40% in the visibility of dark details and approximately 25% in perceived overall contrast, while effectively maintaining the sense of detail in bright areas.

[0069] 2. Significantly reduced visual fatigue: Through temporal fusion and distribution adjustment, the brightness flickering phenomenon during scene transitions is completely eliminated; in a continuous viewing test lasting up to one hour, the visual fatigue reported by doctors was reduced by more than 70% compared to watching videos processed using traditional methods;

[0070] 3. Enhanced accuracy in assisting clinical diagnosis: Due to the significantly increased weighting of the red channel, doctors experience a marked improvement in the speed and accuracy of identifying key targets such as blood vessels and bleeding points;

[0071] 4. Algorithm versatility and robustness: The parameterized design allows the algorithm to be easily adapted to different image sensors ranging from 10-bit to 16-bit, and it exhibits stable enhancement effects on various brands and models of endoscopic devices. Attached Figure Description

[0072] Figure 1 This is the overall flowchart of the present invention;

[0073] Figure 2 A comparison of endoscopic images before and after applying the method of the present invention;

[0074] Figure 3 This is a comparison chart showing the effects of traditional histogram equalization and the histogram distribution adjustment of this invention (demonstrating the difference in histogram shape before and after adjustment). Detailed Implementation

[0075] Example 1: As Figures 1-3 As shown, a method for adaptively adjusting the dynamic range of medical endoscope images includes: dynamically calculating two key parameters using statistical information from the current frame and historical frames of the endoscope image: a dynamic Gamma value for brightness adjustment and an adaptive grayscale histogram mapping table for contrast optimization; the specific steps of the method are as follows:

[0076] Step 1: Perform multi-channel weighted histogram statistics to obtain a grayscale value statistical histogram;

[0077] Furthermore, Step 1 specifically includes:

[0078] Calculate the grayscale histogram of the current image Ic. The histograms for the R, G, and B channels were calculated separately and then weighted and fused to enhance the weight of the red channel, thus highlighting clinically relevant red tissues. The mathematical expression for the grayscale value histogram is as follows:

[0079] ;

[0080] in, , , It is a weighted value for the RGB three channels, which is preset according to the surgical department; for example, abdominal surgery. = 2, , , Where L is the number of gray levels in the image, L=8192.

[0081] Step 2: Calculate the time series fusion histogram;

[0082] Furthermore, Step 2 specifically includes:

[0083] Calculate the statistical histogram of grayscale values ​​in the current frame. Histogram of historical sequences Mean histogram :

[0084]

[0085] Then, Update to a new sequence histogram For use in the next frame; for the first frame, initialize. = , L represents the number of gray levels in the image.

[0086] Step 3: Image statistical feature extraction;

[0087] Furthermore, Step 3 specifically includes:

[0088] Based on the mean histogram Calculate three key feature values:

[0089] Gray mean The average brightness level of the image;

[0090]

[0091] Percentage of pixels below the mean Used to reflect the shape of brightness distribution;

[0092]

[0093] Median gray Grayscale values ​​used to divide a pixel into light and dark parts;

[0094] , L represents the number of gray levels in the image.

[0095] Step 4: Calculation of dynamic Gamma value;

[0096] Furthermore, Step 4 specifically includes:

[0097] Based on the features extracted in Step 3, the Gamma correction value is dynamically calculated. :

[0098]

[0099]

[0100] =

[0101]

[0102] in, The grayscale mean is... The percentage of pixels below the mean. The user's desired brightness value. It is the median gray level.

[0103] Step 5: Adaptive adjustment of histogram distribution;

[0104] Furthermore, Step 5 specifically includes:

[0105] Step 5.1. Calculate the standard deviation of the histogram. :

[0106]

[0107]

[0108] in, L is the number of gray levels in the image. This is a histogram of the mean.

[0109] Step 5.2. Calculate the distribution adjustment index :

[0110]

[0111] in, This is an input, adjustable intensity parameter;

[0112] Step 5.3. Adjust the shape of the histogram to obtain the adjusted histogram. :

[0113]

[0114]

[0115]

[0116] Histogram of Mean Histogram A new histogram is obtained after performing the exponential operation. The values ​​are all greater than 1; The value is between 0 and 1.0, and it is used for suppression through exponential operations. The maximum value, The description means to put Add the original value Then return to middle.

[0117] Since the value of fpow is usually between 0 and 1.0, it can be suppressed through exponential operations. The maximum value;

[0118] For example: Calculated = 0.35, Yes = 1100, = 37, after exponentiation;

[0119] = = 11.6;

[0120] = = 3.54,

[0121] and The ratio 11.6 / 3.54 is much smaller than the original 1100 / 37;

[0122] Step 6: Generate and apply an adaptive grayscale histogram mapping table.

[0123] Furthermore, Step 6 specifically includes:

[0124] Based on the adjusted histogram The adaptive gray-level histogram mapping table is calculated using the equalization principle. :

[0125]

[0126] in, It is an integer rounding function that rounds to the nearest whole number after the decimal point. L is the number of gray levels in the image;

[0127] For each pixel in the image, the processing flow is as follows:

[0128] (1) Extracting brightness values : ;

[0129] (2) Dynamic Gamma correction: ;

[0130] (3) Table lookup mapping: ;

[0131] Ultimately, Combined with the original chrominance components, an enhanced color image is output; where, It is the Gamma correction value. It involves performing gamma mapping on the brightness value Y of each pixel. The final output brightness value of the pixel is obtained by looking up the gamma-mapped value in the brightness equalization table H-lut.

[0132] The present invention also provides a dynamic range adaptive adjustment system for medical endoscope images, the system comprising: a module for performing the aforementioned dynamic range adaptive adjustment method for medical endoscope images.

[0133] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned method for adaptive adjustment of the dynamic range of medical endoscope images.

[0134] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the aforementioned method for adaptive adjustment of the dynamic range of medical endoscope images.

[0135] Figure 2 (a) is the original input image. In endoscopic surgery scenarios, the exposure is usually reduced to ensure the integrity of the imaging details, but the image looks dark and the contrast is not good, making it difficult to distinguish the details. Figure 3 (a) is a statistical histogram of the three RGB channels of the original image. It can be seen from the figure that the grayscale distribution of each channel is concentrated in the low to medium part.

[0136] Figure 2 (b) shows the image effect after applying the method of this invention. The overall brightness is improved, the contrast is suitable for prolonged viewing by the human eye, and the structural details of objects in the image are easily distinguishable. From Figure 3 (b) It can also be seen that the grayscale distribution of the three RGB channels has been expanded, especially the red channel, which basically covers the entire grayscale range. This is because the present invention uses red-weighted histogram fusion, which makes it easier to distinguish red targets such as blood vessels and bleeding points, making it suitable for medical surgical scenarios. In addition, it can be seen that the histograms of each RGB channel of the image processed by the method of the present invention are smooth and continuous, which means that there will be no brightness jumps or color blocks when viewed by the human eye.

[0137] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A method for adaptive adjustment of the dynamic range of medical endoscopic images, characterized in that: include: Using statistical information from the current and historical frames of the endoscopic image, the following two key parameters are dynamically calculated: a dynamic Gamma value for brightness adjustment and an adaptive grayscale histogram mapping table for contrast optimization. The specific steps of the method are as follows: Step 1: Perform multi-channel weighted histogram statistics to obtain a grayscale value statistical histogram; Step 2: Calculate the time series fusion histogram; Step 3: Image statistical feature extraction; Step 4: Calculation of dynamic Gamma value; Step 5: Adaptive adjustment of histogram distribution; Step 6: Generate and apply an adaptive grayscale histogram mapping table.

2. The adaptive adjustment method for dynamic range of medical endoscope images according to claim 1, characterized in that: Step 1 specifically includes: Calculate the grayscale histogram of the current image Ic. The histograms for the R, G, and B channels were calculated separately and then weighted and fused to enhance the weight of the red channel, thus highlighting clinically relevant red tissues. The mathematical expression for the grayscale value histogram is as follows: ; in, , , It is the weight value of the RGB three channels, which is preset according to the surgical department, and L is the number of gray levels of the image.

3. The adaptive adjustment method for dynamic range of medical endoscope images according to claim 1, characterized in that: Step 2 specifically includes: Calculate the statistical histogram of grayscale values ​​in the current frame. Histogram of historical sequences Mean histogram : ; Then, Update to a new sequence histogram For use in the next frame; for the first frame, initialize. = , L represents the number of gray levels in the image.

4. The adaptive adjustment method for dynamic range of medical endoscope images according to claim 1, characterized in that: Step 3 specifically includes: Based on the mean histogram Calculate three key feature values: Gray mean The average brightness level of the image; ; Percentage of pixels below the mean Used to reflect the shape of brightness distribution; ; Median gray Grayscale values ​​used to divide a pixel into light and dark parts; , L represents the number of gray levels in the image.

5. The adaptive adjustment method for dynamic range of medical endoscope images according to claim 1, characterized in that: Step 4 specifically includes: Based on the features extracted in Step 3, the Gamma correction value is dynamically calculated. : ; ; = ; ; in, The grayscale mean is... The percentage of pixels below the mean. The user's desired brightness value. It is the median gray level.

6. The method for adaptive adjustment of the dynamic range of medical endoscope images according to claim 1, characterized in that: Step 5 specifically includes: Step 5.

1. Calculate the standard deviation of the histogram. : ; ; in, L is the number of gray levels in the image. This is a histogram of the mean. Step 5.

2. Calculate the distribution adjustment index : ; in, This is an input, adjustable intensity parameter; Step 5.

3. Adjust the shape of the histogram to obtain the adjusted histogram. : ; ; ; Histogram of Mean Histogram A new histogram is obtained after performing the exponential operation. The values ​​are all greater than 1; The value is between 0 and 1.0, and it is used for suppression through exponential operations. The maximum value, The description means to put Add the original value Then return to middle.

7. The adaptive adjustment method for dynamic range of medical endoscope images according to claim 1, characterized in that: Step 6 specifically includes: Based on the adjusted histogram The adaptive gray-level histogram mapping table is calculated using the equalization principle. : ; in, It is an integer rounding function that rounds to the nearest whole number after the decimal point. L is the number of gray levels in the image; For each pixel in the image, the processing flow is as follows: (1) Extracting brightness values : ; (2) Dynamic Gamma correction: ; (3) Table lookup mapping: ; Ultimately, Combined with the original chrominance components, an enhanced color image is output; where, It is the Gamma correction value. It involves performing gamma mapping on the brightness value Y of each pixel. The final output brightness value of the pixel is obtained by looking up the gamma-mapped value in the brightness equalization table H-lut.

8. A dynamic range adaptive adjustment system for medical endoscope images, characterized in that, The system includes a module for performing an adaptive adjustment method for the dynamic range of medical endoscope images as described in any one of claims 1 to 7.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the adaptive adjustment method for dynamic range of medical endoscope images as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the adaptive adjustment method for the dynamic range of medical endoscope images as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image enhancement method based on hierarchical histogram equalization fusion

    CN112488968A