Dimming method, system and equipment for cold light source of endoscope and storage medium
By adopting PID control algorithms and priority dimming strategies in the endoscopic cold light source, the problem of unstable dimming of the endoscopic cold light source in the prior art is solved, and rapid and stable dimming and image quality improvement are achieved.
Patent Information
- Application Number
- CN202510479502.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-17
AI Technical Summary
The existing endoscopic cold light source dimming method cannot achieve fast and stable dimming, resulting in image brightness flickering and poor quality.
The PID control algorithm is used to determine the dimming strategy of the endoscopic cold light source based on the current image brightness value and the target brightness value, and the image sensor exposure time, LED light driving current, and the image sensor electronic gain are preferred.
The fast and stable dimming of the endoscopic cold light source is achieved, the image quality is improved, and the problems of dimming mutation, brightness flicker and slow dimming are solved.
Smart Images

Figure CN119997291A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of endoscope light source adjustment, and in particular to an endoscope cold light source dimming method, system, device and storage medium. Background Art
[0002] Endoscope cold light source is a key component of the endoscope system. It consists of multiple LED lights and is responsible for providing the necessary lighting for the endoscope. The notable features of this light source are soft light, no heat and no radiation, which help improve the safety of endoscopic medical devices and the comfort of patients. Image brightness automatic adjustment technology is one of the key technologies of endoscope cold light source. The dimming algorithm is used to achieve the dimming of the endoscope cold light source. The purpose is to ensure the stability of the brightness of the endoscope image when the endoscope changes in the body, such as the distance from the object is close or far. The dimming method of the endoscope cold light source obtains the brightness value of the endoscope image in real time to determine whether the difference between the brightness value of the endoscope image and the target brightness value is within the preset range. If it is not within the preset range, the output lighting brightness, image sensor exposure time or electronic gain size are adjusted to adjust the brightness of the endoscope image so that the brightness value of the endoscope image is always kept near the target brightness value to ensure the dimming effect.
[0003] The brightness adjustment of the cold light source lighting lamp of the endoscope 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 of the LED lamp output can be controlled by adjusting the current. For the exposure time of the image sensor, the brightness of the endoscope image can be directly affected by increasing or decreasing the sensing time of the image sensor to light. 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 more obvious the noise, especially in a dark environment. It can be seen that the brightness of the lighting lamp, the exposure time of the image sensor and the electronic gain can all affect the brightness of the endoscope image, and the principles are different and the execution units are different.
[0004] However, the current endoscopic cold light source dimming method cannot quickly and stably dim the endoscopic cold light source during dimming. There are common problems such as dimming mutation, endoscopic image brightness flickering and slow dimming, which ultimately leads to poor endoscopic image quality. Summary of the invention
[0005] The purpose 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 to ensure the quality of the endoscope image.
[0006] To achieve the above objectives, this application provides the following solutions.
[0007] In a first aspect, the present application provides an endoscope cold light source dimming method, and the endoscope cold light source dimming method comprises the following steps.
[0008] Obtain a current image brightness value; the current image brightness value is an image brightness value corresponding to the endoscopic image currently output by the endoscope.
[0009] According to the brightness value of the current image and the brightness value of the target image, a PID control algorithm is used to determine the dimming strategy of the endoscope cold light source; the dimming strategy includes, in order of priority during dimming, an exposure time dimming strategy, an LED lamp driving current dimming strategy and an electronic gain dimming strategy; 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 driving current and the image sensor electronic gain 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 the image The electronic gain of the sensor is set to a minimum value, and the magnitude of the LED lamp driving 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 of the image sensor and the LED lamp driving current in the endoscope are set to the maximum value, and the magnitude of 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 image sensor exposure time, the ALC range refers to the value range of the LED lamp driving current, and the AGC range refers to the value range of the image sensor electronic gain.
[0010] The endoscope cold light source is dimmed according to the dimming strategy.
[0011] In a second aspect, the present application provides an endoscope cold light source dimming system, which includes an endoscope, an endoscope cold light source, an image processor and a display connected in sequence.
[0012] The endoscope comprises an image sensor, and the image sensor is used for collecting an endoscopic image and transmitting the endoscopic image to the endoscopic cold light source.
[0013] The endoscope cold light source is used to provide lighting for the endoscope and forward the endoscope image to the image processor.
[0014] The image processor is used to process the endoscopic image to display it on the display, obtain a current image brightness value of the endoscopic image, and send the current image brightness value to the endoscopic cold light source.
[0015] The endoscope 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 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 of the image sensor, the image sensor electronic gain and / or the LED lamp driving current of the LED driving board according to the current image brightness value and the endoscope cold light source dimming method described in the first aspect to achieve dimming of the LED lamp module.
[0016] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in 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 having a computer program stored thereon, 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 in this application, this application discloses the following technical effects: The present application provides an endoscope cold light source dimming method, system, device and storage medium, which fully considers the influence of three factors, namely, image sensor exposure time, LED lamp driving current and image sensor electronic gain, 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, the dimming strategy of the endoscope cold light source is determined by a PID control algorithm, which includes the exposure time dimming strategy, the LED lamp driving current dimming strategy and the electronic gain dimming strategy in the order of priority during dimming. Among them, the exposure time dimming strategy refers to when the dimming parameter value at the next moment is within the AEC range, the LED lamp driving current and the image sensor electronic gain 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 refers to 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, the electronic gain of the image sensor is set to the minimum value, and the size of the LED lamp driving 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 of the image sensor in the endoscope and the LED lamp driving current are set to the maximum value, and the size of 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, which improves the efficiency and effect of the dimming of the endoscope cold light source, thereby ensuring the quality of the endoscopic image, and effectively solves the problem of poor endoscopic image quality caused by the current endoscopic cold light source dimming method due to dimming mutation, endoscopic image brightness flickering and slow dimming, which is conducive to improving the safety and efficiency of endoscopic surgery. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flowchart of a method for dimming a cold light source in an endoscope provided in one embodiment of the present application.
[0021] Figure 2 A schematic structural diagram of an endoscope cold light source dimming system provided in one embodiment of the present application.
[0022] Figure 3 A schematic diagram of a cold light source dimming method for an endoscope provided in one embodiment of the present application.
[0023] Figure 4A schematic diagram of the relationship between the original AEC, ALC and AGC and image brightness provided in an embodiment of the present application.
[0024] Figure 5 A schematic diagram of the relationship between normalized AEC, ALC and AGC and image brightness provided in an embodiment of the present application.
[0025] Reference numerals: 1-endoscope cold light source; 2-endoscope; 3-image processor; 4-display; 11-LED light module; 12-LED driver board; 13-main control board; 21-image sensor. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0028] like Figure 1 As shown, this embodiment proposes an endoscope cold light source dimming method, which is mainly used in an endoscope cold light source dimming system. Through the endoscope cold light source dimming method, it is intended to quickly and stably dim the endoscope cold light source 1, improve the efficiency and effect of dimming the endoscope cold light source 1, and ensure the quality of the endoscope image, thereby solving the problem of poor endoscope image quality caused by the current endoscope cold light source dimming method due to sudden dimming changes, flickering of endoscope image brightness and slow dimming.
[0029] In an exemplary embodiment, a cold light source dimming system for an endoscope is provided, such as Figure 2 As shown, the endoscope cold light source dimming system includes an endoscope 2, an endoscope cold light source 1, an image processor 3 and a display 4 which are connected in sequence.
[0030] The endoscope 2 includes an image sensor 21, which is used to collect endoscopic images and transmit the endoscopic images to the endoscopic cold light source 1. The image sensor 21 is controlled by the endoscopic cold light source 1, and the image sensor exposure time and the size of the image sensor electronic gain can be adjusted.
[0031] The endoscope cold light source 1 is used to provide lighting for the endoscope 2 and forward the endoscope image to the image processor 3 .
[0032] The image processor 3 is used to process the endoscopic image to display it on the display 4, obtain the current image brightness value of the endoscopic image, and send the current image brightness value to the endoscope cold light source 1.
[0033] The endoscope cold light source 1 includes an LED lamp module 11, an LED driving board 12 and a main control board 13 connected in sequence, wherein 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 to 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 endoscope cold light source dimming system, which is used to adjust the image sensor exposure time of the image sensor 21, the image sensor electronic gain and / or the LED lamp driving current of the LED driving board 12 according to the current image brightness value and the endoscope cold light source dimming method, so as to realize the dimming of the LED lamp module 11.
[0034] Based on the above-mentioned endoscope cold light source dimming system, the endoscope cold light source dimming method proposed in this embodiment specifically includes the following steps.
[0035] Step S1, obtaining a current image brightness value, wherein the current image brightness value is an image brightness value corresponding to an endoscopic image currently output by the endoscope 2.
[0036] In this embodiment, before the step of obtaining the brightness value of the current image in step S1, the endoscope cold light source dimming method further includes the following steps: setting the target image brightness value.
[0037] Step S2: According to the current image brightness value and the target image brightness value, a PID control algorithm is used to determine the dimming strategy of the endoscope cold light source 1.
[0038] In this embodiment, the dimming strategies include, in order of priority during dimming, an exposure time dimming strategy, an LED lamp driving current dimming strategy, and an electronic gain dimming strategy.
[0039] 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 exposure time of the image sensor in the endoscope 2 is adjusted.
[0040] The LED lamp driving current dimming strategy 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 size of the LED lamp driving current in the endoscope 2 is adjusted.
[0041] 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 size of the electronic gain of the image sensor in the endoscope 2 is adjusted.
[0042] 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, which is determined based on the current image brightness value and the target image brightness value. The AEC range refers to the value range of the image sensor exposure time. The ALC range refers to the value range of the LED lamp drive current. The AGC range refers to the value range of the image sensor electronic gain.
[0043] Step S3: dimming the endoscope cold light source 1 according to the dimming strategy.
[0044] In this embodiment, step S2 uses a PID control algorithm to determine a dimming strategy for the endoscope cold light source 1 according to the current image brightness value and the target image brightness value, and specifically includes the following steps.
[0045] Step S21, calculating the PID parameter value according to the current image brightness value and the target image brightness value.
[0046] Step S22: Calculate the dimming parameter value at the next moment according to the PID parameter value.
[0047] 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, wherein 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.
[0048] Step S24, determining a dimming strategy for the endoscope cold light source 1 according to the dimming parameter value at the next moment and the dimming position of the dimming parameter value at the next moment.
[0049] 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 endoscope cold light source dimming method further includes the step of setting dimming conditions, such as Figure 3 As shown, the details are as follows.
[0050] According to the current image brightness value L n and the target image brightness value L targ , determine the current image brightness value L n and the target image brightness value L targ The absolute value of the difference L n - L targ │Is it within the threshold range? Dt Within, that is │ L n - L targ │< Dt , and obtain the first judgment result, including the following two situations.
[0051] (1) When the first judgment result is yes, it means that there is no need to adjust the light, and the current image brightness meets the target image brightness requirement. At this time, the process returns to step S1 "obtaining the current image brightness value" to obtain the image brightness value at the next moment.
[0052] (2) When the first judgment result is no, it means that dimming is required and the current image brightness does not meet the target image brightness requirement, then step S21 "calculating the PID parameter value according to the current image brightness value and the target image brightness value" is executed to dim the endoscope cold light source 1.
[0053] In this embodiment, after the step S3 of dimming the endoscope cold light source 1 according to the dimming strategy, the endoscope cold light source dimming method further includes the following steps.
[0054] Step S4: determine whether the current sampling time has been reached, and obtain a second determination result, including the following two situations.
[0055] (1) When the second judgment result is yes, the process returns to step S1 "obtaining the current image brightness value" to obtain the image brightness value at the next moment.
[0056] (2) When the second judgment result is no, re-judgment is performed as to whether the current sampling time has been reached, until the current sampling time has been reached.
[0057] In this embodiment, the adjustment priorities and specific adjustment methods of the three adjustable parameters of the image sensor exposure time, the LED lamp driving current, and the image sensor electronic gain during dimming are as follows.
[0058] (1) When the image brightness of the endoscope image needs to be increased, the image sensor exposure time is adjusted first. When the image sensor exposure time reaches the maximum, the image brightness still needs to be increased. At this time, the LED lamp drive current is adjusted. When the current reaches the maximum, the image brightness still needs to be increased, and then the image sensor electronic gain is adjusted.
[0059] (2) When the image brightness of the endoscopic image needs to be reduced, the electronic gain of the image sensor is adjusted first. When the electronic gain of the image sensor reaches the minimum, the image brightness still needs to be reduced. At this time, the LED lamp drive current is adjusted. When the LED lamp drive current reaches the minimum, the image brightness still needs to be reduced, and then the image sensor exposure time is adjusted.
[0060] In this embodiment, when dimming the cold light source 1 of the endoscope, the exposure time of the image sensor is adjusted first, because the exposure time of the image sensor has no effect on the image performance. Secondly, the LED lamp driving current is adjusted, because the LED lamp has no effect on the image performance, but too bright will cause the head end of the image sensor 21 to heat up. Finally, the electronic gain of the image sensor is adjusted, because the increase of the electronic gain of the image sensor will produce the side effect of excessive image noise.
[0061] In this embodiment, each of the three adjustable parameters, namely, exposure time of the image sensor, driving current of the LED lamp, and electronic gain of the image sensor, has a function of being selectively enabled.
[0062] In this embodiment, the original parameters of the LED lamp driving current, the image sensor exposure time, and the image sensor electronic gain are synchronized to have different effects on the image brightness, such as Figure 4 As shown, if the original parameters are adjusted, the image brightness changes differently when different actuators are used. Ideally, the three actuators AEC, ALC and AGC increase linearly.
[0063] 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 driving current and the image brightness is in amperes (A); and the relationship between the electronic gain of the image sensor and the image brightness is in magnification.
[0064] In this embodiment, in order to make the actuators corresponding to the LED lamp driving current, the image sensor exposure time and the image sensor electronic gain show a linear growth relationship, the LED lamp driving current, the image sensor exposure time and the image sensor electronic gain are normalized respectively, and logarithmic function processing is performed with a as the base to ensure that they have consistent effects on image brightness at the same pace.
[0065] In this embodiment, the normalized formula of the LED lamp driving current is as follows.
[0066] .
[0067] in, is the normalization coefficient of the LED lamp driving current, This is the normalized result of the LED lamp driving current. is the LED lamp driving current, and a is the base of the logarithmic function.
[0068] In this embodiment, the normalization formula of the exposure time of the image sensor is as follows.
[0069] .
[0070] Where: is the normalization coefficient of the image sensor exposure time, is the result after normalization of the image sensor exposure time, The exposure time of the image sensor.
[0071] In this embodiment, the normalization formula of the electronic gain of the image sensor is as follows.
[0072] .
[0073] in, is the normalization coefficient of the electronic gain of the image sensor, is the normalized result of the electronic gain of the image sensor, is the image sensor electronic gain magnification.
[0074] In this embodiment, adjust the appropriate , , and the parameters of the logarithmic function base a, to achieve Figure 5 The effect shown is that after normalization, AEC, ALC and AGC have a linear relationship with image brightness.
[0075] In this embodiment, the normalized dimming range is the sum of AEC, ALC, and AGC, which is expressed as the following formula.
[0076] .
[0077] .
[0078] .
[0079] .
[0080] .
[0081] .
[0082] .
[0083] in, Represents the normalized dimming range, is the minimum value of the normalized LED lamp driving current. is the maximum value of the normalized LED lamp driving current. is the minimum value of the normalized exposure time of the image sensor. is the maximum value of the normalized exposure time of the image sensor. is the minimum value of the image sensor electronic gain normalized result, is the maximum value of the normalized electronic gain of the image sensor, is the minimum value of the LED lamp driving current, is the maximum value of the LED lamp driving current, is the minimum exposure time of the image sensor, is the maximum exposure time of the image sensor, is the minimum value of the electronic gain magnification of the image sensor, It is the maximum value of the electronic gain magnification of the image sensor.
[0084] In this embodiment, the upper limit and lower limit of the normalized dimming are respectively expressed as the following formulas.
[0085] .
[0086] .
[0087] in, is the lower limit of dimming after normalization, It is the upper limit of dimming after normalization.
[0088] In this embodiment, in actual application, the three actuators AEC, ALC and AGC are not all enabled, and the dimming range and the upper and lower limits will change, which are specifically divided into the following three situations.
[0089] (1) If AEC is not enabled, and ALC and AGC are enabled, the expression is as follows.
[0090] .
[0091] .
[0092] .
[0093] (2) If ALC is not enabled, and AEC and AGC are enabled, the expression is as follows.
[0094] .
[0095] .
[0096] .
[0097] (3) If AGC is not enabled, and AEC and ALC are enabled, the expression is as follows.
[0098] .
[0099] .
[0100] .
[0101] In this embodiment, the PID control algorithm is used for dimming, which specifically includes the following steps.
[0102] 1) Set the target image brightness value to L targ , real-time acquisition of current image brightness value L n .
[0103] 2) Determine the brightness value of the current image L n and the target image brightness value L targ Is the absolute value of the difference less than the threshold range? Dt , if the current image brightness value L n and the target image brightness value L targ The absolute value of the difference is less than the threshold range Dt No dimming is performed, thus avoiding flickering caused by too sensitive dimming. L n and the target image brightness value L targ The absolute value of the difference is greater than or equal to the threshold range Dt Then dimming is performed.
[0104] 3) According to the current image brightness value L n and the target image brightness value is L targ , use the PID control algorithm to calculate the PID parameter value and the dimming parameter value at the next moment.
[0105] In this embodiment, the PID parameter value is calculated using the following formula.
[0106] .
[0107] .
[0108] .
[0109] in, E n The brightness difference between the nth adjustment and the last adjustment; L n is the image brightness value at the nth adjustment; L targ is the brightness value of the target image; E i is the image brightness difference between the i-th adjustment and the last 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 differential value of the PID parameter at the nth adjustment; E n-1 It is the image brightness difference between the n-1th adjustment and the last adjustment.
[0110] In this embodiment, since the current image brightness value obtained is L n , which is actually the image brightness value obtained after the n-1th adjustment (i.e. after the last 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 the next adjustment (i.e., after the nth adjustment) is expressed as L n+1 , which is the image brightness value at the next moment. Correspondingly, the dimming parameter value at the next moment is the dimming parameter value after the nth adjustment, expressed as lg n+1 The current dimming parameter value is the dimming parameter value after the n-1th adjustment, expressed as lg n .
[0111] In this embodiment, the following formula is used to calculate the dimming parameter value at the next moment.
[0112] .
[0113] in, 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-1th adjustment, that is, the current dimming parameter value. E nThe brightness difference between the nth adjustment and the last adjustment; EI n is the integral value of the PID parameter at the nth adjustment; ED n is the differential value of the PID parameter at the nth adjustment; Kp is the proportional coefficient of PID; Ki is the integral coefficient of PID; Kd is the differential coefficient of PID.
[0114] 4) Determine the dimming parameter value at the next moment lg n+1 In the AEC range, ALC range or AGC range of joint 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 and 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.
[0115] 5) When the three actuators AEC, ALC and AGC are not all enabled, the unenabled actuators will not be adjusted.
[0116] In this embodiment, the AEC, ALC and AGC are used for joint dimming. In actual application, not all of them are executed. For example, if AGC is not executed, only AEC and ALC need to be adjusted, which is set by the user. The actuators of AEC and AGC are realized by controlling the image sensor exposure time and electronic gain of the image sensor 21 through the main control board 13, and the actuator of ALC is realized by controlling the LED lamp driving current of the LED driving board 12 through the main control board 13.
[0117] 6) Perform timed sampling to determine whether the sampling time has arrived, and repeat steps 1) to 4) when the sampling time has arrived.
[0118] This embodiment adopts segmented dimming based on three adjustable parameters, namely, LED lamp driving current, image sensor exposure time, and image sensor electronic gain, to normalize the LED lamp driving current, image sensor exposure time, and image sensor electronic gain, respectively, so that they have the same effect on image brightness at the same step. In addition, this embodiment also adopts a PID control algorithm to determine the dimming strategy based on the calculation results, and selects the corresponding execution unit and adjustment step based on different dimming strategies, and sends data to the corresponding execution unit. For example, the image sensor exposure time and the size of the image sensor electronic gain of the image sensor 21 are controlled by the main control board 13, and the size of the LED lamp driving current of the LED driver board 12 is controlled by the main control board 13, so as to realize stable and rapid dimming of the endoscope cold light source 1.
[0119] The endoscope cold light source dimming system in this embodiment has good brightness response characteristics, which means that even when the scene changes, the image sensor 21 of the endoscope 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 reflectivity, which requires the endoscope 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 process, it is possible to ensure that all displays 4 have consistent performance when displaying images, which is crucial to reducing misjudgment and improving the quality of endoscopic examination. The medical endoscope cold light source 1 is required to have high brightness so that the doctor can clearly observe the fine structure in the patient's body. At the same time, since endoscopic surgery needs to be performed in a small space, the stable and fast endoscope cold light source dimming method proposed in this embodiment can ensure that the endoscope 2 as a whole has the characteristics of low heat generation and fast and stable completion of endoscopic examination, thereby shortening the dimming time of the endoscope cold light source 1 and the endoscopic examination time, and improving the efficiency of the dimming of the endoscope cold light source 1 and the endoscopic examination.
[0120] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.
[0121] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A method for dimming a cold light source of an endoscope, characterized in that: The endoscope cold light source dimming method comprises: Acquire a current image brightness value; the current image brightness value is an image brightness value corresponding to an endoscopic image currently output by the endoscope; According to the brightness value of the current image and the brightness value of the target image, a PID control algorithm is used to determine the dimming strategy of the endoscope cold light source; the dimming strategy includes, in order of priority during dimming, an exposure time dimming strategy, an LED lamp driving current dimming strategy and an electronic gain dimming strategy; 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 driving current and the image sensor electronic gain 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 the image The electronic gain of the sensor is set to the minimum value, and the magnitude of the LED lamp driving current in the endoscope is adjusted; the electronic gain dimming strategy refers to setting the exposure time of the image sensor in the endoscope and the LED lamp driving current to the maximum value when the dimming parameter value at the next moment is within the AGC range, and adjusting the magnitude of the electronic gain of the image sensor in the endoscope; 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 image sensor exposure time, the ALC range refers to the value range of the LED lamp driving current, and the AGC range refers to the value range of the image sensor electronic gain; The endoscope cold light source is dimmed according to the dimming strategy.
2. The endoscope cold light source dimming method according to claim 1, characterized in that: Before the step of determining the dimming strategy of the endoscope cold light source by using a PID control algorithm according to the current image brightness value and the target image brightness value, the endoscope cold light source dimming method further includes: The LED lamp driving current, the image sensor exposure time and the image sensor electronic gain are normalized so that the actuators corresponding to the LED lamp driving current, the image sensor exposure time and the image sensor electronic gain have a linear growth relationship.
3. The endoscope cold light source dimming method according to claim 1, characterized in that: According to the brightness value of the current image and the brightness value of the target image, a PID control algorithm is used to determine the dimming strategy of the endoscope cold light source, which specifically includes: Calculating a 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; Determine a 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; The dimming strategy of the endoscope cold light source is determined 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 endoscope 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 endoscope cold light source dimming method further includes: According to the current image brightness value and the target image brightness value, determining whether an absolute value of a difference between the current image brightness value and the target image brightness value is within a threshold range, and obtaining a first determination 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, the step of "calculating the PID parameter value according to the current image brightness value and the target image brightness value" is executed.
5. The endoscope cold light source dimming method according to claim 3, characterized in that: The PID parameter values are calculated using the following formula: ; ; ; in, E n The brightness difference between the nth adjustment and the last adjustment; L n is the image brightness value at the nth adjustment; L targ is the brightness value of the target image; E i is the image brightness difference between the i-th adjustment and the last adjustment; EI n is the integral value of the PID parameter at the nth adjustment; ED n is the differential value of the PID parameter at the nth adjustment; E n-1 It is the image brightness difference between the n-1th adjustment and the last adjustment.
6. The endoscope cold light source dimming method according to claim 3, characterized in that: The dimming parameter value at the next moment is calculated using the following formula: ; in, lg n+1 is the dimming parameter value after the nth adjustment, lg n is the dimming parameter value after the n-1th adjustment; E n The brightness difference between the nth adjustment and the last adjustment; EI n is the integral value of the PID parameter at the nth adjustment; ED n is the differential value of the PID parameter at the nth adjustment; Kp is the proportional coefficient of PID; Ki is the integral coefficient of PID; Kd is the differential coefficient of PID.
7. The endoscope cold light source dimming method according to claim 1, characterized in that: Before the step of obtaining the brightness value of the current image, the endoscope 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 endoscope cold light source dimming system comprises an endoscope, an endoscope cold light source, an image processor and a display connected in sequence; The endoscope comprises an image sensor, which is used to collect an endoscopic image and transmit the endoscopic image to the endoscope cold light source; The endoscope cold light source is used to provide lighting for the endoscope and forward the endoscope image to the image processor; The image processor is used to process the endoscopic image so that it is displayed on the display, and to obtain a current image brightness value of the endoscopic image, and to send the current image brightness value to the endoscopic cold light source; The endoscope cold light source comprises an LED lamp module, an LED driving board and a main control board connected in sequence, wherein 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 driver board according to the current image brightness value and the endoscope cold light source dimming method described in any one of claims 1-7 to achieve dimming of the LED lamp module.
9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the endoscope cold light source dimming method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the endoscope cold light source dimming method according to any one of claims 1 to 7 is implemented.
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
Endoscope apparatus
JP2014113416A
Endoscope system and method for detecting when tail end of endoscope comes into contact with tissue
WO2022037397A1
Endoscope control processing device, endoscope system, and method for operating endoscope control processing device
WO2024142326A1
Cited By
Endoscope system, endoscope body state identification method and cold light source output light protection method
CN121003410A
Exposure parameter adjusting method and device, terminal and storage medium
CN121442195A
Endoscope cold light source output light color stabilizing method and system based on color coordinates
CN121888424A
Endoscope cold light source output light color stabilization method and system based on color coordinates
CN121888424B