CN116055893A - Image brightness adjusting method, light adjusting device and endoscope - Google Patents

Image brightness adjusting method, light adjusting device and endoscope Download PDF

Info

Publication number
CN116055893A
CN116055893A CN202310040108.2A CN202310040108A CN116055893A CN 116055893 A CN116055893 A CN 116055893A CN 202310040108 A CN202310040108 A CN 202310040108A CN 116055893 A CN116055893 A CN 116055893A
Authority
CN
China
Prior art keywords
brightness
image
average
target
overexposure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310040108.2A
Other languages
Chinese (zh)
Inventor
胡廷伟
梁江荣
朱***
姜浩
吴郁清
丛世平
陈婷
安昕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Oupu Mandi Technology Co ltd
Original Assignee
Suzhou Oupu Mandi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Oupu Mandi Technology Co ltd filed Critical Suzhou Oupu Mandi Technology Co ltd
Priority to CN202310040108.2A priority Critical patent/CN116055893A/en
Publication of CN116055893A publication Critical patent/CN116055893A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/00002Operational features of endoscopes
    • A61B1/00004Operational features of endoscopes characterised by electronic signal processing
    • A61B1/00009Operational features of endoscopes characterised by electronic signal processing of image signals during a use of endoscope
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B1/00Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor
    • A61B1/06Instruments for performing medical examinations of the interior of cavities or tubes of the body by visual or photographical inspection, e.g. endoscopes; Illuminating arrangements therefor with illuminating arrangements
    • A61B1/0661Endoscope light sources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Surgery (AREA)
  • Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Optics & Photonics (AREA)
  • Pathology (AREA)
  • Radiology & Medical Imaging (AREA)
  • Veterinary Medicine (AREA)
  • Physics & Mathematics (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Signal Processing (AREA)
  • Endoscopes (AREA)

Abstract

The invention provides an image brightness adjusting method, a dimming device and an endoscope, wherein the image brightness adjusting method is applied to the endoscope and comprises the following steps: s1: obtaining average brightness of a current frame image and 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 in a first threshold range, if so, acquiring overexposure evaluation parameters of the current frame image; if not, adjusting the brightness of the image until the brightness difference value is within the first threshold range; s4: and judging whether the overexposure evaluation parameter is in a second threshold range, if so, finishing adjustment, and if not, adjusting the first target brightness. The invention can dynamically adjust the target brightness of the image, and ensure the average brightness of the image as much as possible on the premise of reducing the overexposure area of the image as much as possible. Meanwhile, the invention has the characteristics of high dimming convergence speed and precise dimming.

Description

Image brightness adjusting method, light adjusting device and endoscope
Technical Field
The present invention relates to the technical field of endoscopes, and in particular, to an image brightness adjusting method, a dimming device, and an endoscope.
Background
The electronic endoscope is a medical electronic optical instrument which can be inserted into the cavity of human body and the internal cavity of viscera to directly observe, diagnose and treat, and integrates high-precision tip technologies such as light, mechanical and electrical. When performing an operation on the internal cavity of the human body and the internal cavity of the viscera, a doctor needs to observe the images shot by the endoscope system to know the conditions of the internal cavity of the human body and the internal cavity of the viscera, and the problems that the images shot by the endoscope system are too bright or too dark, namely the images are overexposed or underexposed, often exist due to the fact that the distance between the lens of the endoscope and the object to be shot is changed in the operation process, so that the doctor cannot observe clear internal images of the human body. Therefore, the image brightness of the endoscope needs to be frequently adjusted.
The existing electronic endoscope mainly adopts a mean value photometry method to adjust the brightness of an image. That is, the target brightness is set to a constant value, and the average brightness of the image is adjusted to reach the target brightness of the image. However, the actual situation is complicated, and the whole picture is sometimes darker, but the partial area is seriously overexposed, so that the details of the overexposed area cannot be seen clearly. If the average value of the images is close to the fixed target value in the average value photometry mode, the brightness of the image of the overexposed region cannot be pressed, and the doctor cannot see the details of the overexposed image region clearly.
In view of the foregoing, it is necessary to provide an image brightness adjusting method, a dimming device and an endoscope to solve the above problems.
Disclosure of Invention
The invention aims to provide an image brightness adjusting method which can improve the average brightness of an image as much as possible on the premise of reducing the overexposure area of the image as much as possible.
In order to achieve the above object, the present invention provides an image brightness adjustment method applied to an endoscope, the image brightness adjustment method comprising:
s1: obtaining average brightness of a current frame image and 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 in a first threshold range, if so, acquiring overexposure evaluation parameters of the current frame image; if not, adjusting the brightness of the image until the brightness difference value is within the first threshold range;
s4: and judging whether the overexposure evaluation parameter is in a second threshold range, if so, finishing adjustment, and if not, adjusting the first target brightness.
As a further improvement of the present invention, the image brightness adjustment method further includes:
s5: acquiring the adjusted second target brightness;
s6: adjusting the average brightness of the image according to the second target brightness, and calculating the average brightness of the adjusted image and the brightness difference value between the average brightness and the second target brightness;
s7: and when the brightness difference value is in the first threshold range and the overexposure evaluation parameter is in the second threshold range, completing brightness adjustment of the image.
As a further improvement of the present invention, the method for calculating the overexposure evaluation parameter includes:
s31: defining the points of which the gray values of the single pixel points exceed a third threshold as overexposure points;
s32: the overexposure evaluation parameter is the sum of gray values of all overexposure points in the image.
As a further improvement of the present invention, the method of adjusting the first target brightness includes:
s41: reducing the first target brightness when the exposure evaluation parameter is greater than the upper limit of the second threshold range;
s42: and when the exposure evaluation parameter is smaller than the lower limit of the second threshold range, the first target brightness is adjusted to be higher.
As a further improvement of the invention, the first target brightness is reduced or increased by a multiple of the minimum adjustment step.
As a further improvement of the present invention, when the luminance difference value is not within the first threshold value range, the method of adjusting the luminance of the image includes: and keeping the first target brightness unchanged, and adjusting the average brightness of the image.
As a further improvement of the invention, the average luminance of the image is adjusted by adjusting a scaling factor until the luminance difference is within the first threshold range, wherein the adjusting scaling factor is equal to the ratio of the first target luminance to the average luminance of the current frame image to the power a, wherein a is a constant and 0 < a < 1.
As a further improvement of the present invention, the average luminance is calculated once per frame image, the luminance difference value is judged once, the overexposure evaluation parameter is obtained at most once, and the target luminance is adjusted at most once.
Another object of the present invention is to provide a dimming device applying the above image brightness adjustment method.
In order to achieve the above object, the present invention provides a dimming device including:
the parameter acquisition module is used for acquiring average brightness of the image, preset first target brightness, adjusted second target brightness and overexposure points;
the calculation module calculates a brightness difference value according to the average brightness and the first target brightness/the second target brightness, calculates an adjustment proportion coefficient according to the average brightness and the first target brightness/the second target brightness, and calculates an overexposure evaluation parameter according to the overexposure point;
the judging module is used for judging whether the brightness difference value is in a first threshold range or not and judging whether the overexposure evaluation parameter is in a second threshold range or not;
and the control module is used for adjusting the image brightness by applying the image brightness adjusting method.
The invention further provides an endoscope comprising the above-described dimming device.
The beneficial effects of the invention are as follows: compared with the prior art, the image brightness adjusting method, the dimming device and the endoscope have the advantages that when the average brightness approaches to the first target brightness, the image brightness adjusting method acquires the overexposure evaluation parameters of the image, judges whether the overexposure evaluation parameters are in the second threshold range or not, dynamically adjusts the target brightness of the image, and improves the average brightness of the image as much as possible on the premise of reducing the overexposure area of the image as much as possible. Meanwhile, the invention has the characteristics of high dimming convergence speed and precise dimming.
Drawings
Fig. 1 is a flowchart of an image brightness adjusting method according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart illustrating a method for adjusting a target brightness according to a preferred embodiment of the present invention.
Fig. 3 is an overall judgment flowchart of an image brightness adjustment method according to a preferred embodiment of the present invention.
Fig. 4 is a schematic diagram of a method for adjusting average brightness of an image according to a preferred embodiment of the present invention.
Fig. 5 is a block diagram of a dimmer according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
In this case, in order to avoid obscuring the present invention due to unnecessary details, only the structures and/or processing steps closely related to the aspects of the present invention are shown in the drawings, and other details not greatly related to the present invention are omitted.
In addition, it should be further noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
For an electronic endoscope using CMOS imaging, ideally, the approximate calculation method of the brightness of each pixel point of the CMOS sensor is as follows:
single pixel brightness=cmos exposure time CMOS gain/light input
The longer the CMOS exposure time or the higher the CMOS gain or the larger the amount of light incoming, the higher the luminance of the individual pixel point. Based on the monotonicity relationship, the overall brightness of the image can be expressed by the following formula:
image brightness=f (CMOS exposure time, CMOS gain, light source brightness).
Wherein F is a function that satisfies the following characteristics: the other two parameters of the three parameters of CMOS exposure time, CMOS gain and light source brightness are kept unchanged, and F is monotonically increased if any single parameter is monotonically increased.
For an electronic endoscope in a body cavity of a human body using a scene, the light incoming amount is almost all from illumination of a light source. Considering the ideal situation, the light incoming amount is approximately in direct proportion to the brightness of the light source, so the calculation mode of the overall brightness of the image can be approximated by the following formula:
image brightness ≡ CMOS exposure time × CMOS gain × light source brightness × scaling factor
The above formula is derived in an ideal case, but the actual situation is much more complex. For example, when the average luminance of the current screen is brought closer to a fixed target luminance, the entire screen may be darker in an actual endoscope usage scene, but the partial area is severely overexposed, so that details of the overexposed area cannot be seen. If the average value of the picture is close to the fixed target brightness in the average value photometry mode, the image brightness of the overexposed region cannot be pressed, and the doctor cannot see the details of the overexposed image region.
Therefore, the invention provides a method for dynamically adjusting the average light metering of the target brightness on the basis of the method for the average light metering. That is, in the image brightness adjusting method of the present invention, the target brightness of the image is dynamic, not constant, and is dynamically adjusted according to the current average brightness of the picture and the overexposure region.
Referring to fig. 1 to 5, the present invention provides an image brightness adjustment method applied to a dimming device 100 of an electronic endoscope for CMOS imaging, the image brightness adjustment method comprising:
s1: obtaining average brightness Y of current frame image Average of Preset first target brightness Y 1
Specifically, the average luminance Y of the current frame image is acquired by the parameter acquisition module 20 of the dimming device 100 Average of Preset first target brightness Y 1
Alternatively, the parameter acquisition module 20 acquires RGB image data of the current frame image, then converts the RGB image data into YCbCr image data, and obtains the average luminance Y of the current frame image by calculation Average of
The image brightness adjustment method includes the steps of S11: for the first target brightness Y 1 And performing initialization setting.
Specifically, an upper threshold Y of the target luminance Y is empirically selected H And a lower threshold Y L Upper threshold Y H And a lower threshold Y L A value is arbitrarily selected as the first target brightness Y 1 . In the present embodiment, the first target luminance Y is selected 1 Is the middle value of the target luminance range. Namely, the first target brightness Y 1 =(Y H +Y L )/2. In other embodiments, the upper limit Y may also be selected H And a lower limit value Y L Other values in between are the first target brightness Y 1
S2: according to the average brightness Y Average of And the first target brightness Y 1 And obtaining a brightness difference value.
DimmingThe calculation module 40 of the apparatus 100 calculates the average brightness Y Average of First target brightness Y 1 A luminance difference value is calculated.
S3: judging whether the brightness difference value is in a first threshold range, if so, acquiring overexposure evaluation parameters of the current frame image; and if not, adjusting the brightness of the image until the brightness difference value is within the first threshold range.
The judging module 30 of the dimming device 100 judges and compares the average brightness Y of the current frame image Average of First target brightness Y 1 Whether the luminance difference value of (2) is within the first threshold range, that is, the determination module 30 of the dimming device 100 determines to compare the average luminance Y of the current frame image Average of Whether or not to approach the first target brightness Y 1 . Preferably, the first threshold is 5.
If not, the brightness of the image is adjusted by the control module 50 of the dimming device 100 until the average brightness Y Average of First target brightness Y 1 Is within the first threshold range.
If yes, the parameter obtaining module 20 and the calculating module 40 of the dimming device 100 obtain the overexposure point and the overexposure evaluation parameter of the current frame image, and determine whether to adjust the first target brightness according to the overexposure evaluation parameter.
Specifically, in the present embodiment, the average luminance Y of the image is adjusted by using the average photometry Average of Near the first target brightness Y 1 . That is, when the luminance difference value is not within the first threshold range, the method of adjusting the luminance of the image includes: maintaining the first target brightness Y 1 Invariably, adjust the average brightness Y of the image Average of
Further, the average brightness Y of the image is adjusted by adjusting the proportionality coefficient K Average of And adjusting until the brightness difference value is within the first threshold range. Wherein the adjustment scaling factor K is equal to the first target brightness Y 1 Average luminance Y with current frame image Average of To the power a of the ratio of (2), wherein a is a constant and 0 < a <1. By making the adjustment scaling factor K equal to the first target brightness Y 1 And average brightness Y Average of To the power a of the ratio of the two frames to make the adjusting process of the image brightness smoother, namely, the transition between the two frames of image brightness smoother, thereby improving the visual comfort.
Optionally, the dimming device 100 includes a CMOS exposure time adjustment interval 11, a light source brightness adjustment interval 12, and a CMOS gain adjustment interval 13. And the adjustment scaling factor K is different for each adjustment interval. In using the scaling factor K to adjust the average brightness Y of the image Average of When the adjustment is performed, the current adjustment interval is also needed to be judged, and the average brightness Y of the image is adjusted by using the adjustment proportion coefficient K of the adjustment interval Average of And adjusting.
For example, in the present embodiment, the CMOS exposure time adjustment section 11 corresponds to a first adjustment scaling factor k1, k1= (first target luminance Y 1 Average luminance Y Average of ) a1 . Preferably, in the present embodiment, a1=0.2.
The light source luminance adjustment section 12 corresponds to a second adjustment scaling factor k2, k2= (first target luminance Y) 1 Average luminance Y Average of ) a2 . Preferably, in the present embodiment, a2=0.3.
The CMOS gain adjustment section 13 corresponds to a third adjustment scaling factor k3, k3= (first target luminance Y 1 Average luminance Y Average of ) a3 . Preferably, in the present embodiment, a3=0.1.
In this embodiment, a1, a2 and a3 in the first adjustment scaling factor K1, the second adjustment scaling factor K2 and the third adjustment scaling factor K3 are different, and in other embodiments, a1, a2 and a3 may be the same or partially the same. The invention is not limited in this regard. That is, the constant a is an empirical value and can be adjusted according to actual conditions.
Average brightness Y of image by adjusting scaling factor K Average of The method for adjusting comprises the following steps: and multiplying the parameter value of the current frame image of the current regulating interval by the regulating proportion coefficient K corresponding to the regulating interval to obtain the parameter value of the next frame image. Wherein,,and if the parameter value of the next frame of image exceeds the adjusting range of the adjusting interval, cutting off the parameter value. That is, if the result of multiplying the parameter value of the current frame image of the current adjustment interval by the adjustment proportion coefficient K corresponding to the adjustment interval is greater than the upper threshold of the adjustment range of the adjustment interval, the parameter value of the next frame image is adjusted to be the upper threshold; and if the result of multiplying the adjusting value of the current adjusting interval by the adjusting proportion coefficient corresponding to the adjusting interval is smaller than the lower threshold value of the adjusting range of the adjusting interval, adjusting the parameter value of the next frame of image to be the lower threshold value.
If the average brightness Y can be obtained in the current adjustment interval Average of So that the average brightness Y Average of And the first target brightness Y 1 The luminance difference of (2) is within a first threshold range, the average luminance Y can be adjusted in the current adjustment interval Average of And adjusting. If the average brightness Y is obtained in the current adjustment interval Average of Cannot make the average brightness Y Average of And the first target brightness Y 1 If the brightness difference of the (C) is within the first threshold range, the adjacent adjustment interval can be entered according to the situation to average brightness Y Average of And adjusting.
For example, if the current light source brightness is in the light source brightness adjustment range 12 and the current light source brightness has reached the lower threshold of the light source brightness adjustment range, the average brightness Y Average of Greater than the first target brightness Y 1 And average brightness Y Average of And the first target brightness Y 1 If the brightness difference value of the first light source is not in the first threshold range, entering a CMOS exposure time adjustment interval 11; if the current light source brightness is within the light source brightness adjustment range 12 and the current light source brightness has reached the upper threshold of the light source brightness adjustment range, the average brightness Y Average of Less than the first target brightness Y 1 And average brightness Y Average of And the first target brightness Y 1 If the brightness difference value of the first filter is not in the first threshold range, entering a CMOS gain adjustment section 13; if the current CMOS exposure time adjustment range 11 is in, and the current CMOS exposure time reaches the upper threshold value of the CMOS exposure time adjustment rangeAt the same time, average brightness Y Average of Less than the first target brightness Y 1 And average brightness Y Average of And the first target brightness Y 1 If the brightness difference value of the light source is not within the first threshold range, entering a light source brightness adjustment section 12; if the current CMOS gain adjustment range 13 is currently in the CMOS gain adjustment range, and the current CMOS gain has reached the lower threshold of the CMOS gain adjustment range, the average brightness Y Average of Greater than the first target brightness Y 1 And average brightness Y Average of And the first target brightness Y 1 If the brightness difference value of the light source is not within the first threshold range, entering a light source brightness adjustment section 12; if not, but the average brightness Y Average of And the first target brightness Y 1 If the brightness difference value of (2) is not within the first threshold value range, keeping the current adjustment interval unchanged, i.e. the average brightness Y is compared with the current adjustment interval Average of And adjusting.
Further, the average brightness Y is adjusted at most once by adjusting the scaling factor K for each frame of image Average of Comparing the average luminance Y Average of And the first target brightness Y 1 According to the average brightness Y Average of And calculating an adjusting proportion coefficient K of each adjusting interval, and adjusting according to the adjusting proportion coefficient K and the adjusting interval. After the adjustment, the calculation and iteration of the next frame of image are carried out. Repeating the above steps until the average brightness Y of the image Average of First target brightness Y 1 Is within the first threshold range. That is, in the case of the average luminance Y Average of When the adjustment is performed, the image needs to be adjusted frame by adjusting the scaling factor K.
Further, the average brightness Y of the image is completed in the gap of the transmission time of the two frames of image data Average of Is provided. Since no data is transmitted between two frames of images, the average brightness Y of the images is obtained at the gap of the transmission time of the two frames of image data Average of Adjustment is performed to avoid half of the image data transmission, thereby causing half of the image to be bright and half of the image to be dark, affecting the image quality and affecting the average brightness Y of the image Average of Is calculated by the computer. That is to say that the first and second,average brightness Y of image completed by gap at two-frame image data transmission time Average of Can improve the image imaging quality and simultaneously make the average brightness Y of the next frame image Average of The calculation is more reliable.
When adjusting the average brightness Y of the image by adjusting the scaling factor K Average of So that the average brightness Y of the image Average of And the first target brightness Y 1 The luminance difference value of (2) is within a first threshold range, that is, at this time, the average luminance Y of the image Average of Has approached or been equal to the first target luminance Y 1 . Then, the overexposure point and overexposure evaluation parameters of the current frame image are acquired by the parameter acquisition module 20 and the calculation module 40 of the dimming device 100.
In the peak light metering process of the invention, the quantitative definition of the overexposed area needs to be established and used as the basis for judging whether the overexposed area of the image exceeds a second threshold value and dynamically adjusting the target brightness of the image.
Further, the method for calculating the overexposure evaluation parameter comprises the following steps:
s31: defining a point of which the gray value of the single pixel point exceeds a third threshold value as an overexposure point;
s32: the overexposure evaluation parameter is the sum of gray values of all overexposure points in the image.
Specifically, the overexposure point is defined as a point in the image where the gray value of a single pixel exceeds the third threshold P1, that is, a point where the RGB three-channel (range 0 to 255) gray values of the single pixel each exceed the third threshold P1. In the present embodiment, p1=220. That is, a point where the gray value of a single pixel point exceeds 220 is defined as an overexposure point.
The overexposure point of the current frame image is acquired 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 gray values of all overexposure points in the image.
S4: and judging whether the overexposure evaluation parameter is in a second threshold range, if so, finishing adjustment, and if not, adjusting the first target brightness.
In the present embodiment, the second threshold range is set to [ P2, P3]. Wherein p2=2200, p3=220000. That is, the upper limit P3 of the second threshold range is 220000, and the lower limit P2 of the second threshold range is 2200. If the image overexposure evaluation parameter exceeds P3, the image overexposure is considered to be serious. If the image overexposure evaluation parameter is smaller than P2, the image is considered to have no overexposure condition.
It should be noted that the third threshold P1, the lower limit P2 of the second threshold range, and the upper limit P3 of the second threshold range are all empirical values, and can be adjusted according to the performance of each instrument.
The invention aims to control the overexposure evaluation parameter of an image within a second threshold range so as to control the overexposure area of the image not to exceed the upper threshold limit P3 on the premise of ensuring the brightness of the image. That is, on the premise that the overexposure area of the image is not too large, the brightness of the image is improved as high as possible within the upper limit and the lower limit of the target brightness, so that the overexposure of partial areas of the image is avoided, and a doctor cannot see the details of the overexposed image area, so that the method and the device are more suitable for the actual use scene of the endoscope.
Further, the method for adjusting the first target brightness comprises the following steps:
s41: when the overexposure evaluation parameter is greater than the upper limit of the second threshold range, reducing the first target brightness;
s42: and when the overexposure evaluation parameter is smaller than the lower limit of the second threshold range, the first target brightness is adjusted to be higher.
When the average brightness Y of the real-time picture of the image Average of And the first target brightness Y 1 The brightness difference value of the first target brightness Y is within a first threshold range, and the overexposure evaluation parameter is within a second threshold range 1 The brightness adjustment of the image is already done by means of average photometry, unchanged. When the real-time picture average brightness Y of the image Average of And the first target brightness Y 1 The brightness difference value of (2) is within the first threshold range, and the overexposure evaluation parameter is greater than the upper limit P3 of the second threshold range, then the brightness difference value is indicated to be at the first target brightness Y 1 Lower image overexposed regionLarge, at this time, it is necessary to dynamically reduce the first target luminance Y of the image 1 . When the real-time picture average brightness Y of the image Average of And the first target brightness Y 1 The brightness difference value of (2) is within the first threshold range, and the overexposure evaluation parameter is smaller than the lower limit P2 of the second threshold range, the brightness difference value is indicated to be within the first target brightness Y 1 Average luminance Y of lower image presence Average of Darker and substantially non-overexposed areas of the image, then appropriate increases in the first target brightness Y of the image may be considered 1
Further, the first target brightness Y is reduced or increased by a multiple N of the minimum adjustment step 1 Wherein N > 1. That is, at the first target brightness Y 1 In the process of adjusting the first target brightness Y 1 And adjusting according to the proportion. Where N is an empirical value, in this embodiment, n=5. Namely, the second target brightness Y 2 =Y 1 +5, or second target brightness Y 2 =Y 1 -5。
Further, the image brightness adjustment method further includes:
s5: acquiring the adjusted second target brightness Y 2
Acquiring the adjusted second target brightness Y by the parameter acquisition module 20 of the dimming device 100 2
S6: according to the second target brightness Y 2 Average brightness Y of image Average of Adjusting and calculating average brightness Y of the adjusted image Average of The average brightness Y Average of And a second target brightness Y 2 Is a luminance difference value of (a).
Since the target brightness is changed from the first target brightness Y 1 Dynamically adjusting to the second target brightness Y 2 Then the second target brightness Y is needed 2 On the basis of (a) the average brightness Y of the image Average of And (5) adjusting. Specific adjusting method and first target brightness Y 1 The adjustment is performed in a similar manner and will not be described in detail herein. It should be noted that at this time, the second target luminance Y is maintained during the adjustment 2 Unchanged according to the currently located adjustment interval and the adjustment of the adjustment intervalThe scaling factor K versus the average luminance Y of the image Average of And (5) adjusting. In addition, it should be noted that the adjustment scaling factor K at this time is equal to the second target luminance Y 2 Average luminance Y with current frame image Average of To the power a of the ratio of (2), wherein a is a constant and 0 < a < 1.
Average luminance Y of image by employing adjustment scaling factor K Average of The adjustment can widen the adjustment range of the image brightness, and adjust the average brightness of the image to the target value in an extremely wide dynamic range. Finally, the average brightness Y of the adjusted image is made Average of And a second target brightness Y 2 Is within a first threshold range.
S7: and when the brightness difference value is in the first threshold range and the overexposure evaluation parameter is in the second threshold range, completing brightness adjustment of the image.
When the average brightness Y Average of And a second target brightness Y 2 After the brightness difference value of the current frame image is within the first threshold range, the overexposure point and the overexposure evaluation parameter of the current frame image are acquired through the parameter acquisition module 20 and the calculation module 40 of the dimming device 100. The specific acquisition process and calculation process are similar to those described above and will not be described in detail herein. When the average brightness Y Average of And a second target brightness Y 2 The brightness difference value of the image is in a first threshold range, and the overexposure evaluation parameter is in a second threshold range, so that the brightness adjustment of the image is completed. At this time, in the case where the overexposed area is not large, the average brightness of the image has been increased as much as possible. That is, the average brightness of the image is ensured as much as possible while the overexposure area of the image is reduced as much as possible. The invention has the characteristics of high dimming convergence speed and precise dimming.
Further, the average luminance of the picture is calculated once per frame image. And, as required (when the average luminance Y Average of And the first target brightness Y 1 Second target brightness Y 2 Not within the first threshold), the average luminance Y of the primary image is adjusted by adjusting the scaling factor K Average of . Judging the primary average brightness Y Average of And the first target brightness Y 1 Second targetBrightness Y 2 Is a luminance difference value of (a). Acquiring overexposure evaluation parameters at most once and adjusting target brightness at most once. When the average brightness Y Average of And the first target brightness Y 1 Second target brightness Y 2 The brightness difference value of the current frame image is within a first threshold range, and the overexposure evaluation parameter of the current frame image is obtained, and the average brightness Y is obtained Average of And the first target brightness Y 1 Second target brightness Y 2 When the brightness difference value of the image is not in the first threshold range, the overexposure evaluation parameter of the image is not acquired. When the average brightness Y Average of And the first target brightness Y 1 Second target brightness Y 2 The brightness difference value of the current frame image is within a first threshold range, but the overexposure evaluation parameter of the current frame image is not within a second threshold range, the target brightness is adjusted according to the situation, and then the calculation and adjustment of the next frame are carried out. That is, the image brightness adjusting method of the present invention is adjusted in steps frame by frame.
It should be noted that the above-mentioned image brightness adjustment method is a control method according to a preferred embodiment of the present invention, but the present invention is not limited thereto, and in other embodiments, the steps in the image brightness adjustment method may be replaced, omitted, or combined as required, which is not limited thereto.
Referring to fig. 5, the present invention further provides a dimming device 100 applying the above-mentioned image brightness adjustment method. The dimming device 100 is applied to an endoscope for CMOS imaging for photographing a cavity inside a human body. The dimming device 100 includes a CMOS exposure time adjustment section 11, a light source brightness adjustment section 12, and a CMOS gain adjustment section 13, and the dimming device 100 further includes: a parameter acquisition module 20 for acquiring average brightness Y of the image Average of Preset first target brightness Y 1 The adjusted second target brightness Y 2 An overexposure point; calculation module 40, based on the average luminance Y Average of First target brightness Y 1 Second target brightness Y 2 Calculating a luminance difference value according to the average luminance Y Average of First target brightness Y 1 Second target brightness Y 2 Calculating a scaling factor K according toCalculating overexposure evaluation parameters at overexposure points; a judging module 30, configured to judge 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 50 adjusts the image brightness using the image brightness adjustment method described above.
The present invention further provides an endoscope (not shown) which is an electronic endoscope for cmos imaging, and the endoscope includes the above-mentioned dimming device 100, and the above-mentioned image brightness adjustment method is applied to realize dynamic adjustment of image brightness, widen an adjustment range, and improve image quality.
As described above, the image brightness adjusting method, the dimming device 100, and the endoscope according to the present invention, wherein the image brightness adjusting method is performed at the average brightness Y Average of And the first target brightness Y 1 After the brightness difference value of the image is within a first threshold range, acquiring an overexposure evaluation parameter of the image, judging whether the overexposure evaluation parameter is within a second threshold range, so as to dynamically adjust the target brightness of the image, and ensuring the average brightness of the image as much as possible on the premise of reducing the overexposure area of the image as much as possible. Meanwhile, the invention has the characteristics of high dimming convergence speed and precise dimming.
The above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and it should be understood by those skilled in the art that the technical solution of the present invention may be modified or substituted without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. An image brightness adjustment method applied to an endoscope, the image brightness adjustment method comprising:
s1: obtaining average brightness of a current frame image and 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 in a first threshold range, if so, acquiring overexposure evaluation parameters of the current frame image; if not, adjusting the brightness of the image until the brightness difference value is within the first threshold range;
s4: and judging whether the overexposure evaluation parameter is in a second threshold range, if so, finishing adjustment, and if not, adjusting the first target brightness.
2. The image brightness adjustment method according to claim 1, characterized in that the image brightness adjustment method further comprises:
s5: acquiring the adjusted second target brightness;
s6: adjusting the average brightness of the image according to the second target brightness, and calculating the average brightness of the adjusted image and the brightness difference value between the average brightness and the second target brightness;
s7: and when the brightness difference value is in the first threshold range and the overexposure evaluation parameter is in the second threshold range, completing brightness adjustment of the image.
3. The image brightness adjustment method according to claim 1, characterized in that: the overexposure evaluation parameter calculation method comprises the following steps:
s31: defining the points of which the gray values of the single pixel points exceed a third threshold as overexposure points;
s32: the overexposure evaluation parameter is the sum of gray values of all overexposure points in the image.
4. The image brightness adjustment method according to claim 1, characterized in that: the method for adjusting the first target brightness comprises the following steps:
s41: reducing the first target brightness when the exposure evaluation parameter is greater than the upper limit of the second threshold range;
s42: and when the exposure evaluation parameter is smaller than the lower limit of the second threshold range, the first target brightness is adjusted to be higher.
5. The image brightness adjustment method according to claim 4, wherein the first target brightness is reduced or increased by a multiple of a minimum adjustment step.
6. The image brightness adjustment method according to claim 1, wherein the method of adjusting the brightness of the image when the brightness difference value is not within a first threshold value range comprises: and keeping the first target brightness unchanged, and adjusting the average brightness of the image.
7. The image brightness adjustment method according to claim 6, wherein the average brightness of the image is adjusted by adjusting a scaling factor until the brightness difference is within the first threshold range, wherein the adjusting scaling factor is equal to a power of a ratio of the first target brightness to the average brightness of the current frame image, wherein a is a constant, and 0 < a < 1.
8. The image brightness adjustment method according to any one of claims 1 to 7, characterized in that: calculating average brightness once for each frame of image, judging a brightness difference value once, acquiring overexposure evaluation parameters at most once, and adjusting target brightness at most once.
9. A dimming device, the dimming device comprising:
the parameter acquisition module is used for acquiring average brightness of the image, preset first target brightness, adjusted second target brightness and overexposure points;
the calculation module calculates a brightness difference value according to the average brightness and the first target brightness/the second target brightness, calculates an adjustment proportion coefficient according to the average brightness and the first target brightness/the second target brightness, and calculates an overexposure evaluation parameter according to the overexposure point;
the judging module is used for judging whether the brightness difference value is in a first threshold range or not and judging whether the overexposure evaluation parameter is in a second threshold range or not;
a control module for adjusting the brightness of the image by using the image brightness adjusting method according to any one of claims 1 to 8.
10. An endoscope, comprising: the dimming device of claim 9.
CN202310040108.2A 2023-01-13 2023-01-13 Image brightness adjusting method, light adjusting device and endoscope Pending CN116055893A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310040108.2A CN116055893A (en) 2023-01-13 2023-01-13 Image brightness adjusting method, light adjusting device and endoscope

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310040108.2A CN116055893A (en) 2023-01-13 2023-01-13 Image brightness adjusting method, light adjusting device and endoscope

