An endoscope cold light source dimming method, system, device and storage medium

Through the PID control algorithm combined with exposure time, LED light driving current and electronic gain adjustment, the problem of instability of endoscopic cold light source dimming is solved, and fast and stable endoscopic image dimming is achieved, improving image quality and surgical efficiency.

CN119997291BActive Publication Date: 2025-07-08HANGZHOU LINGMOU MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510479502.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-07-08
Estimated Expiration
2045-04-17

AI Technical Summary

Technical Problem

The existing endoscopic cold light source dimming method cannot achieve fast and stable dimming, resulting in endoscopic image flickering and slow dimming and poor image quality.

Method used

The PID control algorithm is adopted, combining the exposure time dimming strategy, the LED lamp driving current dimming strategy and the electronic gain dimming strategy, and the image sensor exposure time, the LED lamp driving current and the image sensor electronic gain, and the endoscope cold light source is achieved quickly and stably dimming.

Benefits of technology

The quality of endoscopic images is improved, the brightness of endoscopic images is stable, and the safety and efficiency of endoscopic surgery are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119997291B_ABST
    Figure CN119997291B_ABST
Patent Text Reader

Abstract

The present application discloses an endoscope cold light source dimming method, system, device and storage medium, which relates to the technical field of endoscope light source adjustment. The method includes obtaining the current image brightness value; according to the current image brightness value and the target image brightness value, using the PID control algorithm to determine the dimming strategy of the endoscope cold light source; the dimming strategy sequentially includes an exposure time dimming strategy, an LED lamp drive current dimming strategy and an electronic gain dimming strategy according to the priority order during dimming; according to the dimming strategy, the endoscope cold light source is dimmed. The present application can quickly and stably dim the endoscope cold light source to ensure the quality of the endoscope image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of endoscope light source adjustment, and particularly to a method, system, device and storage medium for dimming an endoscope cold light source. Background Art

[0002] The endoscope cold light source is a key component in the endoscope system, consisting of multiple LED lights, which is responsible for providing necessary illumination for the endoscope. The remarkable characteristics of this light source are soft light, no heat and no radiation, which contribute to improving the safety of endoscope medical devices and the comfort of patients. The automatic image brightness adjustment technology is one of the key technologies of the endoscope cold light source. The dimming of the endoscope cold light source is achieved through a dimming algorithm. The purpose is to ensure the stability of the endoscope image brightness when the endoscope changes in the body, such as the distance from an object changing suddenly. The dimming method of the endoscope cold light source obtains the brightness value of the endoscope image in real time and determines whether the difference between the brightness value of the endoscope image and the target brightness value is within a preset range. If it is not within the preset range, the brightness of the output illumination lamp, the exposure time of the image sensor or the size of the electronic gain is adjusted to adjust the brightness of the endoscope image, so that the brightness value of the endoscope image always stays near the target brightness value to ensure the dimming effect.

[0003] The brightness adjustment of the endoscope cold light source illumination lamp is controlled by adjusting the current value of the LED lamp. Since the brightness of the LED lamp is proportional to the current passing through the LED lamp, the brightness output by the LED lamp can be controlled by adjusting the size of the current. For the exposure time of the image sensor, by increasing or decreasing the light sensing time of the image sensor, the brightness and darkness of the endoscope image can be directly affected. When the exposure time increases, the sensor receives more light and the endoscope image becomes brighter; on the contrary, reducing the exposure time will make the endoscope image darker. For the electronic gain of the image sensor, the electronic gain can amplify the endoscope image signal, thereby increasing the brightness of the endoscope image. The adjustment of the electronic gain has a direct impact on the signal-to-noise ratio of the endoscope image. The higher the electronic gain value, the brighter the endoscope image, but the noise is also more obvious, especially in a dark environment. It can be seen that the brightness of the illumination lamp, the exposure time of the image sensor and the electronic gain can all affect the brightness of the endoscope image, and their principles are different and the execution units are different.

[0004] However, when the current endoscope cold light source dimming method is used for dimming, it is impossible to quickly and stably dim the endoscope cold light source, and there are generally problems such as dimming mutation, endoscope image brightness flickering and slow dimming, which ultimately lead to poor quality of the endoscope image. Summary of the Invention

[0005] The object of the present application is to provide an endoscope cold light source dimming method, system, device and storage medium, which can quickly and stably dim the endoscope cold light source and ensure the quality of the endoscope image.

