Image brightness adjustment method, light adjustment device, and endoscope

By dynamically adjusting the target brightness, the image brightness adjustment method solves the problem of overexposure or underexposure of endoscopic images, realizes fast and accurate brightness adjustment in complex scenes, and improves the clarity of image observation.

CN116055893BActive Publication Date: 2026-01-27SUZHOU JINGGUAN MEDICAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310040108.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-13
Publication Date
2026-01-27
Estimated Expiration
2043-01-13

AI Technical Summary

Technical Problem

During surgery, existing electronic endoscopes may cause overexposure or underexposure of images due to changes in the distance between the lens and the object being photographed. The existing mean metering method cannot effectively adjust the brightness of overexposed areas, affecting the clarity of the doctor's observation.

Method used

An image brightness adjustment method that dynamically adjusts the target brightness is adopted. By obtaining the average brightness and overexposure evaluation parameters of the current frame image, the brightness difference and target brightness of the image are dynamically adjusted to reduce overexposure areas and improve the average brightness.

Benefits of technology

While reducing overexposed areas, the average brightness of the image is increased, enabling fast and precise brightness adjustment to ensure image clarity and adapt to the complexities of endoscopic applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116055893B_ABST
    Figure CN116055893B_ABST
Patent Text Reader

Abstract

The application provides an image brightness adjusting method, a light adjusting device and an endoscope. The image brightness adjusting method is applied to the endoscope and includes the following steps: S1, acquiring an average brightness of a current frame image and a preset first target brightness; S2, obtaining a brightness difference value according to the average brightness and the first target brightness; S3, judging whether the brightness difference value is within a first threshold range, if yes, acquiring an overexposure evaluation parameter of the current frame image, if no, adjusting the brightness of the image until the brightness difference value is within the first threshold range; S4, judging whether the overexposure evaluation parameter is within a second threshold range, if yes, completing the adjustment, if no, adjusting the first target brightness. The application can dynamically adjust the target brightness of the image, and can guarantee the average brightness of the image as much as possible under the premise of reducing the overexposure area of the image as much as possible. Meanwhile, the application has the characteristics of fast light adjusting convergence speed and accurate light adjusting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of endoscopy technology, and more particularly to an image brightness adjustment method, a dimming device, and an endoscope. Background Technology

[0002] An electronic endoscope is a medical electro-optical instrument that integrates advanced optical, mechanical, and electronic technologies, allowing direct observation, diagnosis, and treatment of the body cavities and internal organs. During surgery on these cavities, doctors need to observe images captured by the endoscopic system to understand their condition. Because the distance between the endoscope lens and the object being observed changes during surgery, the images captured by the endoscopic system often suffer from overexposure or underexposure, making it difficult for doctors to observe clear images of the internal organs. Therefore, the brightness of the endoscopic images needs to be frequently adjusted.

[0003] Current electronic endoscopes primarily use mean metering to adjust image brightness. This means setting a fixed target brightness and adjusting the average brightness of the image to achieve that target. However, real-world scenarios are often complex. Sometimes the overall image is dark, but certain areas are severely overexposed, making it impossible to see details in those overexposed areas. If mean metering is still used to bring the average brightness of the image closer to the fixed target value, it's impossible to suppress the brightness of the overexposed areas, and the doctor will not be able to see the details in those areas.

[0004] In view of this, it is indeed necessary to provide an image brightness adjustment method, a dimming device, and an endoscope to solve the above problems. Summary of the Invention

[0005] The purpose of this invention is to provide an image brightness adjustment method that maximizes the average brightness of the image while minimizing overexposed areas.

[0006] To achieve the above objectives, the present invention provides an image brightness adjustment method applied to an endoscope, the image brightness adjustment method comprising:

[0007] S1: Obtain the average brightness of the current frame image and the preset first target brightness;

[0008] S2: Obtain the brightness difference based on the average brightness and the brightness of the first target;

[0009] S3: Determine whether the brightness difference is within the first threshold range. If yes, obtain the overexposure evaluation parameters of the current frame image. If no, adjust the brightness of the image until the brightness difference is within the first threshold range.

[0010] S4: Determine whether the overexposure evaluation parameter is within the second threshold range. If yes, complete the adjustment; otherwise, adjust the brightness of the first target.

[0011] As a further improvement of the present invention, the image brightness adjustment method further includes:

[0012] S5: Obtain the adjusted second target brightness;

[0013] S6: Adjust the average brightness of the image according to the second target brightness, and calculate the adjusted average brightness of the image and the brightness difference between the average brightness and the second target brightness;

[0014] S7: When the brightness difference is within the first threshold range and the overexposure evaluation parameter is within the second threshold range, the brightness adjustment of the image is completed.

[0015] As a further improvement of the present invention, the method for calculating the overexposure evaluation parameter includes:

[0016] S31: Define a point where the gray value of a single pixel exceeds the third threshold as an overexposed point;

[0017] S32: The overexposure evaluation parameter is the sum of the gray values ​​of all overexposed points in the image.

[0018] As a further improvement of the present invention, the method for adjusting the brightness of the first target includes:

[0019] S41: When the exposure evaluation parameter is greater than the upper limit of the second threshold range, reduce the brightness of the first target;

[0020] S42: When the exposure evaluation parameter is less than the lower limit of the second threshold range, increase the brightness of the first target.

[0021] As a further improvement of the present invention, the brightness of the first target is reduced or increased by a multiple of the minimum adjustment step size.

[0022] As a further improvement of the present invention, when the brightness difference is not within the first threshold range, the method for adjusting the brightness of the image includes: keeping the first target brightness unchanged and adjusting the average brightness of the image.

[0023] As a further improvement of the present invention, the average brightness of the image is adjusted by adjusting the scaling factor until the brightness difference is within the first threshold range, wherein the scaling factor is equal to the power of a of the ratio of the first target brightness to the average brightness of the current frame image, where a is a constant and 0 < a < 1.

[0024] As a further improvement of the present invention, the average brightness is calculated once for each frame of image, the brightness difference is judged once, the overexposure evaluation parameter is obtained at most once, and the target brightness is adjusted at most once.

[0025] Another object of the present invention is to provide a dimming device that applies the above-described image brightness adjustment method.

[0026] To achieve the above objectives, the present invention provides a dimming device, the dimming device comprising:

[0027] The parameter acquisition module is used to acquire the average brightness of the image, the preset first target brightness, the adjusted second target brightness, and the overexposure point.

[0028] The calculation module calculates the brightness difference based on the average brightness and the ratio of the first target brightness to the second target brightness, calculates the adjustment ratio coefficient based on the average brightness and the ratio of the first target brightness to the second target brightness, and calculates the overexposure evaluation parameters based on the overexposure point.

[0029] The judgment module determines whether the brightness difference is within a first threshold range and whether the overexposure evaluation parameter is within a second threshold range.

[0030] The control module adjusts the image brightness using the aforementioned image brightness adjustment method.

[0031] The present invention also provides an endoscope, which includes the above-described dimming device.

[0032] The beneficial effects of this invention are as follows: Compared with the prior art, the image brightness adjustment method, dimming device, and endoscope of this invention, wherein the image brightness adjustment method acquires the overexposure evaluation parameters of the image when the average brightness is close to the first target brightness, and determines whether the overexposure evaluation parameters are within a second threshold range, so as to dynamically adjust the target brightness of the image, thereby maximizing the average brightness of the image while minimizing the overexposure area. Simultaneously, this invention features fast dimming convergence speed and precise dimming. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating an image brightness adjustment method according to a preferred embodiment of the present invention.

[0034] Figure 2 This is a flowchart illustrating a preferred embodiment of the target brightness adjustment method of the present invention.

[0035] Figure 3 This is an overall judgment flowchart of an image brightness adjustment method according to a preferred embodiment of the present invention.

[0036] Figure 4 This is a schematic diagram of a method for adjusting the average brightness of an image according to a preferred embodiment of the present invention.

[0037] Figure 5 This is a structural block diagram of the dimming device of the present invention. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0039] It should be noted that, in order to avoid obscuring the present invention with unnecessary details, only the structures and / or processing steps closely related to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0040] Additionally, it should be noted that the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0041] For electronic endoscopes using CMOS imaging, the approximate calculation method for the brightness of each pixel in a CMOS sensor under ideal conditions is as follows:

[0042] Brightness of a single pixel = CMOS exposure time * CMOS gain * Light intake