Publications (1)

Publication Number Publication Date
CN116055893A true CN116055893A (en) 2023-05-02

Family

ID=86129183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310040108.2A Pending CN116055893A (en) 2023-01-13 2023-01-13 Image brightness adjusting method, light adjusting device and endoscope

Country Status (1)

Country Link
CN (1) CN116055893A (en)

Similar Documents

Publication Publication Date Title
US7990465B2 (en) Imaging apparatus, imaging method, storage medium, and integrated circuit
KR100555755B1 (en) Apparatus correcting image by luminance histogram
KR100557219B1 (en) Method and apparatus for compensating for automatic exposure
WO2014175234A1 (en) Image capture device and image display method
CN102970916B (en) Endoscope device and method for controlling endoscope device
CN108650473B (en) Method and system for automatically adjusting brightness of endoscope L ED lamp
JP2007201979A (en) Exposure control apparatus and imaging apparatus
CN103699877A (en) Method and system for improving face recognition effects
CN102694981A (en) Automatic exposure method for histogram equalization based on adaptive threshold segmentation
CN104754240A (en) Automatic exposure method and device for CMOS (complementary metal oxide semiconductor) image sensor
TW201728163A (en) Image adjusting method and related displaying apparatus
US7355611B2 (en) Method and arrangement for improving image quality on a display of an imaging device
CN107437402B (en) Method for controlling backlight thereof, device and display equipment
JP5149055B2 (en) Imaging device
US7247135B2 (en) Electronic endoscope apparatus including brightness adjuster
CN114666511A (en) Method and device for automatically acquiring optimal exposure value on tunable spectral camera
CN108668090B (en) Optical apparatus and automatic exposure method thereof
JP2019029833A (en) Imaging apparatus
JP2010062668A (en) Image processing apparatus, image processing method, program, and image capturing apparatus
CN116055893A (en) Image brightness adjusting method, light adjusting device and endoscope
JP2009219719A (en) Endoscope system
CN110012277A (en) A kind of auto white balance method and device for portrait image
CN111050087B (en) Infrared anti-overexposure method based on RGB statistical information and system and device thereof
US10939048B1 (en) Method and camera for automatic gain adjustment based on illuminance of video content
JP4440562B2 (en) Video signal processing device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination