CN114125225A - Endoscope brightness automatic adjustment method, device and system and electronic equipment - Google Patents

Endoscope brightness automatic adjustment method, device and system and electronic equipment Download PDF

Info

Publication number
CN114125225A
CN114125225A CN202111368311.XA CN202111368311A CN114125225A CN 114125225 A CN114125225 A CN 114125225A CN 202111368311 A CN202111368311 A CN 202111368311A CN 114125225 A CN114125225 A CN 114125225A
Authority
CN
China
Prior art keywords
brightness
camera
image
range
preset
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.)
Granted
Application number
CN202111368311.XA
Other languages
Chinese (zh)
Other versions
CN114125225B (en
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.)
Zhejiang University ZJU
Sunny Optical Zhejiang Research Institute Co Ltd
Original Assignee
Zhejiang University ZJU
Sunny Optical Zhejiang Research Institute 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 Zhejiang University ZJU, Sunny Optical Zhejiang Research Institute Co Ltd filed Critical Zhejiang University ZJU
Priority to CN202111368311.XA priority Critical patent/CN114125225B/en
Publication of CN114125225A publication Critical patent/CN114125225A/en
Application granted granted Critical
Publication of CN114125225B publication Critical patent/CN114125225B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/555Constructional details for picking-up images in sites, inaccessible due to their dimensions or hazardous conditions, e.g. endoscopes or borescopes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • 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

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Endoscopes (AREA)

Abstract

The invention discloses an endoscope brightness automatic adjustment method, an endoscope brightness automatic adjustment device, an endoscope brightness automatic adjustment system and electronic equipment, wherein the method comprises the following steps: setting exposure time and sensitivity parameters of a camera of an endoscope to be preset camera exposure time and preset sensitivity parameters in the working mode according to the selected working mode, wherein the working mode is selected by a user according to a use scene of the endoscope; acquiring an image shot by a camera in the working mode; converting the image into a YUV format image; dividing the YUV format image into a plurality of regions with the same size and acquiring Y components of the regions; and sending an adjusting brightness signal according to the distribution condition of the Y component of each area so as to adjust the brightness of the illumination device of the endoscope. The method does not need to manually adjust the relevant configuration of the camera and the light brightness of the lighting equipment, and has the advantages of strong processing function, short delay time, stable image, convenient use and the like.

Description