[0006] To achieve the above object, the present application provides the following solutions.

[0007] In the first aspect, the present application provides an endoscope cold light source dimming method, and the endoscope cold light source dimming method includes the following steps.

[0008] Obtain the current image brightness value; the current image brightness value is the image brightness value corresponding to the endoscope image currently output by the endoscope.

[0009] According to the current image brightness value and the target image brightness value, adopt a PID control algorithm to determine the dimming strategy of the endoscope cold light source; the dimming strategy successively includes an exposure time dimming strategy, an LED lamp drive current dimming strategy, and an electronic gain dimming strategy in the order of priority during dimming; wherein, the exposure time dimming strategy means that when the dimming parameter value at the next moment is within the AEC range, set the LED lamp drive current and the image sensor electronic gain in the endoscope to the minimum value, and adjust the exposure time of the image sensor in the endoscope; the LED lamp drive current dimming strategy means that when the dimming parameter value at the next moment is within the ALC range, set the exposure time of the image sensor in the endoscope to the maximum value, and at the same time set the image sensor electronic gain to the minimum value, and adjust the size of the LED lamp drive current in the endoscope; the electronic gain dimming strategy means that when the dimming parameter value at the next moment is within the AGC range, set the exposure time and the LED lamp drive current of the image sensor in the endoscope to the maximum value, and adjust the size of the image sensor electronic gain in the endoscope; the dimming parameter value at the next moment refers to the value that the dimming parameter needs to be adjusted to at the next moment determined according to the current image brightness value and the target image brightness value, the AEC range refers to the value range of the exposure time of the image sensor, the ALC range refers to the value range of the LED lamp drive current, and the AGC range refers to the value range of the image sensor electronic gain.

[0010] Dim the endoscope cold light source according to the dimming strategy.

[0011] In the second aspect, the present application provides an endoscope cold light source dimming system, and the endoscope cold light source dimming system includes an endoscope, an endoscope cold light source, an image processor, and a display connected in sequence.

[0012] The endoscope includes an image sensor, and the image sensor is used to collect an endoscope image and transmit the endoscope image to the endoscope cold light source.

[0013] The endoscope cold light source is used to provide illumination for the endoscope and forward the endoscope image to the image processor.

[0014] The image processor is used to process the endoscope image so that it is displayed on the display, obtain the current image brightness value of the endoscope image, and send the current image brightness value to the endoscope cold light source.

[0015] The endoscope cold light source includes an LED lamp module, an LED driver board, and a main control board connected in sequence. The LED lamp module is used to provide illumination light for the endoscope. The LED driver board is used to provide an LED lamp drive current for the LED lamp module so that the LED lamp module generates illumination light. The main control board is used to adjust the image sensor exposure time, image sensor electronic gain, and / or the LED lamp drive current of the LED driver board according to the current image brightness value, and implement dimming of the LED lamp module according to the endoscope cold light source dimming method described in the first aspect.

[0016] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the endoscope cold light source dimming method described in the first aspect.

[0017] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the endoscope cold light source dimming method described in the first aspect.

[0018] According to the specific embodiments provided by the present application, the following technical effects are disclosed in the present application:

[0019] The present application provides an endoscope cold light source dimming method, system, device, and storage medium, which fully consider the influence of three factors, namely the exposure time of the image sensor, the driving current of the LED lamp, and the electronic gain of the image sensor, on the brightness of the endoscope image. Based on this, on the basis of the current image brightness value and the target image brightness value, a dimming strategy for the endoscope cold light source is determined through a PID control algorithm, which sequentially includes an exposure time dimming strategy, an LED lamp driving current dimming strategy, and an electronic gain dimming strategy according to the priority order during dimming. Among them, the exposure time dimming strategy means that when the dimming parameter value at the next moment is within the AEC range, the driving current of the LED lamp and the electronic gain of the image sensor in the endoscope are set to the minimum value, and the exposure time of the image sensor in the endoscope is adjusted. The LED lamp driving current dimming strategy means that when the dimming parameter value at the next moment is within the ALC range, the exposure time of the image sensor in the endoscope is set to the maximum value, and at the same time the electronic gain of the image sensor is set to the minimum value, and the driving current of the LED lamp in the endoscope is adjusted. The electronic gain dimming strategy means that when the dimming parameter value at the next moment is within the AGC range, the exposure time of the image sensor and the driving current of the LED lamp in the endoscope are set to the maximum value, and the electronic gain of the image sensor in the endoscope is adjusted. According to the above dimming strategy, the endoscope cold light source can be dimmed quickly and stably, improving the efficiency and effect of dimming the endoscope cold light source, thereby ensuring the quality of the endoscope image, effectively solving the problem of poor endoscope image quality caused by sudden dimming, flickering of the endoscope image brightness, and slow dimming in the current endoscope cold light source dimming method, and further being beneficial to improving the safety and efficiency of endoscope surgery. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0021] Figure 1 It is a flowchart of an endoscope cold light source dimming method provided by an embodiment of the present application.

[0022] Figure 2 It is a schematic structural diagram of an endoscope cold light source dimming system provided by an embodiment of the present application.

[0023] Figure 3 It is a schematic diagram of the principle of an endoscope cold light source dimming method provided by an embodiment of the present application.

[0024] Figure 4Schematic diagram of the relationship between the original AEC, ALC, and AGC and the image brightness provided by an embodiment of the present application.

[0025] Figure 5 Schematic diagram of the relationship between the normalized AEC, ALC, and AGC and the image brightness provided by an embodiment of the present application.

[0026] Reference numerals:

[0027] 1 - Endoscope cold light source; 2 - Endoscope; 3 - Image processor; 4 - Display; 11 - LED lamp module; 12 - LED driver board; 13 - Main control board; 21 - Image sensor. Detailed implementation manners

[0028] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0029] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.

[0030] As Figure 1 shown, this embodiment proposes an endoscope cold light source dimming method, which is mainly applied to the endoscope cold light source dimming system. Through this endoscope cold light source dimming method, it aims to quickly and stably dim the endoscope cold light source 1, improve the efficiency and effect of dimming the endoscope cold light source 1, ensure the quality of the endoscope image, and thus solve the problem of poor endoscope image quality caused by sudden dimming, flickering of the endoscope image brightness, and slow dimming in the current endoscope cold light source dimming method.

[0031] In an exemplary embodiment, an endoscope cold light source dimming system is provided. As Figure 2 shown, this endoscope cold light source dimming system includes an endoscope 2, an endoscope cold light source 1, an image processor 3, and a display 4 that are connected in sequence.

[0032] Among them, the endoscope 2 includes an image sensor 21. The image sensor 21 is used to collect the endoscope image and transmit the endoscope image to the endoscope cold light source 1. The image sensor 21 is controlled by the endoscope cold light source 1 and can adjust the exposure time of the image sensor and the size of the electronic gain of the image sensor.

[0033] The endoscope cold light source 1 is used to provide illumination for the endoscope 2 and forward the endoscope image to the image processor 3.

[0034] The image processor 3 is used to process the endoscopic image so that it is displayed on the display 4, obtain the current image brightness value of the endoscopic image, and send the current image brightness value to the endoscopic cold light source 1.

[0035] The endoscopic cold light source 1 includes an LED lamp module 11, an LED driving board 12, and a main control board 13 that are connected in sequence. Among them, the LED lamp module 11 is used to provide illumination light for the endoscope 2. The LED driving board 12 is used to provide an LED lamp driving current for the LED lamp module 11 to drive the LED lamp module 11 to work, so that the LED lamp module 11 generates illumination light. By adjusting the magnitude of the LED lamp driving current, the brightness of the LED lamp module 11 can be controlled. The main control board 13 is the core of the endoscopic cold light source dimming system and is used to adjust the image sensor exposure time, image sensor electronic gain, and / or the LED lamp driving current of the LED driving board 12 according to the current image brightness value according to the described endoscopic cold light source dimming method to achieve dimming of the LED lamp module 11.

[0036] Based on the above endoscopic cold light source dimming system, the endoscopic cold light source dimming method proposed in this embodiment specifically includes the following steps.

[0037] Step S1: Obtain the current image brightness value. Among them, the current image brightness value is the image brightness value corresponding to the endoscopic image currently output by the endoscope 2.

[0038] In this embodiment, before the step of obtaining the current image brightness value in step S1, the endoscopic cold light source dimming method further includes the following step: setting a target image brightness value.

[0039] Step S2: According to the current image brightness value and the target image brightness value, use the PID control algorithm to determine the dimming strategy of the endoscopic cold light source 1.

[0040] In this embodiment, the dimming strategy sequentially includes an exposure time dimming strategy, an LED lamp driving current dimming strategy, and an electronic gain dimming strategy in the order of priority during dimming.

[0041] Among them, the exposure time dimming strategy means that when the dimming parameter value at the next moment is within the AEC (Automatic Exposure Control) range, the LED lamp driving current and the image sensor electronic gain in the endoscope 2 are set to the minimum value, and the size of the image sensor exposure time in the endoscope 2 is adjusted.

[0042] The dimming strategy of the LED lamp driving current means that when the dimming parameter value at the next moment is within the ALC (Automatic Level Control) range, the exposure time of the image sensor in the endoscope 2 is set to the maximum value, the electronic gain of the image sensor is set to the minimum value, and the magnitude of the LED lamp driving current in the endoscope 2 is adjusted.

[0043] The electronic gain dimming strategy means that when the dimming parameter value at the next moment is within the AGC (Automatic Gain Control) range, the exposure time of the image sensor and the LED lamp driving current in the endoscope 2 are set to the maximum value, and the magnitude of the electronic gain of the image sensor in the endoscope 2 is adjusted.

[0044] In this embodiment, the dimming parameter value at the next moment refers to the value to which the dimming parameter needs to be adjusted at the next moment determined according to the current image brightness value and the target image brightness value. The AEC range refers to the value range of the exposure time of the image sensor. The ALC range refers to the value range of the LED lamp driving current. The AGC range refers to the value range of the electronic gain of the image sensor.

[0045] Step S3: Dim the cold light source 1 of the endoscope according to the dimming strategy.

[0046] In this embodiment, in step S2, according to the current image brightness value and the target image brightness value, the PID control algorithm is used to determine the dimming strategy of the cold light source 1 of the endoscope, which specifically includes the following steps.

[0047] Step S21: Calculate the PID parameter value according to the current image brightness value and the target image brightness value.

[0048] Step S22: Calculate the dimming parameter value at the next moment according to the PID parameter value.

[0049] Step S23: Determine the dimming position of the dimming parameter value at the next moment according to the dimming parameter value at the next moment, the AEC range, the ALC range, and the AGC range. Among them, the dimming position refers to the position of the dimming parameter value at the next moment in the AEC range, the ALC range, or the AGC range.

[0050] Step S24: Determine the dimming strategy of the cold light source 1 of the endoscope according to the dimming parameter value at the next moment and the dimming position of the dimming parameter value at the next moment.

[0051] In this embodiment, before the step of calculating the PID parameter value according to the current image brightness value and the target image brightness value in step S21, the method for dimming the cold light source of the endoscope further includes the step of setting dimming conditions, as Figure 3 shown, specifically as follows.

[0052] According to the current image brightness value L n and the target image brightness value L targ , determine whether the absolute value of the difference between the current image brightness value L n and the target image brightness value L targ │ L n - L targ │ is within the threshold range Dt , that is, │ L n - L targ │ < Dt , to obtain the first judgment result, including the following two cases.

[0053] (1) When the first judgment result is yes, it means that no dimming is required at this time, and the current image brightness meets the requirements of the target image brightness. At this time, return to the step of "obtaining the current image brightness value" in step S1 to obtain the image brightness value at the next moment.

[0054] (2) When the first judgment result is no, it means that dimming is required at this time, and the current image brightness does not meet the requirements of the target image brightness. Then execute the step of "calculating the PID parameter value according to the current image brightness value and the target image brightness value" in step S21 to dim the endoscope cold light source 1.

[0055] In this embodiment, after the step of dimming the endoscope cold light source 1 according to the dimming strategy in step S3, the endoscope cold light source dimming method further includes the following steps.

[0056] Step S4, determine whether the current sampling moment is reached to obtain the second judgment result, including the following two cases.

[0057] (1) When the second judgment result is yes, return to the step of "obtaining the current image brightness value" in step S1 to obtain the image brightness value at the next moment.

[0058] (2) When the second judgment result is no, re-determine whether the current sampling moment is reached until the current sampling moment is reached.

[0059] In this embodiment, the adjustment priorities and specific adjustment methods of the three adjustable parameters of the exposure time of the image sensor, the driving current of the LED lamp, and the electronic gain of the image sensor during dimming are as follows.