[0043] The longer the CMOS exposure time, the higher the CMOS gain, or the greater the amount of light entering the image, the brighter the individual pixel. Based on the monotonicity relationship, the overall brightness of the image can be expressed by the following formula:

[0044] Image brightness = F(CMOS exposure time, CMOS gain, light source brightness).

[0045] Where F is a function that satisfies the following characteristics: among the three parameters of CMOS exposure time, CMOS gain, and light source brightness, the other two parameters remain unchanged, and if any single parameter is monotonically increasing, then F is monotonically increasing.

[0046] For electronic endoscopes used within human body cavities, almost all light intake comes from illumination. Under ideal conditions, the amount of light intake is approximately proportional to the brightness of the light source; therefore, the overall image brightness can be approximated using the following formula:

[0047] Image brightness ≈ CMOS exposure time * CMOS gain * Light source brightness * Scale factor

[0048] The above formula is derived under ideal conditions, but the actual situation is much more complex. For example, when the average brightness of the current image is adjusted towards a fixed target brightness, in actual endoscopic use scenarios, sometimes the overall image is dark, but some areas are severely overexposed, making it impossible to see the details in the overexposed areas. If the average brightness of the image is still adjusted towards the fixed target brightness using the above average metering method, the brightness of the overexposed areas cannot be suppressed, and the doctor will not be able to see the details in the overexposed image areas.

[0049] Therefore, based on the aforementioned mean metering method, this invention proposes a mean metering method for dynamically adjusting target brightness. In other words, in the image brightness adjustment method of this invention, the target brightness of the image is dynamic, not constant; it is dynamically adjusted based on the current average brightness of the image and overexposed areas.

[0050] Please see Figures 1 to 5 As shown, the present invention provides an image brightness adjustment method according to a preferred embodiment, applied to a dimming device 100 of a CMOS imaging electronic endoscope, the image brightness adjustment method comprising:

[0051] S1: Obtain the average brightness Y of the current frame image. 平均 And the preset first target brightness Y1.

[0052] Specifically, the average brightness Y of the current frame image is obtained through the parameter acquisition module 20 of the dimming device 100. 平均 And the preset first target brightness Y1.

[0053] Optionally, the parameter acquisition module 20 acquires the RGB image data of the current frame image, then converts the RGB image data into YCbCr image data, and calculates the average brightness Y of the current frame image. 平均 .

[0054] The image brightness adjustment method includes step S11: initializing the first target brightness Y1.

[0055] Specifically, the upper limit threshold Y of the target brightness Y is selected based on experience. H and lower limit threshold Y L At the upper threshold Y H and lower limit threshold Y L A value can be arbitrarily selected from the range as the first target brightness Y1. In this embodiment, the selected first target brightness Y1 is the middle value of the target brightness range. That is, the first target brightness Y1 = (Y H +Y L ) / 2. In other embodiments, an upper limit value Y can also be selected. H and lower limit value Y LThe other values ​​in between represent the first target brightness Y1.

[0056] S2: Based on average brightness Y 平均 The brightness difference is obtained by comparing it with the brightness of the first target, Y1.

[0057] The calculation module 40 of the dimming device 100 calculates based on the average brightness Y. 平均 The brightness difference is calculated based on the first target brightness Y1.

[0058] S3: Determine whether the brightness difference is within the first threshold range. If yes, obtain the overexposure evaluation parameters of the current frame image. If no, adjust the brightness of the image until the brightness difference is within the first threshold range.

[0059] The judgment module 30 of the dimming device 100 judges and compares the average brightness Y of the current frame image. 平均 And whether the brightness difference of the first target brightness Y1 is within the first threshold range, that is, the judgment module 30 of the dimming device 100 judges and compares the average brightness Y of the current frame image. 平均 Whether it is close to the first target brightness Y1. Preferably, the first threshold is 5.

[0060] If not, the brightness of the image is adjusted by the control module 50 of the dimming device 100 until the average brightness Y is reached. 平均 The brightness difference between the first target brightness Y1 and the first target brightness Y1 is within the first threshold range.

[0061] If so, the overexposure point and overexposure evaluation parameters of the current frame image are obtained through the parameter acquisition module 20 and calculation module 40 of the dimming device 100, and the brightness of the first target is adjusted based on the overexposure evaluation parameters.

[0062] Specifically, in this embodiment, the brightness of the image is adjusted using mean metering, so that the average brightness Y of the image is... 平均 Approaching the first target brightness Y1. That is, when the brightness difference is not within the first threshold range, the method for adjusting the brightness of the image includes: keeping the first target brightness Y1 unchanged, and adjusting the average brightness Y of the image. 平均 .

[0063] Furthermore, the average brightness Y of the image is adjusted by the scaling factor K. 平均 Adjustments are made until the brightness difference falls within the first threshold range. The adjustment ratio K is equal to the sum of the first target brightness Y1 and the average brightness Y of the current frame image. 平均 The ratio is raised to the power of a, where a is a constant and 0 < a < 1. This is achieved by adjusting the proportional coefficient K to equal the ratio of the first target brightness Y1 to the average brightness Y. 平均The ratio is raised to the power of a to make the image brightness adjustment process smoother, that is, the transition between the brightness of two frames is smoother, thus improving visual comfort.

[0064] Optionally, the dimming device 100 includes a CMOS exposure time adjustment range 11, a light source brightness adjustment range 12, and a CMOS gain adjustment range 13. The adjustment ratio K is different for each adjustment range. The average brightness Y of the image is adjusted using the adjustment ratio K. 平均 When making adjustments, it is also necessary to determine the current adjustment range and use the adjustment ratio K of that range to adjust the average brightness Y of the image. 平均 Adjustments were made.

[0065] For example, in this embodiment, the CMOS exposure time adjustment range 11 corresponds to the first adjustment ratio coefficient K1, K1 = (first target brightness Y1 / average brightness Y1) / (first target brightness Y1) / (average ... 平均 ) a1 Preferably, in this embodiment, a1 = 0.2.

[0066] The light source brightness adjustment range 12 corresponds to the second adjustment ratio coefficient K2, K2 = (first target brightness Y1 / average brightness Y) 平均 ) a2 Preferably, in this embodiment, a2 = 0.3.

[0067] CMOS gain adjustment range 13 corresponds to the third adjustment ratio coefficient K3, K3 = (first target brightness Y1 / average brightness Y) 平均 ) a3 Preferably, in this embodiment, a3 = 0.1.

[0068] In this embodiment, a1, a2, and a3 in the first adjustment proportional coefficient K1, the second adjustment proportional coefficient K2, and the third adjustment proportional coefficient K3 are different. In other embodiments, a1, a2, and a3 may be the same or partially the same. This invention does not limit this. That is, the constant a is an empirical value and can be adjusted according to actual conditions.

[0069] The average brightness Y of the image is adjusted by the scaling factor K. 平均The adjustment method is as follows: multiply the parameter value of the current frame image within the current adjustment interval by the adjustment ratio coefficient K corresponding to that adjustment interval to obtain the parameter value of the next frame image. If the parameter value of the next frame image exceeds the adjustment range of the adjustment interval, the parameter value is truncated. That is, if the result of multiplying the parameter value of the current frame image within the current adjustment interval by the adjustment ratio coefficient K is greater than the upper threshold of the adjustment range of that adjustment interval, the parameter value of the next frame image is adjusted to that upper threshold; if the result of multiplying the adjustment value of the current adjustment interval by the adjustment ratio coefficient K is less than the lower threshold of the adjustment range of that adjustment interval, the parameter value of the next frame image is adjusted to that lower threshold.

[0070] If the average brightness Y can be obtained within the current adjustment range 平均 This makes the average brightness Y 平均 If the brightness difference between the target brightness Y1 and the target brightness Y1 is within the first threshold range, then the average brightness Y can be adjusted within the current adjustment range. 平均 Adjustments are made. If the average brightness Y is obtained within the current adjustment range... 平均 It cannot make the average brightness Y 平均 If the brightness difference between the target brightness Y1 and the average brightness Y1 is within the first threshold range, then the average brightness Y1 can be adjusted within the adjacent adjustment range as needed. 平均 Adjustments were made.