Endoscope brightness automatic adjustment method, device and system and electronic equipment
Technical Field
The application relates to the field of medical treatment, in particular to an endoscope brightness automatic adjusting method, an endoscope brightness automatic adjusting device, an endoscope brightness automatic adjusting system and electronic equipment.
Background
With the continuous development of endoscope related technologies, the variety of devices and the functions of endoscopes increase, doctors are not satisfied with the detection of only using white illumination devices to illuminate partial areas such as small intestines, and are not satisfied with large and complex instruments, which results in low detection efficiency and high cost.
At present, most of the endoscopes on the market adopt a white lighting device lamp with fixed brightness as a lighting tool, and provide illumination for the CMOS camera according to the fixed brightness.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in this working state, the image information is overexposed due to the convex-concave degree of the tissue or organ or the too close distance between the illumination device and the human tissue and the too high local brightness; and the lighting device is too far away from human tissues, and the local brightness is too dark, so that the phenomenon of underexposure of image information occurs. In addition, the burden is great during the operation of the doctor, and the brightness of the lighting facility and the position of the camera need to be adjusted at any time according to different scenes and convex-concave tissues, so that the operation of the whole process is troublesome.
Disclosure of Invention
The embodiment of the application aims to provide an endoscope brightness automatic adjustment method, an endoscope brightness automatic adjustment device, an endoscope brightness automatic adjustment system and electronic equipment, so as to solve the technical problem that the brightness of an illumination device of an endoscope cannot be automatically adjusted in the related art.
According to a first aspect of embodiments of the present application, there is provided an endoscope brightness automatic adjustment method, including:
setting exposure time and sensitivity parameters of a camera of an endoscope to be preset camera exposure time and preset sensitivity parameters in the working mode according to the selected working mode, wherein the working mode is selected by a user according to a use scene of the endoscope;
acquiring an image shot by a camera in the working mode;
converting the image into a YUV format image;
dividing the YUV format image into a plurality of regions with the same size and acquiring Y components of the regions;
and sending an adjusting brightness signal according to the distribution condition of the Y component of each area so as to adjust the brightness of the illumination device of the endoscope.
Further, the step of sending an adjusted luminance signal according to the distribution of the Y component of each region further includes a step of adjusting the sensitivity parameter according to an image captured by the camera after sending the adjusted luminance signal, where the step includes:
acquiring an image shot by a camera after sending the brightness adjusting signal;
if the brightness of the lighting equipment reaches the maximum and the brightness of the image is lower than a normal brightness range, the sensitivity parameter is increased;
and if the brightness of the lighting equipment reaches the lowest brightness and the brightness of the image is higher than a normal brightness range, the sensitivity parameter is reduced.
Further, after the step of adjusting the sensitivity parameter according to the image captured by the camera after sending the adjusted brightness signal, the method further includes:
and repeating the steps of acquiring the image shot by the camera in the working mode and adjusting the sensitivity parameter according to the image shot by the camera after sending the brightness adjusting signal until the brightness of the image is within the normal brightness range.
Further, the setting process of the predetermined exposure time and the predetermined sensitivity parameter of the camera in the working mode includes:
step A1: selecting the highest exposure time and the lowest sensitivity parameter within a predetermined range;
step A2: acquiring a test image shot by a camera under the highest exposure time and the lowest sensitivity parameter;
step A3: judging whether the brightness of the test image is within a normal brightness range;
step A4: if the brightness of the test image is in the normal brightness range, reducing the exposure time of the camera, returning to the step A2 until the brightness of the test image is lower than the normal brightness range, and selecting the exposure time of the camera before the last reduction as the preset exposure time of the camera;
step A5: if the brightness of the test image is lower than the normal brightness range and the brightness of the test image before the last adjustment is within the normal brightness range, the exposure time of the camera before the last adjustment is the preset exposure time of the camera, and the sensitivity parameter before the last adjustment is the preset sensitivity parameter; if the brightness of the test image is lower than the normal brightness range and the brightness of the test image before the last adjustment is not in the normal brightness range, increasing the sensitivity parameter, returning to the step A2 until the brightness of the test image is in the normal brightness range, and taking the sensitivity parameter after the last increase as the preset sensitivity parameter;
step A6: if the brightness of the test image is higher than the normal brightness range and the brightness of the test image before the previous adjustment is within the normal brightness range, the exposure time of the camera before the adjustment is the preset exposure time of the camera, and the sensitivity parameter before the adjustment is the preset sensitivity parameter; and if the brightness of the test image is higher than the normal brightness range and the test image is not in the normal brightness range before the last adjustment, reducing the exposure time of the camera, returning to the step A2 until the brightness of the test image is in the normal brightness range, and taking the exposure time of the camera after the last reduction as the preset exposure time of the camera.
Further, judging whether the brightness of the test image is in a normal brightness range includes:
dividing the test image into a plurality of regions with equal size and acquiring Y components of all pixel points in each region;
setting an initial value of the brightness normality as n;
if the proportion of the pixel points of the Y component in the normal brightness range in the region is not less than the preset proportion, the brightness normality is kept unchanged; if the proportion of the pixel points of which the Y components are lower than the normal brightness range in the region is not less than a second preset proportion, n-1; if the proportion of the pixel points of which the Y components are higher than the normal brightness range in the region is not less than a second preset proportion, n + 1; repeating the step until all the areas of the test image are traversed;
if the brightness normality is within a preset normality range, the brightness of the test image is within the normal brightness range;
if the brightness normality is lower than the preset normality range, the brightness of the test image is lower than the normal brightness range;
and if the brightness normality is higher than the preset normality range, the brightness of the test image is higher than the normal brightness range.
Further, according to the distribution of the Y component of each region, sending an adjusted luminance signal, comprising:
calculating a first proportion occupied by pixel points exceeding a normal brightness range and a second proportion occupied by pixel points lower than the normal brightness range in each region according to the distribution condition of the Y component of each region;
adjusting brightness parameters according to the first proportion and the second proportion of each region;
if the brightness parameter is within a preset parameter range, sending a signal without brightness adjustment;
if the brightness parameter is lower than the preset parameter range, sending a signal for improving the brightness through positive feedback;
and if the brightness parameter is higher than the preset parameter range, sending a negative feedback brightness reducing signal.
According to a second aspect of the embodiments of the present application, there is provided an endoscope brightness automatic adjustment device including:
the system comprises a setting module, a processing module and a control module, wherein the setting module is used for setting the exposure time and the sensitivity parameter of a camera of an endoscope into the preset exposure time and the preset sensitivity parameter of the camera under a working mode according to the selected working mode, and the working mode is selected by a user according to the use scene of the endoscope;
the first acquisition module is used for acquiring the image shot by the camera in the working mode;
the conversion module is used for converting the image into a YUV format image;
the second acquisition module is used for dividing the YUV format image into a plurality of regions with the same size and acquiring Y components of the regions;
and the sending module is used for sending a brightness adjusting signal according to the distribution condition of the Y component of each area so as to adjust the brightness of the illumination equipment of the endoscope.
According to a third aspect of the embodiments of the present application, there is provided an endoscope brightness automatic adjustment system including:
the endoscope comprises a camera and an illuminating device, the camera is used for collecting images in a selected working mode, and the illuminating device is used for illuminating and adjusting the brightness according to an adjusting brightness signal sent by the FPGA module;
the FPGA module is used for setting the exposure time and the sensitivity parameter of a camera of the endoscope into the preset exposure time and the preset sensitivity parameter of the camera under the working mode according to the selected working mode, and the working mode is selected by a user according to the use scene of the endoscope; acquiring an image shot by a camera in the working mode; converting the image into a YUV format image; dividing the YUV format image into a plurality of regions with the same size and acquiring Y components of the regions; and sending an adjusting brightness signal according to the distribution condition of the Y component of each area so as to adjust the brightness of the illumination device of the endoscope.
According to a fourth aspect of embodiments of the present application, there is provided an electronic apparatus, including:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method as described in the first aspect.
According to a fifth aspect of embodiments herein, there is provided a computer-readable storage medium having stored thereon computer instructions, characterized in that the instructions, when executed by a processor, implement the steps of the method according to the first aspect.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
according to the embodiment, the exposure time and the light sensitivity parameter of the camera of the endoscope are set according to the preset working mode, the brightness adjusting signal is sent according to the distribution condition of the Y component of each area after the image shot by the camera in the working mode is divided into a plurality of areas with the same size, the brightness of the endoscope lighting equipment is automatically adjusted, and therefore the image video with the normal range brightness is obtained in different modes, the related configuration of the camera and the lighting brightness of the lighting equipment do not need to be manually adjusted, and the endoscope lighting equipment has the advantages of being powerful in processing function, short in delay time, stable in image, convenient to use and the like.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flow chart illustrating a method for endoscope brightness automatic adjustment according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a process of setting a predetermined camera exposure time and a predetermined sensitivity parameter in an operation mode according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating step A3, according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating step S15 according to an exemplary embodiment.
FIG. 5 is a flow chart illustrating a method for endoscope brightness automatic adjustment, according to an exemplary embodiment.
FIG. 6 is a flow chart illustrating a method for endoscope brightness automatic adjustment, according to an exemplary embodiment.
Fig. 7 is a block diagram illustrating an endoscope brightness automatic adjustment apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a flowchart illustrating an endoscope brightness automatic adjustment method according to an exemplary embodiment, which is applied to an FPGA shown in fig. 1, and may include the following steps:
step S11: setting exposure time and sensitivity parameters of a camera of an endoscope to be preset camera exposure time and preset sensitivity parameters in the working mode according to the selected working mode, wherein the working mode is selected by a user according to a use scene of the endoscope;
step S12: acquiring an image shot by a camera in the working mode;
step S13: converting the image into a YUV format image;
step S14: dividing the YUV format image into a plurality of regions with the same size and acquiring Y components of the regions;
step S15: and sending an adjusting brightness signal according to the distribution condition of the Y component of each area so as to adjust the brightness of the illumination device of the endoscope.
According to the embodiment, the exposure time and the light sensitivity parameter of the camera of the endoscope are set according to the preset working mode, the brightness adjusting signal is sent according to the distribution condition of the Y component of each area after the image shot by the camera in the working mode is divided into a plurality of areas with the same size, the brightness of the endoscope lighting equipment is automatically adjusted, and therefore the image video with the normal range brightness is obtained in different modes, the related configuration of the camera and the lighting brightness of the lighting equipment do not need to be manually adjusted, and the endoscope lighting equipment has the advantages of being powerful in processing function, short in delay time, stable in image, convenient to use and the like.
In a specific implementation of step S11, setting an exposure time and a sensitivity parameter of a camera of an endoscope to a predetermined camera exposure time and a predetermined sensitivity parameter in a selected operation mode according to a usage scenario of the endoscope by a user;
specifically, the working modes are working modes of the lighting device, including visible light, multispectral and narrow-band spectrums, and according to a use scene of the endoscope, a user needs to select the corresponding working mode to provide the corresponding light source.
Specifically, as shown in fig. 2, the process of setting the predetermined exposure time and the predetermined sensitivity parameter of the camera in the working mode includes:
step A1: selecting the highest exposure time and the lowest sensitivity parameter within a predetermined range;
specifically, as shown in table 1, the exposure time is divided into N levels, and as the exposure time increases in order from exposure time 1 to exposure time N, the luminance of the illumination apparatus increases in order; the sensitivity parameter is divided into M grades, and as the sensitivity parameter is sequentially increased from the sensitivity parameter 1 to the sensitivity parameter M, the brightness of the lighting equipment is sequentially increased, and the brightness grades of the lighting equipment are M × N in total. In one embodiment, the exposure time interval is 1/50s and the sensitivity parameter interval is 100, such that the change in the level interval is not too large to result in missing a preferred setting, or too small to slow down the adjustment.
TABLE 1
Figure BDA0003361665950000081
In this step, the highest exposure time and the lowest sensitivity parameter in the predetermined range are selected, i.e., the exposure time N and the sensitivity parameter 1 are selected, the lowest sensitivity parameter is selected to ensure the least noise introduction, and the highest exposure time is selected to select the highest emission luminance of the illumination apparatus under the lowest sensitivity condition.
Step A2: acquiring a test image shot by a camera under the highest exposure time and the lowest sensitivity parameter;
specifically, the test image may be in RAW RGB format, RGB888 format, or YUV format.
Step A3: judging whether the brightness of the test image is within a normal brightness range;
specifically, as shown in fig. 3, this step includes the following sub-steps:
step B1: dividing the test image into a plurality of regions with equal size and acquiring Y components of all pixel points in each region;
specifically, the number of the areas divided by the test image depends on the size of the test image, and in one embodiment, the test image is divided into 9 areas with the same size, namely, upper left, middle left, lower left, upper middle, middle center, lower middle, upper right, middle right, and lower right;
if the test image is in a RAW RGB format, firstly converting the test image into an RGB888 data format through 5-by-5 difference operation, and then converting the test image into YUV format data to obtain a Y component; if the format is RGB888, directly converting the format into YUV format data to obtain Y component; if the format is YUV format, the format is kept unchanged;
because the performance of the FPGA in floating point operation is poor, the Y component value formula when the RGB888 format is converted into the YUV format is as follows:
1000Y=299R+587G+114B。
step B2: setting an initial value of the brightness normality as n;
in one embodiment, the luminance normality count is set to 0 to facilitate the calculation.
Step B3: if the proportion of the pixel points of the Y component in the normal brightness range in the region is not less than the preset proportion, the brightness normality is kept unchanged; if the proportion of the pixel points of which the Y components are lower than the normal brightness range in the region is not less than a second preset proportion, n-1; if the proportion of the pixel points of which the Y components are higher than the normal brightness range in the region is not less than a second preset proportion, n + 1; repeating the step until all the areas of the test image are traversed;
in one embodiment, if the number of pixels in a region within the normal brightness range, i.e., the Y component is between 80 and 160, reaches 90% or more, the count is unchanged; when the Y component less than 80 reaches 90% or more, count-1; if the Y component exceeding 160 reaches 10% or more, count + 1; this step is repeated until the traversal has completed all regions of the test image. According to the actual effect contrast, the brightness of the image with the Y component between 80 and 160 is appropriate, and because the brightness of each point of the area is different, a certain point is not in the range, and therefore, a 10% error threshold value is set.
Step B4: if the brightness normality is within a preset normality range, the brightness of the test image is within the normal brightness range;
in one embodiment, if the value of count is between-1 and 1, then the test image is in the normal brightness range; in the statistical process, each area may have inconsistent brightness due to different illumination distances, and therefore may bring a certain error, and the value of count is set to-1 to 1, in order to eliminate the error.
Step B5: if the brightness normality is lower than the preset normality range, the brightness of the test image is lower than the normal brightness range;
in this embodiment, if the count is less than-1, the luminance of the test image is lower than the normal luminance range.
Step B6: if the brightness normality is higher than the preset normality range, the brightness of the test image is higher than the normal brightness range;
in this embodiment, if the count is greater than 1, the luminance of the test image is higher than the normal luminance range.
Step A4: if the brightness of the test image is in the normal brightness range, reducing the exposure time of the camera, returning to the step A2 until the brightness of the test image is lower than the normal brightness range, and selecting the exposure time of the camera before the last reduction as the preset exposure time of the camera;
specifically, under the initial conditions of the highest exposure time and the lowest sensitivity parameter, if the brightness of the test image is within the normal brightness range, the exposure time of the camera is reduced to suppress dynamic blurring, and a clearer image is obtained.
Step A5: if the brightness of the test image is lower than the normal brightness range and the brightness of the test image before the last adjustment is within the normal brightness range, the exposure time of the camera before the last adjustment is the preset exposure time of the camera, and the sensitivity parameter before the last adjustment is the preset sensitivity parameter; if the brightness of the test image is lower than the normal brightness range and the brightness of the test image before the last adjustment is not in the normal brightness range, increasing the sensitivity parameter, returning to the step A2 until the brightness of the test image is in the normal brightness range, and taking the sensitivity parameter after the last increase as the preset sensitivity parameter;
step A6: if the brightness of the test image is higher than the normal brightness range and the brightness of the test image before the previous adjustment is within the normal brightness range, the exposure time of the camera before the adjustment is the preset exposure time of the camera, and the sensitivity parameter before the adjustment is the preset sensitivity parameter; and if the brightness of the test image is higher than the normal brightness range and the test image is not in the normal brightness range before the last adjustment, reducing the exposure time of the camera, returning to the step A2 until the brightness of the test image is in the normal brightness range, and taking the exposure time of the camera after the last reduction as the preset exposure time of the camera.
In the specific implementation of step S12, acquiring an image captured by the camera in the operating mode;
specifically, the image may be in RAW RGB format, RGB888 format, and YUV format.
In a specific implementation of step S13, converting the image into a YUV format image;
specifically, if the test image is in a RAW RGB format, the test image is firstly converted into an RGB888 data format through 5 × 5 difference operation, and then converted into YUV format data to obtain a Y component; if the format is RGB888, directly converting the format into YUV format data to obtain Y component; if the image is in the YUV format, the image is kept unchanged, and the reason for doing so is that the Y component in the YUV format represents brightness, namely the brightness of an image pixel point, and the brightness-related calculation is convenient to perform after the Y component in the YUV format is converted into the YUV format.
In the specific implementation of step S14, dividing the YUV format image into a plurality of regions with the same size and obtaining Y components of each region;
specifically, the number of the areas into which the test image is divided is determined by the size of the test image, and in an embodiment, the test image is divided into 9 areas with the same size, which are sequentially an upper left area, a middle left area, a lower left area, a middle upper area, a middle lower area, an upper right area, a middle area, a lower right area, a middle right area, and a lower right area, and a Y component value formula of each pixel point in each area is as follows:
1000Y=299R+587G+114B。
in the specific implementation of step S15, an adjustment brightness signal is sent to adjust the brightness of the illumination device of the endoscope according to the distribution of the Y component of each region.
Specifically, as shown in fig. 4, this step may include the following sub-steps:
step C1: calculating a first proportion occupied by pixel points exceeding a normal brightness range and a second proportion occupied by pixel points lower than the normal brightness range in each region according to the distribution condition of the Y component of each region;
step C2: adjusting brightness parameters according to the first proportion and the second proportion of each region;
step C3: if the brightness parameter is within a preset parameter range, sending a signal without brightness adjustment;
step C4: if the brightness parameter is lower than the preset parameter range, sending a signal for improving the brightness through positive feedback;
step C5: and if the brightness parameter is higher than the preset parameter range, sending a negative feedback brightness reducing signal.
Specifically, the calculation, adjustment, and determination processes in steps C1 to C5 are the same as those in steps B1 to B5, and the illumination apparatus is made to change the brightness by changing the current magnitude and duty ratio by transmitting the adjustment brightness signal to the illumination apparatus.
Specifically, as shown in fig. 5, after step S15, the method may further include:
step S16: acquiring an image shot by a camera after sending the brightness adjusting signal;
specifically, in order to prevent the brightness of the image acquired again from remaining out of the normal brightness range after the process of steps S11-S15 and the brightness of the lighting device is adjusted, the brightness-adjusted image may be acquired through this step, and the brightness adjustment may be performed through steps S17-S18.
Step S17: if the brightness of the lighting equipment reaches the maximum and the brightness of the image is lower than a normal brightness range, the sensitivity parameter is increased;
specifically, under the initial conditions of the highest exposure time and the lowest sensitivity parameter, through the steps of the above-described steps S11 to S15, if the luminance of the illumination apparatus has reached the highest but the luminance of the image is lower than the normal luminance range, it can be inferred that the sensitivity parameter is too low, and thus the sensitivity is adjusted high.
Step S18: and if the brightness of the lighting equipment reaches the lowest brightness and the brightness of the image is higher than a normal brightness range, the sensitivity parameter is reduced.
Specifically, under the initial conditions of the highest exposure time and the lowest sensitivity parameter, through the steps of the above-described steps S11 to S15, if the luminance of the illumination apparatus has reached the lowest but the luminance of the image is higher than the normal luminance range, it can be concluded that the sensitivity parameter is too high, and thus the sensitivity is turned down.
Specifically, as shown in fig. 6, after step S18, the method may further include:
step S19: repeating the steps of obtaining an image and sending a brightness adjusting signal until the brightness of the image is within the normal brightness range;
specifically, the operations of steps S12-S18 are repeatedly performed until the luminance of the image is within the normal luminance range.
Corresponding to the embodiment of the endoscope brightness automatic adjusting method, the application also provides an embodiment of the endoscope brightness automatic adjusting device.
Fig. 7 is a block diagram illustrating an endoscope brightness automatic adjustment apparatus according to an exemplary embodiment. Referring to fig. 7, the apparatus includes:
the setting module 21 is used for setting the exposure time and the sensitivity parameter of the camera of the endoscope to be the preset exposure time and the preset sensitivity parameter of the camera in the working mode according to the selected working mode, and the working mode is selected by a user according to the use scene of the endoscope;
a first obtaining module 22, configured to obtain an image captured by the camera in the working mode;
a conversion module 23, which converts the image into a YUV format image;
the second obtaining module 24 is configured to divide the YUV format image into a plurality of regions with the same size and obtain Y components of each region;
and the sending module 25 is used for sending an adjusting brightness signal according to the distribution situation of the Y component of each area so as to adjust the brightness of the illumination equipment of the endoscope.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
Accordingly, the present application also provides embodiments of an endoscope brightness automatic adjustment system, comprising:
the endoscope 100 comprises a camera 110 and an illuminating device 120, wherein the camera is used for collecting images in a selected working mode, and the illuminating device is used for illuminating and adjusting the brightness according to an adjusting brightness signal sent by the FPGA module;
specifically, the cameras can be in the shapes of ov6946 and ov6948, the lighting devices can be LED lamps, cold cathode tube neon lamps and white moxibustion lamps, in the embodiment, the cameras are in the shapes of ov6946, the lighting devices are LED lamps, the in v6946 has the advantages of being small in size, proper in resolution, small in image data amount and the like, and the LED lamps have the advantages of being mature in technology, low in heat generation in the working stage and the like.
The FPGA module 200 is used for setting the exposure time and the sensitivity parameter of a camera of the endoscope to be preset camera exposure time and preset sensitivity parameter in the working mode according to the selected working mode, and the working mode is selected by a user according to the using scene of the endoscope; acquiring an image shot by a camera in the working mode; converting the image into a YUV format image; dividing the YUV format image into a plurality of regions with the same size and acquiring Y components of the regions; sending a brightness adjusting signal according to the distribution condition of the Y component of each area so as to adjust the brightness of the illuminating equipment of the endoscope;
in particular, the specific manner of performing the operation of the FPGA module has been described in detail in relation to the embodiment of the method, and will not be elaborated here.
Correspondingly, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the endoscope brightness automatic adjustment method as described above.
Accordingly, the present application also provides a computer readable storage medium, on which computer instructions are stored, wherein the instructions are executed by a processor to implement the endoscope brightness automatic adjustment method.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. An endoscope brightness automatic adjustment method is characterized by comprising the following steps:
setting exposure time and sensitivity parameters of a camera of an endoscope to be preset camera exposure time and preset sensitivity parameters in the working mode according to the selected working mode, wherein the working mode is selected by a user according to a use scene of the endoscope;
acquiring an image shot by a camera in the working mode;
converting the image into a YUV format image;
dividing the YUV format image into a plurality of regions with the same size and acquiring Y components of the regions;
and sending an adjusting brightness signal according to the distribution condition of the Y component of each area so as to adjust the brightness of the illumination device of the endoscope.
2. The method according to claim 1, wherein the step of sending the adjusted luminance signal according to the distribution of the Y component of each region further comprises the step of adjusting the sensitivity parameter according to an image captured by the camera after sending the adjusted luminance signal, the step comprising:
acquiring an image shot by a camera after sending the brightness adjusting signal;
if the brightness of the lighting equipment reaches the maximum and the brightness of the image is lower than a normal brightness range, the sensitivity parameter is increased;
and if the brightness of the lighting equipment reaches the lowest brightness and the brightness of the image is higher than a normal brightness range, the sensitivity parameter is reduced.
3. The method of claim 2, wherein adjusting the sensitivity parameter based on the image captured by the camera after sending the adjusted luminance signal further comprises:
and repeating the steps of acquiring the image shot by the camera in the working mode and adjusting the sensitivity parameter according to the image shot by the camera after sending the brightness adjusting signal until the brightness of the image is within the normal brightness range.
4. The method of claim 1, wherein the setting of the predetermined camera exposure time and the predetermined sensitivity parameter in the operating mode comprises:
step A1: selecting the highest exposure time and the lowest sensitivity parameter within a predetermined range;
step A2: acquiring a test image shot by a camera under the highest exposure time and the lowest sensitivity parameter;
step A3: judging whether the brightness of the test image is within a normal brightness range;
step A4: if the brightness of the test image is in the normal brightness range, reducing the exposure time of the camera, returning to the step A2 until the brightness of the test image is lower than the normal brightness range, and selecting the exposure time of the camera before the last reduction as the preset exposure time of the camera;
step A5: if the brightness of the test image is lower than the normal brightness range and the brightness of the test image before the last adjustment is within the normal brightness range, the exposure time of the camera before the last adjustment is the preset exposure time of the camera, and the sensitivity parameter before the last adjustment is the preset sensitivity parameter; if the brightness of the test image is lower than the normal brightness range and the brightness of the test image before the last adjustment is not in the normal brightness range, increasing the sensitivity parameter, returning to the step A2 until the brightness of the test image is in the normal brightness range, and taking the sensitivity parameter after the last increase as the preset sensitivity parameter;
step A6: if the brightness of the test image is higher than the normal brightness range and the brightness of the test image before the previous adjustment is within the normal brightness range, the exposure time of the camera before the adjustment is the preset exposure time of the camera, and the sensitivity parameter before the adjustment is the preset sensitivity parameter; and if the brightness of the test image is higher than the normal brightness range and the test image is not in the normal brightness range before the last adjustment, reducing the exposure time of the camera, returning to the step A2 until the brightness of the test image is in the normal brightness range, and taking the exposure time of the camera after the last reduction as the preset exposure time of the camera.
5. The method of claim 4, wherein determining whether the luminance of the test image is within a normal luminance range comprises:
dividing the test image into a plurality of regions with equal size and acquiring Y components of all pixel points in each region;
setting an initial value of the brightness normality as n;
if the proportion of the pixel points of the Y component in the normal brightness range in the region is not less than the preset proportion, the brightness normality is kept unchanged; if the proportion of the pixel points of which the Y components are lower than the normal brightness range in the region is not less than a second preset proportion, n-1; if the proportion of the pixel points of which the Y components are higher than the normal brightness range in the region is not less than a second preset proportion, n + 1; repeating the step until all the areas of the test image are traversed;
if the brightness normality is within a preset normality range, the brightness of the test image is within the normal brightness range;
if the brightness normality is lower than the preset normality range, the brightness of the test image is lower than the normal brightness range;
and if the brightness normality is higher than the preset normality range, the brightness of the test image is higher than the normal brightness range.
6. The method of claim 1, wherein sending the adjusted luminance signal according to the distribution of the Y component of each region comprises:
calculating a first proportion occupied by pixel points exceeding a normal brightness range and a second proportion occupied by pixel points lower than the normal brightness range in each region according to the distribution condition of the Y component of each region;
adjusting brightness parameters according to the first proportion and the second proportion of each region;
if the brightness parameter is within a preset parameter range, sending a signal without brightness adjustment;
if the brightness parameter is lower than the preset parameter range, sending a signal for improving the brightness through positive feedback;
and if the brightness parameter is higher than the preset parameter range, sending a negative feedback brightness reducing signal.
7. An endoscope brightness automatic regulating device is characterized by comprising:
the system comprises a setting module, a processing module and a control module, wherein the setting module is used for setting the exposure time and the sensitivity parameter of a camera of an endoscope into the preset exposure time and the preset sensitivity parameter of the camera under a working mode according to the selected working mode, and the working mode is selected by a user according to the use scene of the endoscope;
the first acquisition module is used for acquiring the image shot by the camera in the working mode;
the conversion module is used for converting the image into a YUV format image;
the second acquisition module is used for dividing the YUV format image into a plurality of regions with the same size and acquiring Y components of the regions;
and the sending module is used for sending a brightness adjusting signal according to the distribution condition of the Y component of each area so as to adjust the brightness of the illumination equipment of the endoscope.
8. An endoscope brightness automatic regulating system, characterized by comprising:
the endoscope comprises a camera and an illuminating device, the camera is used for collecting images in a selected working mode, and the illuminating device is used for illuminating and adjusting the brightness according to an adjusting brightness signal sent by the FPGA module;
the FPGA module is used for setting the exposure time and the sensitivity parameter of a camera of the endoscope into the preset exposure time and the preset sensitivity parameter of the camera under the working mode according to the selected working mode, and the working mode is selected by a user according to the use scene of the endoscope; acquiring an image shot by a camera in the working mode; converting the image into a YUV format image; dividing the YUV format image into a plurality of regions with the same size and acquiring Y components of the regions; and sending an adjusting brightness signal according to the distribution condition of the Y component of each area so as to adjust the brightness of the illumination device of the endoscope.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
10. A computer-readable storage medium having stored thereon computer instructions, which, when executed by a processor, carry out the steps of the method according to any one of claims 1-6.
CN202111368311.XA 2021-11-18 2021-11-18 Endoscope brightness automatic adjustment method, device and system and electronic equipment Active CN114125225B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111368311.XA CN114125225B (en) 2021-11-18 2021-11-18 Endoscope brightness automatic adjustment method, device and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111368311.XA CN114125225B (en) 2021-11-18 2021-11-18 Endoscope brightness automatic adjustment method, device and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN114125225A true CN114125225A (en) 2022-03-01
CN114125225B CN114125225B (en) 2023-03-24