[0060] (1)When the image brightness of the endoscope image needs to be increased, the exposure time of the image sensor is preferentially adjusted. When the image brightness still needs to be increased when the exposure time of the image sensor reaches the maximum, the LED lamp drive current is then adjusted. When the image brightness still needs to be increased when the current reaches the maximum, the electronic gain of the image sensor is further adjusted.

[0061] (2)When the image brightness of the endoscope image needs to be decreased, the electronic gain of the image sensor is preferentially adjusted. When the image brightness still needs to be decreased when the electronic gain of the image sensor reaches the minimum, the LED lamp drive current is then adjusted. When the image brightness still needs to be decreased when the LED lamp drive current reaches the minimum, the exposure time of the image sensor is further adjusted.

[0062] In this embodiment, when dimming the cold light source 1 of the endoscope, the exposure time of the image sensor is preferentially adjusted because the exposure time of the image sensor has no impact on the image performance. Secondly, the LED lamp drive current is adjusted because the LED lamp has no impact on the image performance, but excessive brightness will cause the head end of the image sensor 21 to heat up. Finally, the electronic gain of the image sensor is adjusted because an increase in the electronic gain of the image sensor will have the side effect of excessive image noise.

[0063] In this embodiment, among the three adjustable parameters of the exposure time of the image sensor, the LED lamp drive current, and the electronic gain of the image sensor, each parameter has the function of selectable enabling.

[0064] In this embodiment, the original parameters of the LED lamp drive current, the exposure time of the image sensor, and the electronic gain of the image sensor have different effects on the image brightness with the same step. As Figure 4 shown, if the original parameters are adjusted, the image brightness changes will be different for different actuators. Ideally, the three actuators of AEC, ALC, and AGC show linear growth.

[0065] In this embodiment, the relationship between the exposure time of the image sensor and the image brightness is in milliseconds (ms); the relationship between the LED lamp drive current and the image brightness is in amperes (A); the relationship between the electronic gain of the image sensor and the image brightness is in multiples.

[0066] In this embodiment, in order to make the actuators corresponding to the LED lamp drive current, the exposure time of the image sensor, and the electronic gain of the image sensor show a linear growth relationship, the LED lamp drive current, the exposure time of the image sensor, and the electronic gain of the image sensor are respectively normalized and processed with a logarithmic function with a as the base to ensure that their effects on the image brightness are consistent with the same step.

[0067] In this embodiment, the normalization formula of the LED lamp drive current is as follows.

[0068] 。

[0069] Among them, is the normalization coefficient of the LED lamp drive current, is the result after normalizing the LED lamp drive current, is the magnitude of the LED lamp drive current, and a is the base of the logarithmic function.

[0070] In this embodiment, the normalization formula for the exposure time of the image sensor is as follows.

[0071]

[0072] In the formula: is the normalization coefficient of the exposure time of the image sensor, is the result after normalizing the exposure time of the image sensor, is the magnitude of the exposure time of the image sensor.

[0073] In this embodiment, the normalization formula for the electronic gain of the image sensor is as follows.

[0074]

[0075] Among them, is the normalization coefficient of the electronic gain of the image sensor, is the result after normalizing the electronic gain of the image sensor, is the magnification of the electronic gain of the image sensor.

[0076] In this embodiment, by adjusting the appropriate , , and the parameter of the base a of the logarithmic function, the effect as shown in Figure 5 is achieved, so that the relationship between the normalized AEC, ALC, and AGC and the image brightness is linear.

[0077] In this embodiment, the normalized dimming range is the sum of AEC, ALC, and AGC, which is expressed as the following formula.

[0078]

[0079]

[0080]

[0081]

[0082]

[0083]

[0084] ​​​​​​​​ .

[0085] Among them, represents the normalized dimming range, is the minimum value of the normalized result of the LED lamp drive current, is the maximum value of the normalized result of the LED lamp drive current, is the minimum value of the normalized result of the image sensor exposure time, is the maximum value of the normalized result of the image sensor exposure time, is the minimum value of the normalized result of the image sensor electronic gain, is the maximum value of the normalized result of the image sensor electronic gain, is the minimum value of the LED lamp drive current, is the maximum value of the LED lamp drive current, is the minimum value of the image sensor exposure time, is the maximum value of the image sensor exposure time, is the minimum value of the image sensor electronic gain magnification, is the maximum value of the image sensor electronic gain magnification.