[0071] For example, if the current light source brightness adjustment range is 12, and the current light source brightness has reached the lower limit threshold of the light source brightness adjustment range, and the average brightness Y... 平均 The brightness is greater than the first target brightness Y1, and the average brightness Y 平均 If the brightness difference between the target brightness Y1 and the target brightness Y1 is not within the first threshold range, then the system enters the CMOS exposure time adjustment range 11; if the system is currently in the light source brightness adjustment range 12, and the current light source brightness has reached the upper limit threshold of the light source brightness adjustment range, and the average brightness Y1 is below the threshold value, then the system enters the CMOS exposure time adjustment range 11. 平均 Less than the first target brightness Y1, and the average brightness Y 平均 If the brightness difference between the target brightness Y1 and the target brightness Y1 is not within the first threshold range, then the system enters the CMOS gain adjustment range 13; if the system is currently in the CMOS exposure time adjustment range 11, and the current CMOS exposure time has reached the upper threshold of the CMOS exposure time adjustment range, and the average brightness Y1 is within the range of CMOS exposure time adjustment, then the system enters the CMOS gain adjustment range 13. 平均 Less than the first target brightness Y1, and the average brightness Y 平均If the brightness difference between the target brightness Y1 and the target brightness Y1 is not within the first threshold range, then the system enters the light source brightness adjustment range 12; if the system is currently in the CMOS gain adjustment range 13, and the current CMOS gain has reached the lower limit threshold of the CMOS gain adjustment range, and the average brightness Y1 is within the range of CMOS gain adjustment, then the system enters the light source brightness adjustment range 12. 平均 The brightness is greater than the first target brightness Y1, and the average brightness Y 平均 If the brightness difference between the target brightness Y1 and the target brightness Y1 is not within the first threshold range, then the light source brightness adjustment range 12 is entered; if the above is not the case, but the average brightness Y1 is within the range of the target brightness Y1, then the light source brightness adjustment range 12 is entered. 平均 If the brightness difference between the target brightness Y1 and the target brightness Y1 is not within the first threshold range, then the current adjustment range remains unchanged, that is, the average brightness Y1 remains unchanged within the current adjustment range. 平均 Adjustments were made.

[0072] Furthermore, for each frame of the image, the average brightness Y is adjusted at most once by adjusting the scaling factor K. 平均 Compare the average brightness Y in one test 平均 The magnitude of the first target brightness Y1 is determined based on the average brightness Y. 平均 Calculate the adjustment ratio coefficient K for each adjustment interval, and then adjust according to the adjustment ratio coefficient K and the adjustment interval it belongs to. After adjustment, proceed to the calculation and iteration of the next frame image. Repeat the above steps until the average brightness Y of the image is reached. 平均 The brightness difference between the first target brightness Y1 and the average brightness Y1 is within the first threshold range. In other words, the average brightness Y1 is within the threshold range. 平均 When making adjustments, the image needs to be adjusted frame by frame by adjusting the scaling factor K.

[0073] Furthermore, the average brightness Y of the image is calculated during the gap in the data transmission time between two frames. 平均 The adjustment. Because no data is transmitted between two frames, the average brightness Y of the image is affected during the gap in the data transmission time between the two frames. 平均 Adjustments are made to avoid adjusting the image halfway through data transmission, which would result in an image that is half bright and half dark, affecting image quality and the average brightness Y. 平均 The calculation involves calculating the average brightness Y of the image during the gap in the data transmission time between two frames. 平均 Adjusting this can improve image quality and simultaneously increase the average brightness Y of the next frame. 平均 The calculations are more reliable.

[0074] When adjusting the average brightness Y of the image by adjusting the scaling factor K 平均 This makes the average brightness Y of the image 平均 The brightness difference between the first target brightness Y1 and the first target brightness Y1 is within the first threshold range, that is, at this time, the average brightness Y of the image is... 平均The brightness is already close to or equal to the first target brightness Y1. Then, the overexposure point and overexposure evaluation parameters of the current frame image are obtained through the parameter acquisition module 20 and calculation module 40 of the dimming device 100.

[0075] In the peak metering process of this invention, it is necessary to establish a quantitative definition of the overexposed area as a basis for judging whether the overexposed area of ​​the image exceeds the second threshold and for dynamically adjusting the brightness of the image target.

[0076] Furthermore, the calculation method for the overexposure evaluation parameter includes:

[0077] S31: Define a pixel whose grayscale value exceeds the third threshold as an overexposed pixel;

[0078] S32: The overexposure evaluation parameter is the sum of the gray values ​​of all overexposed points in the image.