Family

ID=80397817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111368311.XA Active CN114125225B (en) 2021-11-18 2021-11-18 Endoscope brightness automatic adjustment method, device and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN114125225B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116437221A (en) * 2023-04-21 2023-07-14 极限人工智能有限公司 Method and system for intercepting endoscope video image
CN117726559A (en) * 2023-12-14 2024-03-19 江苏北方湖光光电有限公司 Luminance self-adaptive matching method based on low-illumination multi-view image stitching

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650473A (en) * 2018-05-28 2018-10-12 重庆金山医疗器械有限公司 The method and system of endoscope LED light automatic brightness adjustment
JP2018166988A (en) * 2017-03-30 2018-11-01 Hoya株式会社 Electronic endoscope system, electronic endoscope, treatment instrument, and endoscope controller
CN109688896A (en) * 2016-09-09 2019-04-26 茵泰勒斯医疗公司 Wireless endoscope
CN111343387A (en) * 2019-03-06 2020-06-26 杭州海康慧影科技有限公司 Automatic exposure method and device for camera equipment
WO2021073072A1 (en) * 2019-10-16 2021-04-22 深圳迈瑞生物医疗电子股份有限公司 Endoscope camera system, camera host and display control method therefor
US20210195081A1 (en) * 2019-12-20 2021-06-24 Verily Life Sciences Llc Method for adjusting an exposure of an endoscope

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688896A (en) * 2016-09-09 2019-04-26 茵泰勒斯医疗公司 Wireless endoscope
JP2018166988A (en) * 2017-03-30 2018-11-01 Hoya株式会社 Electronic endoscope system, electronic endoscope, treatment instrument, and endoscope controller
CN108650473A (en) * 2018-05-28 2018-10-12 重庆金山医疗器械有限公司 The method and system of endoscope LED light automatic brightness adjustment
CN111343387A (en) * 2019-03-06 2020-06-26 杭州海康慧影科技有限公司 Automatic exposure method and device for camera equipment
WO2021073072A1 (en) * 2019-10-16 2021-04-22 深圳迈瑞生物医疗电子股份有限公司 Endoscope camera system, camera host and display control method therefor
US20210195081A1 (en) * 2019-12-20 2021-06-24 Verily Life Sciences Llc Method for adjusting an exposure of an endoscope

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116437221A (en) * 2023-04-21 2023-07-14 极限人工智能有限公司 Method and system for intercepting endoscope video image
CN116437221B (en) * 2023-04-21 2024-04-05 极限人工智能有限公司 Method and system for intercepting endoscope video image
CN117726559A (en) * 2023-12-14 2024-03-19 江苏北方湖光光电有限公司 Luminance self-adaptive matching method based on low-illumination multi-view image stitching