[0086] In this embodiment, the upper and lower limits of the normalized dimming are respectively expressed as the following formulas.

[0087] .

[0088] .

[0089] Among them, is the lower limit of the normalized dimming, is the upper limit of the normalized dimming.

[0090] In this embodiment, in practical applications, there is a situation where the three actuators of AEC, ALC, and AGC are not all enabled, and the dimming range, upper limit, and lower limit will change. Specifically, it is divided into the following three situations.

[0091] (1) If AEC is not enabled and ALC and AGC are enabled, it is expressed as follows.

[0092] .

[0093] .

[0094] .

[0095] (2) If ALC is not enabled and AEC and AGC are enabled, it is expressed as follows.

[0096] 。

[0097] 。

[0098] 。

[0099] (3) If AGC is not enabled and AEC and ALC are enabled, it is expressed as follows.

[0100] 。

[0101] 。

[0102] 。

[0103] In this embodiment, a PID control algorithm is adopted for dimming, which specifically includes the following steps.

[0104] 1) Set the target image brightness value to L targ , and collect the current image brightness value in real time L n 。

[0105] 2) Judge whether the absolute value of the difference between the current image brightness value L n and the target image brightness value L targ is less than the threshold range Dt . If the absolute value of the difference between the current image brightness value L n and the target image brightness value L targ is less than the threshold range Dt , then no dimming is performed, thus avoiding the problem of flicker caused by overly sensitive dimming. If the absolute value of the difference between the current image brightness value L n and the target image brightness value L targ is greater than or equal to the threshold range Dt , then dimming is performed.

[0106] 3) According to the current image brightness value L n and the target image brightness value being L targ , use the PID control algorithm to calculate the PID parameter value and the dimming parameter value for the next moment.

[0107] In this embodiment, the following formula is used to calculate the PID parameter value.

[0108] 。

[0109] 。

[0110] 。

[0111] Among them, E n is the difference in image brightness between the nth adjustment and the previous adjustment; L n is the image brightness value at the nth adjustment; L targ is the target image brightness value; E i is the difference in image brightness between the ith adjustment and the previous adjustment, where i is an integer from 1 to n; EI n is the integral value of the PID parameter at the nth adjustment; ED n is the derivative value of the PID parameter at the nth adjustment; E n-1 is the difference in image brightness between the (n - 1)th adjustment and the previous adjustment.

[0112] In this embodiment, since the currently obtained image brightness value is L n , which is actually the image brightness value obtained corresponding to after the (n - 1)th adjustment (i.e., the previous adjustment), as the current image brightness value L n , which is also the image brightness value corresponding to the nth adjustment. Then, the image brightness value corresponding to after the next adjustment (i.e., after the nth adjustment) is expressed as L n+1 , that is, the image brightness value at the next moment. Correspondingly, the dimming parameter value at the next moment, that is, the dimming parameter value after the nth adjustment, is expressed as lg n+1 . The current dimming parameter value, that is, the dimming parameter value after the (n - 1)th adjustment, is expressed as lg n .

[0113] In this embodiment, the following formula is used to calculate the dimming parameter value at the next moment.

[0114] .

[0115] Among them, lg n+1 is the dimming parameter value after the nth adjustment, that is, the dimming parameter value at the next moment; lg n is the dimming parameter value after the (n - 1)th adjustment, that is, the current dimming parameter value. E nis the difference in image brightness between the nth adjustment and the previous adjustment; EI n is the integral value of the PID parameters at the nth adjustment; ED n is the derivative value of the PID parameters at the nth adjustment; Kp is the proportional coefficient of the PID; Ki is the integral coefficient of the PID; Kd is the derivative coefficient of the PID.

[0116] 4) Determine the dimming parameter value at the next moment lg n+1 The position in the AEC range, ALC range, or AGC range of the combined dimming. If it is within the AEC range, set ALC and AGC to the minimum value and adjust the size of AEC; if it is within the ALC range, set AEC to the maximum value, AGC to the minimum value, and adjust the size of ALC; if it is within the AGC range, set AEC and ALC to the maximum value and adjust the size of AGC.

[0117] 5) When not all of the three actuators of AEC, ALC, and AGC are enabled, the disabled actuator is not adjusted.