[0079] Specifically, an overexposed point is defined as a point in an image where the grayscale value of a single pixel exceeds a third threshold P1. In other words, the grayscale values ​​of all three RGB channels (range 0-255) of that single pixel exceed the third threshold P1. In this embodiment, P1 = 220. That is, a point where the grayscale value of a single pixel exceeds 220 is defined as an overexposed point.

[0080] The overexposure points of the current frame image are obtained by the parameter acquisition module 20 of the dimming device 100, and then the overexposure evaluation parameter of the current frame image is calculated by the calculation module 40. The overexposure evaluation parameter is the sum of the gray values ​​of all overexposure points in the image.

[0081] S4: Determine whether the overexposure evaluation parameter is within the second threshold range. If yes, complete the adjustment; otherwise, adjust the brightness of the first target.

[0082] In this embodiment, the second threshold range is set to [P2, P3]. Where P2 = 2200, P3 = 220000. That is, the upper limit of the second threshold range, P3, is 220000, and the lower limit of the second threshold range, P2, is 2200. If the image overexposure evaluation parameter exceeds P3, the image is considered severely overexposed. If the image overexposure evaluation parameter is less than P2, the image is considered not overexposed.

[0083] It should be noted that the third threshold P1, the lower limit of the second threshold range P2, and the upper limit of the second threshold range P3 are all empirical values ​​and can be adjusted according to the performance of each instrument.

[0084] The purpose of this invention is to control the overexposure evaluation parameters of an image within a second threshold range, so as to control the overexposed area of ​​the image to not exceed the upper threshold P3 while ensuring image brightness. That is, while controlling the overexposed area of ​​the image to be not too large, the image brightness is increased as much as possible within the upper and lower limits of the target brightness, thereby avoiding severe overexposure in some areas of the image, which would prevent doctors from seeing the details of the overexposed image area, thus better conforming to the actual use scenarios of endoscopes.

[0085] Furthermore, the method for adjusting the brightness of the first target includes:

[0086] S41: When the overexposure evaluation parameter is greater than the upper limit of the second threshold range, reduce the brightness of the first target;

[0087] S42: When the overexposure evaluation parameter is less than the lower limit of the second threshold range, increase the brightness of the first target.

[0088] When the average brightness Y of the real-time image 平均 The brightness difference between the target brightness Y1 and the target brightness Y1 is within the first threshold range, and the overexposure evaluation parameter is within the second threshold range. At this point, the target brightness Y1 remains unchanged, and the image brightness adjustment has been completed using the mean metering method. When the real-time average brightness Y1 of the image... 平均 If the brightness difference between the first target brightness Y1 and the second target brightness Y1 is within the first threshold range, and the overexposure evaluation parameter is greater than the upper limit P3 of the second threshold range, it indicates that the overexposed area of ​​the image is large under the first target brightness Y1. In this case, it is necessary to dynamically reduce the first target brightness Y1 of the image. When the real-time average brightness Y of the image... 平均 If the brightness difference between the first target brightness Y1 and the second target brightness Y1 is within the first threshold range, and the overexposure evaluation parameter is less than the lower limit P2 of the second threshold range, then it indicates that the image has an average brightness Y under the first target brightness Y1. 平均 If the image is relatively dark and there are basically no overexposed areas, then it is advisable to appropriately increase the brightness of the first target Y1 of the image.

[0089] Furthermore, the first target brightness Y1 is decreased or increased by a multiple N of the minimum adjustment step size, where N > 1. That is, during the adjustment of the first target brightness Y1, the first target brightness Y1 is adjusted proportionally. Here, N is an empirical value; in this embodiment, N = 5. That is, the second target brightness Y2 = Y1 + 5, or the second target brightness Y2 = Y1 - 5.

[0090] Furthermore, the image brightness adjustment method further includes:

[0091] S5: Obtain the adjusted second target brightness Y2.

[0092] The adjusted second target brightness Y2 is obtained through the parameter acquisition module 20 of the dimming device 100.

[0093] S6: Adjust the average brightness Y of the image according to the second target brightness Y2. 平均 Make adjustments and calculate the average brightness Y of the adjusted image. 平均 And the average brightness Y 平均 The brightness difference between the second target brightness Y2 and the brightness Y2.