Also Published As

Publication number Publication date
CN114125225B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN110505459B (en) Image color correction method, device and storage medium suitable for endoscope
CN114125225B (en) Endoscope brightness automatic adjustment method, device and system and electronic equipment
CN110033418B (en) Image processing method, image processing device, storage medium and electronic equipment
JP6185453B2 (en) Automatic selection of optimal algorithm for high dynamic range image processing based on scene classification
CN110619593B (en) Double-exposure video imaging system based on dynamic scene
JP4167097B2 (en) Image processing method and image processing apparatus
JP4218723B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
US7480421B2 (en) Rendering of high dynamic range images
US8072507B2 (en) Method and system of generating high dynamic range image corresponding to specific scene
CN105578068A (en) High-dynamic-range image generation method, device and mobile terminal
CN111294575B (en) Image processing method, image processing device, electronic equipment and storage medium
CN101170650A (en) Highly dynamic image method and system generating specific scenario
CN108650473B (en) Method and system for automatically adjusting brightness of endoscope L ED lamp
JP2007124087A (en) Imaging apparatus, gradation correction method, and program
CN112565636A (en) Image processing method, device, equipment and storage medium
CN112243091B (en) Three-dimensional endoscope system, control method, and storage medium
US20220012915A1 (en) Apparatuses, systems, and methods for managing auto-exposure of image frames depicting signal content against a darkened background
US20080043262A1 (en) Method and apparatus for applying tonal correction to images
JP2002223387A (en) Imaging unit
CN110807735A (en) Image processing method, image processing device, terminal equipment and computer readable storage medium
JPWO2016170604A1 (en) Endoscope device
CN110246086B (en) Image processing method for color image enhancement and image processing system thereof
CN112738410A (en) Imaging method and device and endoscope equipment
CN108337448B (en) High dynamic range image acquisition method and device, terminal equipment and storage medium
CN109949301B (en) Wireless endoscope camera shooting illumination system

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
GR01 Patent grant
GR01 Patent grant