[0118] In this embodiment, combined dimming is performed based on AEC, ALC, and AGC. In the actual application process, there may be situations where not all are executed. For example, if AGC is not executed, then only AEC and ALC need to be adjusted, which is set by the user. The actuators of AEC and AGC are realized by the main control board 13 controlling the image sensor exposure time and image sensor electronic gain of the image sensor 21, and the actuator of ALC is realized by the main control board 13 controlling the LED driving current of the LED driving board 12.

[0119] 6) Sampling at regular intervals, determine whether the sampling moment has arrived, and repeat steps 1) to 4) when the sampling moment arrives.

[0120] This embodiment uses segmented dimming according to the three adjustable parameters of the LED driving current, image sensor exposure time, and image sensor electronic gain. The LED driving current, image sensor exposure time, and image sensor electronic gain are respectively normalized so that their effects on the image brightness are consistent at the same step. Moreover, this embodiment also uses the PID control algorithm to determine the dimming strategy according to the calculation results, and selects the corresponding execution unit and adjustment step based on different dimming strategies, and sends the data to the corresponding execution unit. For example, the main control board 13 controls the image sensor exposure time and image sensor electronic gain of the image sensor 21, and the main control board 13 controls the LED driving current of the LED driving board 12 to achieve stable and fast dimming of the endoscope cold light source 1.

[0121] The endoscopic cold light source dimming system in this embodiment has good brightness response characteristics, which means that even in the case of scene changes, the image sensor 21 of the endoscopic cold light source dimming system can provide stable and high-quality images. The endoscope 2 and its image sensor 21 usually need to work in a narrow space and may encounter surfaces with different reflectivities, which requires the endoscopic cold light source dimming system to be able to adapt to various lighting conditions to ensure the accuracy and reliability of the endoscopic examination results. During the endoscopic examination, it is necessary to ensure that all displays 4 have a consistent performance when displaying images, which is crucial for reducing misjudgment and improving the quality of endoscopic examination. The medical endoscopic cold light source 1 is required to have high brightness so that doctors can clearly observe the fine structures in the patient's body. At the same time, since endoscopic surgery needs to be carried out in a narrow space, through the stable and rapid endoscopic cold light source dimming method proposed in this embodiment, it can be ensured that the overall endoscope 2 has the characteristics of low heat generation, rapid and stable completion of endoscopic examination, thereby shortening the dimming time of the endoscopic cold light source 1 and the endoscopic examination time, and improving the efficiency of the endoscopic cold light source 1 dimming and endoscopic examination.

[0122] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0123] In this article, specific examples are used to elaborate on the principles and implementation manners of the present application. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. An endoscope cold light source dimming method, characterized in that, The endoscopic cold light source dimming method includes: Obtaining the current image brightness value; the current image brightness value is the image brightness value corresponding to the endoscopic image currently output by the endoscope; According to the current image brightness value and the target image brightness value, using a PID control algorithm to determine the dimming strategy of the endoscopic cold light source; the dimming strategy sequentially includes an exposure time dimming strategy, an LED lamp drive current dimming strategy, and an electronic gain dimming strategy according to the priority order during dimming; wherein, the exposure time dimming strategy means that when the dimming parameter value at the next moment is within the AEC range, the LED lamp drive current and the image sensor electronic gain in the endoscope are set to the minimum values, and the exposure time of the image sensor in the endoscope is adjusted; the LED lamp drive current dimming strategy means that when the dimming parameter value at the next moment is within the ALC range, the exposure time of the image sensor in the endoscope is set to the maximum value, and at the same time the image sensor electronic gain is set to the minimum value, and the LED lamp drive current in the endoscope is adjusted; the electronic gain dimming strategy means that when the dimming parameter value at the next moment is within the AGC range, the exposure time and the LED lamp drive current of the image sensor in the endoscope are set to the maximum values, and the electronic gain of the image sensor in the endoscope is adjusted; the dimming parameter value at the next moment refers to the value to which the dimming parameter needs to be adjusted at the next moment determined according to the current image brightness value and the target image brightness value, the AEC range refers to the value range of the exposure time of the image sensor, the ALC range refers to the value range of the LED lamp drive current, and the AGC range refers to the value range of the electronic gain of the image sensor; According to the dimming strategy, dim the endoscopic cold light source.