[0094] Since the target brightness is dynamically adjusted from the first target brightness Y1 to the second target brightness Y2, it is necessary to adjust the average brightness Y of the image based on the second target brightness Y2. 平均 Adjustments are made. The specific adjustment method is similar to that used for adjusting based on the first target brightness Y1, and will not be elaborated here. It is important to note that during this adjustment process, the second target brightness Y2 remains unchanged, while the average brightness Y of the image is adjusted according to the current adjustment range and the adjustment ratio K of that range. 平均 Adjustments are made. Additionally, it's important to note that the adjustment ratio K at this point is equal to the ratio of the second target brightness Y2 to the average brightness Y of the current frame image. 平均 The ratio is raised to the power of a, where a is a constant and 0 < a < 1.

[0095] By adjusting the scaling factor K, the average brightness Y of the image is adjusted. 平均 Adjustments can broaden the range of image brightness adjustment, bringing the average brightness of the image to the target value within a very wide dynamic range. Ultimately, this results in an adjusted average brightness Y of the image. 平均 The brightness difference between the second target brightness Y2 and the second target brightness Y2 is within the first threshold range.

[0096] S7: When the brightness difference is within the first threshold range and the overexposure evaluation parameter is within the second threshold range, the brightness adjustment of the image is completed.

[0097] When the average brightness Y 平均 After the brightness difference between the current frame and the second target brightness Y2 falls within a first threshold range, the overexposure point and overexposure evaluation parameters of the current frame image are obtained through the parameter acquisition module 20 and calculation module 40 of the dimming device 100. The specific acquisition and calculation processes are similar to those described above and will not be repeated here. When the average brightness Y... 平均 When the brightness difference between the target brightness Y2 and the target brightness Y2 is within a first threshold range, and the overexposure evaluation parameter is within a second threshold range, the brightness adjustment of the image is complete. At this point, the average brightness of the image has been maximized while minimizing the overexposure area. That is, the average brightness of the image is maximized while minimizing the overexposure area. This invention also features fast dimming convergence speed and precise dimming.

[0098] Furthermore, the average brightness of the image is calculated once for each frame. And, as needed (when the average brightness Y... 平均 The brightness difference between the first target brightness Y1 and the second target brightness Y2 is not within the first threshold range. The average brightness Y of the image is adjusted once by adjusting the scaling factor K. 平均 Determine the average brightness Y in one test. 平均 The brightness difference between the first target brightness Y1 and the second target brightness Y2. At most one overexposure evaluation parameter is obtained, and the target brightness is adjusted at most once. When the average brightness Y... 平均 If the brightness difference between the first target brightness Y1 and the second target brightness Y2 is within a first threshold range, then the overexposure evaluation parameter of the current frame image is obtained, while the average brightness Y... 平均 If the brightness difference between the first target brightness Y1 and the second target brightness Y2 is not within the first threshold range, the overexposure evaluation parameter of the image is not acquired. When the average brightness Y... 平均 The brightness difference between the first target brightness Y1 and the second target brightness Y2 is within a first threshold range. However, if the overexposure evaluation parameter of the current frame image is not within the second threshold range, the target brightness is adjusted accordingly, and then the calculation and adjustment for the next frame begins. In other words, the image brightness adjustment method of this invention is adjusted step by step, frame by frame.

[0099] It should be noted that the above-described image brightness adjustment method is a preferred embodiment of the control method of the present invention, but it is not limited thereto. In other embodiments, the order of the steps in the image brightness adjustment method can be changed, deleted, or combined as needed, and the present invention does not limit this.

[0100] Please see Figure 5 As shown, the present invention also provides a dimming device 100 applying the above-described image brightness adjustment method. This dimming device 100 is applied to a CMOS imaging endoscope for imaging internal cavities of the human body. The dimming device 100 includes a CMOS exposure time adjustment range 11, a light source brightness adjustment range 12, and a CMOS gain adjustment range 13. The dimming device 100 further includes a parameter acquisition module 20 for acquiring the average brightness Y of the image. 平均 The preset first target brightness Y1, the adjusted second target brightness Y2, and the overexposure point; the calculation module 40, based on the average brightness Y... 平均 The brightness difference is calculated by dividing the brightness of the first target Y1 by the brightness of the second target Y2, and then the average brightness Y is used to determine the difference. 平均The adjustment ratio coefficient K is calculated based on the first target brightness Y1 / second target brightness Y2, and the overexposure evaluation parameter is calculated based on the overexposure point; the judgment module 30 judges whether the brightness difference is within the first threshold range and whether the overexposure evaluation parameter is within the second threshold range; the control module 50 adjusts the image brightness using the above image brightness adjustment method.

[0101] The present invention also provides an endoscope (not shown), which is a CMOS imaging electronic endoscope. The endoscope includes the above-mentioned dimming device 100 and applies the above-mentioned image brightness adjustment method to achieve dynamic adjustment of image brightness, widen the adjustment range, and improve image quality.

[0102] In summary, the image brightness adjustment method, dimming device 100, and endoscope of the present invention, wherein the image brightness adjustment method adjusts the average brightness Y... 平均 After the brightness difference between the target brightness Y1 and the target brightness Y1 falls within a first threshold range, the overexposure evaluation parameters of the image are obtained, and it is determined whether the overexposure evaluation parameters fall within a second threshold range. This allows for dynamic adjustment of the target brightness of the image, minimizing overexposure areas while ensuring the average brightness of the image as much as possible. Furthermore, this invention features fast dimming convergence and precise dimming.

[0103] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An image brightness adjustment method, applied to an endoscope, characterized in that, The image brightness adjustment method includes: S1: Obtain the average brightness of the current frame image and the preset first target brightness; S2: Obtain the brightness difference based on the average brightness and the brightness of the first target; S3: Determine whether the brightness difference is within the first threshold range. If yes, obtain the overexposure evaluation parameter of the current frame image; if no, adjust the brightness of the image until the brightness difference is within the first threshold range. The calculation method for the overexposure evaluation parameter includes: S31: Define a point where the gray value of a single pixel exceeds the third threshold as an overexposed point; S32: The overexposure evaluation parameter is the sum of the gray values ​​of all overexposure points in the image; S4: Determine whether the overexposure evaluation parameter is within the second threshold range. If yes, complete the adjustment; otherwise, adjust the first target brightness. The method for adjusting the first target brightness includes: S41: When the overexposure evaluation parameter is greater than the upper limit of the second threshold range, reduce the brightness of the first target; S42: When the overexposure evaluation parameter is less than the lower limit of the second threshold range, increase the brightness of the first target; S5: Obtain the adjusted second target brightness; S6: Adjust the average brightness of the image according to the second target brightness, and calculate the adjusted average brightness of the image and the brightness difference between the average brightness and the second target brightness; S7: When the brightness difference is within the first threshold range and the overexposure evaluation parameter is within the second threshold range, the brightness adjustment of the image is completed.

2. The image brightness adjustment method according to claim 1, characterized in that, The brightness of the first target is reduced or increased by a multiple of the minimum adjustment step size.

3. The image brightness adjustment method according to claim 1, characterized in that, When the brightness difference is not within the first threshold range, the method for adjusting the brightness of the image includes: keeping the first target brightness unchanged and adjusting the average brightness of the image.

4. The image brightness adjustment method according to claim 3, characterized in that, The average brightness of the image is adjusted by adjusting the scaling factor until the brightness difference is within the first threshold range. The scaling factor is equal to the power of a of the ratio of the first target brightness to the average brightness of the current frame image, where a is a constant and 0 < a < 1.

5. The image brightness adjustment method according to any one of claims 1 to 4, characterized in that: For each frame of image, the average brightness is calculated once, the brightness difference is judged once, the overexposure evaluation parameter is obtained at most once, and the target brightness is adjusted at most once.

6. A dimming device, characterized in that, The dimming device includes: The parameter acquisition module is used to acquire the average brightness of the image, the preset first target brightness, the adjusted second target brightness, and the overexposure point. The calculation module calculates the brightness difference based on the average brightness and the first target brightness or the average brightness and the second target brightness, calculates the adjustment ratio coefficient based on the average brightness and the first target brightness or the average brightness and the second target brightness, and calculates the overexposure evaluation parameters based on the overexposure point. The judgment module determines whether the brightness difference is within a first threshold range and whether the overexposure evaluation parameter is within a second threshold range. The control module adjusts the image brightness using the image brightness adjustment method as described in any one of claims 1 to 5.

7. An endoscope, characterized in that, include: The dimming device as described in claim 6.

Citation Information

Patent Citations

  • Automatic Exposure Method and Apparatus

    CN102262330A

  • Light compensation method and device

    CN108206918A

  • Image brightness adjusting method, dimming device and endoscope

    CN115813314A