2. The endoscopic cold light source dimming method according to claim 1, wherein Before the step of using a PID control algorithm to determine the dimming strategy of the endoscopic cold light source according to the current image brightness value and the target image brightness value, the endoscopic cold light source dimming method further includes: Performing normalization processing on the LED lamp drive current, the exposure time of the image sensor, and the electronic gain of the image sensor, so that a linear growth relationship exists among the actuators corresponding to the LED lamp drive current, the exposure time of the image sensor, and the electronic gain of the image sensor.

3. The endoscopic cold light source dimming method according to claim 1, characterized in that, Using a PID control algorithm to determine the dimming strategy of the endoscopic cold light source according to the current image brightness value and the target image brightness value specifically includes: Calculating the PID parameter value according to the current image brightness value and the target image brightness value; Calculating the dimming parameter value at the next moment according to the PID parameter value; Determining the dimming position of the dimming parameter value at the next moment according to the dimming parameter value at the next moment, the AEC range, the ALC range, and the AGC range; the dimming position refers to the position of the dimming parameter value at the next moment in the AEC range, the ALC range, or the AGC range; Determine the dimming strategy of the endoscopic cold light source according to the dimming parameter value at the next moment and the dimming position of the dimming parameter value at the next moment.

4. The endoscopic cold light source dimming method according to claim 3, characterized in that, Before the step of calculating the PID parameter value according to the current image brightness value and the target image brightness value, the endoscopic cold light source dimming method further includes: According to the current image brightness value and the target image brightness value, determine whether the absolute value of the difference between the current image brightness value and the target image brightness value is within the threshold range, and obtain a first judgment result; When the first judgment result is yes, return to the step of "obtaining the current image brightness value" to obtain the image brightness value at the next moment; When the first judgment result is no, execute the step of "calculating the PID parameter value according to the current image brightness value and the target image brightness value".

5. The endoscopic cold light source dimming method according to claim 3, characterized in that Calculate the PID parameter value using the following formula: ; ; ; Among them, E n is the difference in image brightness between the nth adjustment and the previous adjustment; L n is the image brightness value at the nth adjustment; L targ is the target image brightness value; E i is the difference in image brightness between the ith adjustment and the previous adjustment; EI n is the integral value of the PID parameter at the nth adjustment; ED n is the derivative value of the PID parameter at the nth adjustment; E n-1 is the difference in image brightness between the (n - 1)th adjustment and the previous adjustment.

6. The endoscopic cold light source dimming method according to claim 3, characterized in that, Calculate the dimming parameter value at the next moment using the following formula: ; Wherein, lg n+1 is the dimming parameter value after the nth adjustment, lg n is the dimming parameter value after the (n - 1)th adjustment; E n is the difference in image brightness between the nth adjustment and the previous adjustment; EI n is the integral value of the PID parameters during the nth adjustment; ED n is the derivative value of the PID parameters during the nth adjustment; Kp is the proportionality coefficient of the PID; Ki is the integral coefficient of the PID; Kd is the derivative coefficient of the PID.

7. The endoscopic cold light source dimming method according to claim 1, characterized in that Before the step of obtaining the current image brightness value, the endoscopic cold light source dimming method further includes: Set the target image brightness value.

8. An endoscope cold light source dimming system, characterized in that, The endoscopic cold light source dimming system includes an endoscope, an endoscopic cold light source, an image processor, and a display connected in sequence; The endoscope includes an image sensor, and the image sensor is used to collect an endoscopic image and transmit the endoscopic image to the endoscopic cold light source; The endoscopic cold light source is used to provide illumination for the endoscope and forward the endoscopic image to the image processor; The image processor is used to process the endoscopic image so that it is displayed on the display, obtain the current image brightness value of the endoscopic image, and send the current image brightness value to the endoscopic cold light source; The endoscopic cold light source includes an LED lamp module, an LED driving board, and a main control board connected in sequence. The LED lamp module is used to provide illumination light for the endoscope, and the LED driving board is used to provide an LED lamp driving current for the LED lamp module so that the LED lamp module generates illumination light; The main control board is used to adjust the image sensor exposure time, image sensor electronic gain and / or the LED lamp driving current of the LED driving board of the image sensor according to the current image brightness value, and realize the dimming of the LED lamp module according to any one of claims 1-7.

9. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the endoscopic cold light source dimming method according to any one of claims 1-7.

10. A 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 endoscopic cold light source dimming method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Indoor and outdoor automatic adjustment exposure method, system and equipment and storage medium

    CN118075619A

  • Endoscope light source device and endoscope system

    CN119732644A