Exposure adjusting method and device and computer equipment
In the fluorescence imaging system, exposure detection and adjustment is performed using the proportion of brightness changing regions and the unchanged brightness marking, the problem of instability in the fluorescence imaging region is solved, and the accuracy of identification of lesions is improved.
Patent Information
- Application Number
- CN202411947928.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-26
AI Technical Summary
During the fluorescence imaging process, existing exposure adjustment methods lead to instability of the imaging area of the fluorescence region, which in turn affects the accuracy of the identification of lesion boundaries.
By acquiring the image frame to be adjusted, based on the recording data of the previous exposure adjustment period and the detection parameters of the current exposure adjustment period, the proportion of the brightness change region and the brightness constant mark in the metering area of the image frame are determined, and exposure detection is performed, and exposure adjustment or maintenance is performed according to the detection results.
The stability of the fluorescence imaging area is maintained during changes in irradiation angle, instrument occlusion, and distance changes, and the accuracy of identification of lesions is improved.
Smart Images

Figure CN119854645A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of display technology, and in particular to an exposure adjustment method, device and computer equipment. Background Art
[0002] With the development of optical technology, optical imaging technology has been widely used in the medical field. For example, in the use of endoscopes, visible light imaging is usually used to provide basic images, and special light imaging is used to provide navigation functions.
[0003] Existing special light imaging mainly uses ICG (Indocyanine Green) reagent for imaging. Specifically, near-infrared excitation light is irradiated on the tissue combined with ICG to stimulate ICG to emit fluorescence, and fluorescence imaging is achieved by capturing the fluorescence signal. In the process of fluorescence imaging, exposure adjustment is required to improve the display quality of the image.
[0004] There are two existing exposure adjustment methods. One is to set the target brightness. When the picture brightness is higher than the target brightness, the exposure parameters are adjusted downward. When the picture brightness is lower than the target brightness, the exposure parameters are adjusted upward to maintain the picture brightness stable. The other is to guide the exposure adjustment of fluorescence based on white light information. With the above two exposure adjustment methods, the area of fluorescence imaging will change when the irradiation angle changes, the instrument is blocked, and the distance changes. When the imaging area of the fluorescence area is unstable, there will be a problem of inaccurate recognition results of the lesion boundary.
[0005] With respect to the existing exposure adjustment method, when the fluorescent imaging area is unstable, there will be a problem of inaccurate recognition results of the lesion boundary, and no effective solution has been proposed yet. Summary of the invention
[0006] Based on this, it is necessary to provide an exposure adjustment method, device and computer equipment to address the above technical problems.
[0007] In a first aspect, the present application provides an exposure adjustment method. The method comprises the following steps:
[0008] Acquire the image frame to be adjusted;
[0009] Based on the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle, determining the proportion of the brightness change area and the brightness unchanged mark in the metering area of the image frame to be adjusted; the recorded data of the previous exposure adjustment cycle at least includes the brightness information and exposure parameters of the previous exposure adjustment cycle; the detection parameters at least include the metering area and the target brightness value;
[0010] Based on the proportion of the brightness change area in the light metering area of the image frame to be adjusted and the brightness unchanged mark, performing exposure detection on the image frame to be adjusted to obtain an exposure detection result;
[0011] When the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is required, the exposure adjustment of the image frame to be adjusted is performed; or when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is not required, the exposure of the image frame to be adjusted is maintained.
[0012] In one embodiment, the following steps are also included:
[0013] Based on the light metering area and the target brightness value of the detection parameter of the current exposure adjustment cycle, the exposure parameter of the current exposure adjustment cycle is initialized.
[0014] In one of the embodiments, the process of determining the brightness change area ratio and the brightness unchanged flag in the photometric area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle includes the following steps:
[0015] Segmenting the light metering area of the image frame to be adjusted to obtain segmented small blocks;
[0016] Based on the region of interest of the image frame to be adjusted, determining valid small blocks among the segmented small blocks; the valid small blocks are small blocks containing the region of interest;
[0017] Based on the recorded data of the previous exposure adjustment cycle, the brightness values of each of the valid small blocks, and the target brightness value in the detection parameters of the current exposure adjustment cycle, the proportion of the brightness change area in the metering area of the image frame to be adjusted and the brightness unchanged mark are determined.
[0018] In one embodiment, the process of determining the brightness change area ratio and the brightness unchanged flag in the photometric area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle, the brightness values of each of the valid small blocks, and the target brightness value in the detection parameters of the current exposure adjustment cycle includes the following steps:
[0019] Based on the recorded data of the previous exposure adjustment cycle and the brightness value of each of the valid small blocks, determine the brightness change difference of each of the valid small blocks and the brightness adjustment direction of each of the valid small blocks; the brightness change difference of the valid small blocks is the brightness change difference of the valid small blocks between the current exposure adjustment cycle and the previous exposure adjustment cycle;
[0020] Based on the brightness adjustment direction of each of the valid small blocks, the brightness value of each of the valid small blocks, the target brightness value in the detection parameter of the current exposure adjustment cycle, and the exposure parameter of the previous exposure adjustment cycle, determine the upper limit of the change degree of each of the valid small blocks and the lower limit of the change degree of each of the valid small blocks;
[0021] Based on the brightness change difference of each valid small block, the upper limit of the change degree of each valid small block and the lower limit of the change degree of each valid small block, the brightness change area ratio and the brightness unchanged mark in the metering area of the image frame to be adjusted are determined.
[0022] In one embodiment, the step of determining the brightness change difference of each valid small block and the brightness adjustment direction of each valid small block based on the recorded data of the previous exposure adjustment cycle and the brightness value of each valid small block comprises the following steps:
[0023] Based on the recorded data of the previous exposure adjustment cycle, determining the brightness value of each of the valid small blocks in the previous exposure adjustment cycle;
[0024] Based on the brightness value of each of the valid small blocks in the previous exposure adjustment cycle and the brightness value of each of the valid small blocks, the brightness change difference of each of the valid small blocks and the brightness adjustment direction of each of the valid small blocks are determined.
[0025] In one embodiment, determining the brightness change area ratio and the brightness unchanged flag in the photometric area of the image frame to be adjusted based on the brightness change difference of each of the valid small blocks, the upper limit of the change degree of each of the valid small blocks, and the lower limit of the change degree of each of the valid small blocks comprises the following steps:
[0026] Determine a change ratio coefficient of each valid small block based on a brightness change difference of each valid small block, an upper limit of a change degree of each valid small block, and a lower limit of a change degree of each valid small block;
[0027] Based on the change degree ratio coefficient of each of the valid small blocks and the total number of the valid small blocks, determining the proportion of the brightness change area in the light metering area of the image frame to be adjusted;
[0028] Assigning a brightness constant flag to each of the valid small blocks to obtain a brightness constant flag assignment result for each of the valid small blocks;
[0029] Based on the brightness invariant flag assignment results of the effective small blocks, the brightness invariant flag of the light metering area of the image frame to be adjusted is determined.
[0030] In one of the embodiments, performing exposure detection on the image frame to be adjusted based on the proportion of the brightness change area in the light metering area of the image frame to be adjusted and the brightness unchanged flag to obtain the exposure detection result includes the following steps:
[0031] Based on the proportion of the brightness change area in the metering area of the image frame to be adjusted and the brightness unchanged flag, the brightness value of the metering area of the image frame to be adjusted, and the target brightness value in the detection parameters of the current exposure adjustment cycle, exposure detection is performed on the image frame to be adjusted to obtain the exposure detection result, as well as the upper and lower limits of the exposure adjustment.
[0032] In one of the embodiments, when the exposure detection result shows that the image frame to be adjusted needs to be exposed, the exposure adjustment is performed on the image frame to be adjusted, comprising the following steps:
[0033] Based on a preset setting rule of a photometric weight matrix, determining the brightness value of the photometric area of the image frame to be adjusted; the photometric weight matrix is a matrix representing the weight of the brightness value of each pixel in the brightness calculation process of the image frame;
[0034] Based on the difference between the brightness value of the photometric area of the image frame to be adjusted and the target brightness value in the detection parameter, the proportion of the brightness change area in the photometric area of the image frame to be adjusted, and the upper and lower limits of the exposure adjustment, the adjustment amount of the exposure parameter of the current exposure adjustment cycle is determined; the photometric weight matrix is a matrix representing the weight of the brightness value of each pixel in the brightness calculation process of the image frame;
[0035] Based on the adjustment amount of the exposure parameter in the current exposure adjustment cycle, exposure adjustment is performed on the image frame to be adjusted.
[0036] In a second aspect, the present application also provides an exposure adjustment device. The device comprises:
[0037] An image acquisition module, used for acquiring an image frame to be detected;
[0038] A proportion calculation module, used to determine the proportion of the brightness change area in the photometric area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle; the recorded data of the previous exposure adjustment cycle at least includes the brightness information and exposure parameters of the previous exposure adjustment cycle; the detection parameters at least include the photometric area and the target brightness value;
[0039] an exposure detection module, configured to perform exposure detection on the image frame to be adjusted based on the proportion of the brightness change area in the light metering area of the image frame to be adjusted, and obtain an exposure detection result;
[0040] and an adjustment module, which is used to adjust the exposure of the image frame to be adjusted when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is required; or to maintain the exposure of the image frame to be adjusted when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is not required.
[0041] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the exposure adjustment method described in the first aspect is implemented.
[0042] The above-mentioned exposure adjustment method, device and computer equipment, in this step, by calculating the brightness of the image frame to be adjusted, and by referring to the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle, the proportion of the brightness change area and the brightness unchanged mark of the photometric area of the image frame to be adjusted are determined. By using the proportion of the brightness change area and the brightness unchanged mark of the photometric area of the image frame to be adjusted, it is achieved that when the disturbance in the image frame to be adjusted is detected to be a small disturbance range, the exposure remains unchanged, and when the disturbance in the image frame to be adjusted is detected to be a large disturbance range, the exposure adjustment is performed, so that when the illumination angle changes, the instrument is blocked, and the distance changes, the area of the fluorescent imaging will not change. The existing exposure adjustment method solves the problem that when the fluorescent area imaging area is unstable, there will be inaccurate recognition results of the lesion boundary.
[0043] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0045] Figure 1 A hardware structure block diagram of a terminal for an exposure adjustment method provided in an embodiment of the present application;
[0046] Figure 2 A flow chart of an exposure adjustment method provided in one embodiment of the present application;
[0047] Figure 3 A flowchart of an exposure adjustment method provided in a preferred embodiment of the present application;
[0048] Figure 4 This is a structural block diagram of an exposure adjustment device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0050] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0051] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the exposure adjustment method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1More or fewer components as shown, or with Figure 1 Different configurations shown.
[0052] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the exposure adjustment method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0053] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0054] In this embodiment, an exposure adjustment method is provided. Figure 2 is a flow chart of the exposure adjustment method of this embodiment. Figure 2 As shown, the process includes the following steps:
[0055] Step S210, obtaining an image frame to be adjusted.
[0056] The above-mentioned image frames to be adjusted may be image frames that require exposure adjustment. For example, they may be image frames that require exposure adjustment during the use of an endoscope. Specifically, they may be image data in the endoscope field of view collected by a camera carried by the endoscope during the use of the endoscope. The above-mentioned acquisition of the image frames to be adjusted may be to acquire the image frames to be adjusted according to a preset time interval, so as to timely adjust the exposure of the image frames according to the acquired image frames to be adjusted.
[0057] Step S220, based on the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle, determine the proportion of the brightness change area and the brightness unchanged mark in the metering area of the image frame to be adjusted; the recorded data of the previous exposure adjustment cycle at least includes the brightness information and exposure parameters of the previous exposure adjustment cycle; the detection parameters at least include the metering area and the target brightness value.
[0058] The above-mentioned last exposure adjustment cycle may be a process of performing exposure adjustment on an image frame adjacent to the image frame to be adjusted. It should be noted that the exposure adjustment involved in this embodiment includes two states: exposure adjustment and exposure holding. Therefore, the process of performing exposure adjustment on an image frame adjacent to the image frame to be adjusted may be a process of exposure holding or exposure adjustment. It should be noted that this embodiment performs exposure adjustment on all acquired image frames to be adjusted by default, and each image frame corresponds to an exposure adjustment cycle. When the specific exposure adjustment process is exposure holding, the exposure parameters do not change during this exposure adjustment cycle. When the specific exposure adjustment process is exposure adjustment, the exposure parameters change during this exposure adjustment cycle. The recorded data of the above-mentioned last exposure adjustment cycle includes at least the brightness information and exposure parameters of the last exposure adjustment cycle, and may also include the target brightness value of the last exposure adjustment cycle. The brightness information of the above-mentioned last exposure adjustment cycle may be the brightness values of the pixels or small blocks at each position of the photometric area of the image frame corresponding to the last exposure adjustment cycle. The exposure parameters of the previous exposure adjustment cycle may include one or more of the sensor shutter (exposure time), analog gain, digital gain and light source brightness of the previous exposure adjustment cycle.
[0059] Among them, the detection parameters of the current exposure adjustment cycle at least include the photometric area and target brightness value of the current exposure adjustment cycle, and may also include the photometric mode of the current exposure adjustment cycle, etc. The photometric area may be any area in the image frame to be adjusted, and may be specifically set according to the needs, and this embodiment is not specifically limited here. The target brightness value may be the brightness value required for fluorescent development, and specifically, the brightness value required for fluorescent development may be the brightness value corresponding to the preset gear of the endoscope, and this brightness value may be an adjustable value that varies according to the different gears of the endoscope. The photometric mode may include two photometric modes: one in which the extraction of the region of interest is turned on and the other in which the extraction of the region of interest is not turned on. When the extraction of the region of interest is turned on, the region of interest is extracted in the photometric area, and when the extraction of the region of interest is not turned on, the photometric area is defaulted to the region of interest.
[0060] In this embodiment, the detection parameters of the current exposure adjustment cycle may be the same as the detection parameters of the previous exposure adjustment cycle, or the user may call up an adjustment menu through a handle or a touch screen and set the parameters according to the needs through the adjustment menu.
[0061] Before determining the proportion of the brightness change area and the brightness unchanged mark in the metering area of the image frame to be adjusted, it is necessary to first determine the metering area of the image frame to be adjusted. The above-mentioned determination of the metering area of the image frame to be adjusted can be based on the detection parameters of the current exposure adjustment cycle to determine the metering area of the image frame to be adjusted.
[0062] The ratio of the brightness change area in the photometric area of the above-mentioned image frame to be adjusted may be a parameter representing the ratio of the area determined to have brightness change in the area including the area of interest in the photometric area of the image frame to be adjusted. When the ratio of the brightness change area in the photometric area of the image frame to be adjusted is large, it means that the range of the area determined to have brightness change in the area (developing area) including the area of interest in the photometric area of the image frame to be adjusted accounts for a large range of the total developing area; when the ratio of the brightness change area in the photometric area of the image frame to be adjusted is small, it means that the range of the area determined to have brightness change in the area (developing area) including the area of interest in the photometric area of the image frame to be adjusted accounts for a small range of the total developing area.
[0063] The above-mentioned brightness constant flag is a flag indicating whether the region of interest of the image frame to be adjusted is brightness adjusted during this exposure adjustment cycle. The brightness constant flag includes the local brightness constant flag of each pixel or small block and the global brightness constant flag of the current image frame. The effective pixels or small blocks in the region of interest of the image frame to be adjusted are analyzed one by one, and each effective pixel or small block has its own local brightness constant flag. According to the degree of brightness change of the pixel or small block in the previous and next exposure cycles, the local brightness constant flag corresponding to the pixel or small block is set to valid or invalid. The local brightness constant flags of all pixels or small blocks are judged to obtain the brightness constant flag of the current image frame. When the above-mentioned brightness constant flags of each pixel or small block are all invalid, it is considered that the brightness of all the regions of interest of the image frame has changed, and the brightness constant flag of the current image frame is invalid; when the above-mentioned brightness constant flags of each pixel or small block are valid, there is a brightness constant region in the region of interest of the image frame, and the brightness constant flag of the current image frame is valid. Optionally, in some cases, after global exposure adjustment, the post-processing digital gain can be used to perform non-global brightness compensation adjustment on the image frame, and the area of the image frame that does not need exposure adjustment is marked as constant brightness. When performing post-processing digital gain exposure adjustment, when it is recognized that the area has a constant brightness mark, this area does not perform post-processing digital gain exposure compensation to maintain the brightness of this area. It should be noted that the constant brightness mark can be specifically set according to the specific situation, and this embodiment does not make specific limitations here. The above-mentioned development area is the area of fluorescent development of the image frame to be adjusted. The above-mentioned global exposure adjustment is an exposure adjustment caused by shutter, analog gain, front-end digital gain, light source, etc., which acts on the entire image frame.
[0064] Step S230 , based on the brightness change area ratio and the brightness unchanged flag in the light metering area of the image frame to be adjusted, performing exposure detection on the image frame to be adjusted to obtain an exposure detection result.
[0065] The exposure detection of the image frame to be adjusted is performed to obtain the exposure detection result, which can be a detection of exposure adjustment and exposure maintenance of the image frame to be adjusted. When the brightness constant flag of the image frame is invalid, it is considered that the brightness of all the regions of interest of the image frame has changed, and the development region of the image frame to be adjusted needs to be adjusted at this time; when the brightness constant flag of the image frame is valid, the judgment is made according to the proportion of the brightness change region in the region of interest of the image frame to be adjusted. Specifically, when the proportion of the brightness change region in the metering area of the image frame to be adjusted is small, that is, the range of the brightness change in the metering area of the image frame to be adjusted accounts for a small range of the total development area, it is not necessary to adjust the range of the development area of the image frame to be adjusted at this time, and exposure maintenance is required. When the proportion of the brightness change region in the metering area of the image frame to be adjusted is large, that is, the range of the brightness change in the metering area of the image frame to be adjusted accounts for a large range of the total development area, it is necessary to adjust the range of the development area of the image frame to be adjusted at this time, and exposure adjustment is required. The above exposure detection result includes two judgment results: exposure maintenance and exposure adjustment. It should be noted that when performing exposure adjustment, if a brightness constant flag is set for certain areas, the brightness of this area can be maintained constant through post-processing digital gain.
[0066] Step S240, when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is required, the exposure adjustment of the image frame to be adjusted is performed; or when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is not required, the exposure of the image frame to be adjusted is maintained.
[0067] The exposure adjustment may be to adjust the exposure parameters of the current exposure adjustment cycle to adjust the exposure of the image frame to be adjusted. The exposure retention may be to keep the exposure parameters of the current exposure adjustment cycle unchanged, that is, to keep the exposure parameters of the current exposure adjustment cycle the same as the exposure parameters of the previous exposure adjustment cycle.
[0068] In the above steps S210 to S240, by calculating the brightness of the image frame to be adjusted, and by referring to the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle, the proportion of the degree of change of the image frame to be adjusted is determined, and the range of the brightness change in the photometric area of the image frame to be adjusted accounts for the range of the total development area, and then, according to the range of the brightness change in the photometric area of the image frame to be adjusted, it is determined whether the current exposure adjustment cycle is to maintain exposure or to adjust exposure, so that when the disturbance in the image frame to be adjusted is detected to be a small disturbance range, the exposure remains unchanged, and when the disturbance in the image frame to be adjusted is detected to be a large disturbance range, the exposure adjustment is performed, so that when there are small disturbances such as changes in the irradiation angle, occlusion of the instrument, and changes in the distance, the exposure is maintained, and the area of the fluorescence imaging will not change. The existing exposure adjustment method solves the problem that when the imaging area of the fluorescence area is unstable, there will be inaccurate recognition results of the lesion boundary.
[0069] In one embodiment, the following steps are also included:
[0070] Based on the photometric area and the target brightness value of the detection parameters of the current exposure adjustment cycle, the exposure parameters of the current exposure adjustment cycle are initialized.
[0071] Specifically, in one embodiment, based on step S220, based on the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle, determining the proportion of the brightness change area in the metering area of the image frame to be adjusted includes the following steps:
[0072] Step S222, dividing the light measurement area of the image frame to be adjusted to obtain divided small blocks.
[0073] The above-mentioned segmentation of the photometric area of the image frame to be adjusted can be performed by segmenting the photometric area of the image frame to be adjusted into small blocks of a preset size according to a preset size, or can be performed by segmenting the photometric area of the image frame to be adjusted into non-uniform small blocks according to a preset segmentation rule. The above-mentioned preset segmentation rule can be specifically set according to specific needs, and this embodiment does not make specific limitations here. It should be noted that in order to ensure the sensitivity of exposure adjustment, the size of the above-mentioned small blocks after segmentation cannot be too large, and in order to reduce the amount of calculation, the size of the above-mentioned small blocks after segmentation cannot be too small. For example, the size of the small blocks after segmentation can be determined according to the size of the development in the photometric area.
[0074] Step S224, based on the region of interest of the image frame to be adjusted, determine valid small blocks among the segmented small blocks; the valid small blocks are small blocks that include the region of interest.
[0075] The above-mentioned region of interest can be a developing region, that is, a developing region with ICG marking. Because ICG marking is not like white light images where all parts will be developed, but only in special marked parts, and the marked parts will show different sizes with distance and angle. If the region of interest is not extracted, many invalid areas will be counted, interfering with the effective signal brightness statistics. Therefore, before calculating the proportion of the brightness change area in the metering area of the image frame to be adjusted, it is necessary to determine the region of interest of the image frame to be adjusted. The above-mentioned determination of the region of interest of the image frame to be adjusted can be to extract the region of interest of the image frame to be adjusted using a preset region of interest extraction method. The above-mentioned preset region of interest extraction method can be one or more methods such as threshold segmentation method and mask method.
[0076] Step S226, based on the recorded data of the previous exposure adjustment cycle, the brightness values of each valid small block, and the target brightness value in the detection parameters of the current exposure adjustment cycle, determine the brightness change area ratio and the brightness unchanged mark in the metering area of the image frame to be adjusted.
[0077] In this step, before determining the proportion of the brightness change area and the brightness constant mark in the metering area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle, the brightness value of each valid small block, and the target brightness value in the detection parameters of the current exposure adjustment cycle, it is necessary to determine the brightness value of each small block. The above determination of the brightness value of each valid small block can be to calculate the brightness mean of each pixel in the small block, or the brightness median of each pixel, or the weighted value of each pixel as the brightness value of the small block.
[0078] The above-mentioned method of determining the proportion of the brightness change area and the brightness unchanged mark in the metering area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle, the brightness value of each valid small block, and the target brightness value in the detection parameters of the current exposure adjustment cycle can be based on the recorded data of the previous exposure adjustment cycle and the brightness value of each valid small block to determine the brightness change difference of each valid small block and the brightness adjustment direction of each valid small block, and then, according to the brightness adjustment direction of each valid small block and the brightness value of each valid small block, the target brightness value in the detection parameters of the current exposure adjustment cycle, and the exposure parameters of the previous exposure adjustment cycle, determine the upper limit of the degree of change of each valid small block and the lower limit of the degree of change of each valid small block, and then, according to the brightness change difference of each valid small block, the upper limit of the degree of change of each valid small block and the lower limit of the degree of change of each valid small block, determine the proportion of the brightness change area and the brightness unchanged mark in the metering area of the image frame to be adjusted.
[0079] In the above steps S222 to S226, the metering area of the image frame to be adjusted is divided to obtain the divided small blocks, and then the valid small blocks in the divided small blocks are determined, and based on the recorded data of the previous exposure adjustment cycle, the brightness values of each valid small block, and the target brightness value in the detection parameters of the current exposure adjustment cycle, the proportion of the brightness change area and the brightness unchanged mark in the metering area of the image frame to be adjusted are determined. By determining the proportion of the brightness change area in the metering area of the image frame to be adjusted, it is determined that the range of the brightness change in the metering area of the image frame to be adjusted accounts for the range of the total development area, and then, according to the range of the brightness change in the metering area of the image frame to be adjusted, it is determined whether the current exposure adjustment cycle is to maintain exposure or adjust exposure, and according to the brightness unchanged mark in the metering area of the image frame to be adjusted, the area for exposure adjustment is determined.
[0080] In addition, in one embodiment, the above step S224, based on the region of interest of the image frame to be adjusted, determines the valid small blocks in the segmented small blocks, including:
[0081] Step S1, determining a region of interest of an image frame to be adjusted.
[0082] Step S2: Based on the segmented small blocks and the region of interest of the image frame to be adjusted, it is determined whether there is a region of interest in the segmented small blocks.
[0083] Step S3: determine the segmented small blocks containing the region of interest as valid small blocks.
[0084] In the above steps S1 to S3, effective small blocks are used to facilitate subsequent determination of the proportion of the brightness change area in the light measurement area of the image frame to be adjusted according to the brightness value of each effective small block.
[0085] In one embodiment, the above step S226 determines the brightness change area ratio and the brightness unchanged flag in the metering area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle, the brightness value of each valid small block, and the target brightness value in the detection parameter of the current exposure adjustment cycle, including:
[0086] Step S4, based on the recorded data of the previous exposure adjustment cycle and the brightness value of each valid small block, determine the brightness change difference of each valid small block and the brightness adjustment direction of each valid small block.
[0087] In this step, the brightness change difference of each valid small block is determined based on the recorded data of the previous exposure adjustment cycle and the brightness value of each valid small block. It can be based on the recorded data of the previous exposure adjustment cycle to determine the brightness value of each valid small block in the previous exposure adjustment cycle, and then, based on the brightness value of each valid small block in the previous exposure adjustment cycle and the brightness value of each valid small block (the brightness value of each valid small block in the current exposure adjustment cycle), the brightness change difference of each valid small block is determined.
[0088] The brightness adjustment direction can be characterized by the positive or negative difference between the brightness value of each valid small block in the current exposure adjustment cycle and the brightness value of the previous exposure adjustment cycle. When the difference between the brightness value of each valid small block in the current exposure adjustment cycle and the brightness value of the previous exposure adjustment cycle is positive, it means that the adjustment direction of the brightness value of the current small block in the current exposure adjustment cycle is upward adjustment, that is, the brightness value should be adjusted in the direction of increasing; when the difference between the brightness value of each valid small block in the current exposure adjustment cycle and the brightness value of the previous exposure adjustment cycle is negative, it means that the adjustment direction of the brightness value of the current small block in the current exposure adjustment cycle is downward adjustment, that is, the brightness value should be adjusted in the direction of decreasing.
[0089] Step S5, based on the brightness adjustment direction of each valid small block, the brightness value of each valid small block, the target brightness value in the detection parameters of the current exposure adjustment cycle, and the exposure parameters of the previous exposure adjustment cycle, determine the upper limit of the change degree of each valid small block and the lower limit of the change degree of each valid small block.
[0090] The upper limit of the change degree can be based on the brightness of the current pixel or small block. When the brightness gradually increases to a certain level, the human eye can just feel the change. The current pixel or small block brightness plus the increase value is the upper limit of the change degree. The lower limit of the change degree can be based on the brightness gradually decreasing to a certain level, the human eye can just feel the change. The current pixel or small block brightness minus the decrease value is the lower limit of the change degree.
[0091] The specific process of determining the upper limit of the degree of change of each valid small block and the lower limit of the degree of change of each valid small block based on the brightness adjustment direction of each valid small block, the brightness value of each valid small block, the target brightness value in the detection parameter of the current exposure adjustment cycle, and the exposure parameter of the previous exposure adjustment cycle is as follows:
[0092] [dnThr i ,upThr i ]=F1{direction i ,currentYi,tar getY,exposureparam}
[0093] Among them, dnThr i is the lower limit of the change degree of the i-th valid small block, upThr i is the upper limit of the change degree of the i-th valid small block, direction i is the brightness adjustment direction of the ith valid small block, currentYi is the brightness value of the ith valid small block in the current exposure adjustment cycle, targetY is the target brightness value in the detection parameters of the current exposure adjustment cycle, exposure param is the exposure parameter of the previous exposure adjustment cycle, and F1 is a function for calculating the upper limit of the degree of change of each valid small block and the lower limit of the degree of change of each valid small block. The specific function can be set according to specific needs. For example, F1 can be set according to Weber's law, or a multi-person statistical experiment can be performed to confirm the acceptable brightness change range as the upper limit and lower limit values, and the test results can be fitted with a function or reflected in the form of a mapping table.
[0094] Step S6, based on the brightness change difference of each valid small block, as well as the upper limit of the change degree of each valid small block and the lower limit of the change degree of each valid small block, determine the brightness change area ratio and the brightness unchanged mark in the metering area of the image frame to be adjusted.
[0095] The above-mentioned determination of the proportion of the brightness change area in the photometric area of the image frame to be adjusted based on the brightness change difference of each effective small block, the upper limit of the change degree of each effective small block and the lower limit of the change degree of each effective small block can be based on the brightness change difference of each effective small block, the upper limit of the change degree of each effective small block and the lower limit of the change degree of each effective small block, to determine the proportion of the brightness change area in the photometric area of the image frame to be adjusted based on the change degree proportion coefficient of each effective small block and the number of effective small blocks. Then, the brightness constant flag of each effective small block is assigned to obtain the brightness constant flag assignment result of each effective small block, and then, based on the brightness constant flag assignment result of each effective small block, the brightness constant flag of the photometric area of the image frame to be adjusted is determined.
[0096] In the above steps S4 to S6, based on the recorded data of the previous exposure adjustment cycle and the brightness value of each effective small block, the brightness change difference of each effective small block and the brightness adjustment direction of each effective small block are determined. Then, based on the brightness adjustment direction of each effective small block and the brightness value of each effective small block, the target brightness value in the detection parameters of the current exposure adjustment cycle, and the exposure parameters of the previous exposure adjustment cycle, the upper limit of the change degree of each effective small block and the lower limit of the change degree of each effective small block are determined. Then, based on the brightness change difference of each effective small block, the upper limit of the change degree of each effective small block and the lower limit of the change degree of each effective small block, the proportion of the brightness change area in the metering area of the image frame to be adjusted and the brightness unchanged mark are determined. By determining the proportion of the brightness change area in the metering area of the image frame to be adjusted and the brightness unchanged mark, the range of the brightness change in the metering area of the image frame to be adjusted is determined to account for the range of the total development area. Then, according to the range of the brightness change in the metering area of the image frame to be adjusted to account for the range of the total development area, it is judged whether the current exposure adjustment cycle is to maintain exposure or to adjust exposure, and the area of exposure adjustment.
[0097] In addition, in one embodiment, based on step S4, based on the recorded data of the previous exposure adjustment cycle and the brightness value of each valid small block, determining the brightness change difference of each valid small block and the brightness adjustment direction of each valid small block includes:
[0098] Step S42, based on the recorded data of the previous exposure adjustment cycle, determine the brightness value of each valid small block in the previous exposure adjustment cycle.
[0099] Step S44, based on the brightness value of each valid small block in the previous exposure adjustment cycle and the brightness value of each valid small block, determine the brightness change difference of each valid small block and the brightness adjustment direction of each valid small block.
[0100] In this step, based on the brightness values of each valid small block in the previous exposure adjustment cycle and the brightness values of each valid small block, the brightness change difference delta of the i-th valid small block is determined. i , the specific process is as follows:
[0101] delta i =abs(lastYi-currentYi)
[0102] Among them, lastYi is the brightness value of the i-th valid small block in the previous exposure adjustment cycle, and abs() represents absolute value operation.
[0103] Based on the brightness values of each valid small block in the previous exposure adjustment cycle and the brightness values of each valid small block, the brightness adjustment direction of the i-th valid small block is determined. i , the specific process is as follows:
[0104]
[0105] In the above steps S42 to S44, the brightness value of each valid small block in the previous exposure adjustment cycle is determined based on the recorded data of the previous exposure adjustment cycle, and then the brightness change difference of each valid small block and the brightness adjustment direction of each valid small block are determined based on the brightness value of each valid small block in the previous exposure adjustment cycle and the brightness value of each valid small block. The determination of the brightness change difference of each valid small block and the brightness adjustment direction of each valid small block facilitates the subsequent determination of the upper limit of the degree of change of each valid small block and the lower limit of the degree of change of each valid small block based on the brightness adjustment direction of each valid small block, the brightness value of each valid small block and the target brightness value in the detection parameters. Furthermore, based on the brightness change difference of each valid small block, the upper limit of the degree of change of each valid small block and the lower limit of the degree of change of each valid small block, the proportion of the brightness change area in the metering area of the image frame to be adjusted is determined.
[0106] Further, in one embodiment, based on step S6, based on the brightness change difference of each valid small block, and the upper limit of the change degree of each valid small block and the lower limit of the change degree of each valid small block, determining the brightness change area ratio and the brightness unchanged mark in the light metering area of the image frame to be adjusted includes:
[0107] Step S62, based on the brightness change difference of each valid small block, as well as the upper limit of the change degree of each valid small block and the lower limit of the change degree of each valid small block, determine the change degree proportional coefficient of each valid small block.
[0108] The above-mentioned change degree proportional coefficient is a coefficient used to characterize the change degree of the small block relative to the previous exposure adjustment cycle.
[0109] The process of determining the change ratio coefficient of each valid small block based on the brightness change difference of each valid small block, the change upper limit of each valid small block and the change lower limit of each valid small block is as follows:
[0110]
[0111] Among them, k i is a coefficient value between 0 and 1. When the brightness change difference of the valid small block is closer to the lower limit of the change degree, it means that the brightness change degree is smaller, k iThe closer to 0; when the brightness change difference of the effective small block is closer to the upper limit of brightness change, it means that the brightness change degree is greater, k i The closer k is to 1. i It can be calculated by linear interpolation or replaced by other functions that meet the above rules, sChangeCoef i is the proportional coefficient of the degree of change of the i-th valid small block.
[0112] Step S64, based on the change degree ratio coefficient of each effective small block and the total number of effective small blocks, determine the proportion of the brightness change area in the light metering area of the image frame to be adjusted.
[0113] The process of determining the proportion of the brightness change area in the light measurement area of the image frame to be adjusted based on the change degree ratio coefficient of each effective small block and the total number of effective small blocks is as follows:
[0114]
[0115] Wherein, totalCoef is the ratio of the brightness change area in the light metering area of the image frame to be adjusted, and vailBlockNum is the total number of valid small blocks.
[0116] Step S66, assigning a brightness constant flag to each valid small block to obtain a brightness constant flag assignment result for each valid small block.
[0117] The above-mentioned brightness constant flag assignment for each valid small block can obtain the brightness constant flag assignment result for each valid small block. It can be based on the brightness change difference of each valid small block, the upper limit of the change degree of each valid small block and the lower limit of the change degree of each valid small block to assign the brightness constant flag for each valid small block to obtain the brightness constant flag assignment result for each valid small block.
[0118] For example, based on the brightness change difference of each valid small block, the upper limit of the change degree of each valid small block and the lower limit of the change degree of each valid small block, the brightness unchanged flag of each valid small block is assigned, and the brightness unchanged flag assignment result of each valid small block is obtained, which can be:
[0119]
[0120] Among them, changFlag i The brightness of the i-th valid small block remains unchanged. i A value of 1 indicates that the brightness of the i-th valid small block has changed significantly, and a value of 0 indicates that the brightness of the i-th valid small block has not changed significantly.
[0121] Step S68, based on the brightness invariant flag assignment results of each valid small block, determine the brightness invariant flag of the light metering area of the image frame to be adjusted.
[0122] Because exposure adjustment is global, it is impossible to use different exposure parameters for different parts of the same frame. Therefore, it is necessary to determine the brightness constant mark of the metering area of the image frame to be adjusted. The brightness constant mark of the metering area of the image frame to be adjusted can be the overall brightness constant mark of the metering area of the image frame to be adjusted, and can also be called the final brightness constant mark of the image frame.
[0123] In this step, the above-mentioned determination of the brightness constant flag of the metering area of the image frame to be adjusted based on the brightness constant flag assignment result of each valid small block can be: the first step is to first detect whether there is a valid small block with a brightness constant flag of 0. If not, it is considered that the whole has changed, and there is no need to perform the second step, and directly enter the exposure adjustment mode. In the second step, if there is a valid small block with a brightness constant flag equal to 0, the proportion of the degree of change is judged. At this time, the larger the proportion, the greater the change, and the more inclined to exposure adjustment, and the smaller the proportion, the smaller the change, and the more inclined to exposure maintenance. It should be noted that the definition of the proportion size can be specifically set according to specific needs, and this embodiment does not make specific limitations here. For example, the threshold value of exposure adjustment and exposure maintenance can be set to 50%, that is, when the proportion of the degree of change is greater than 50%, exposure adjustment is performed, otherwise, exposure maintenance is performed.
[0124] In the above steps S62 to S68, the proportion of the brightness change area and the brightness unchanged flag in the metering area of the image frame to be adjusted are determined based on the brightness change difference of each valid small block, the upper limit of the change degree of each valid small block, and the lower limit of the change degree of each valid small block. The determination of the proportion of the brightness change area and the brightness unchanged flag in the metering area of the image frame to be adjusted facilitates subsequent exposure detection of the image frame to be adjusted based on the proportion of the brightness change area and the brightness unchanged flag in the metering area of the image frame to be adjusted to obtain an exposure detection result.
[0125] In one embodiment, the above step S230, based on the proportion of the brightness change area in the light metering area of the image frame to be adjusted, performs exposure detection on the image frame to be adjusted to obtain the exposure detection result, including:
[0126] Step S232, based on the proportion of the brightness change area in the metering area of the image frame to be adjusted, the brightness value of the metering area of the image frame to be adjusted, the target brightness value in the detection parameters of the current exposure adjustment cycle, and the final brightness unchanged flag of the image frame to be adjusted, exposure detection is performed on the image frame to be adjusted to obtain the exposure detection result, as well as the upper and lower limits of the exposure adjustment.
[0127] The above process of performing exposure detection on the image frame to be adjusted based on the proportion of the brightness change area in the metering area of the image frame to be adjusted, the brightness value of the metering area of the image frame to be adjusted, the target brightness value in the detection parameters of the current exposure adjustment cycle, and the final brightness unchanged mark of the image frame to be adjusted, obtaining the exposure detection result, and the upper and lower limits of the exposure adjustment is as follows:
[0128] [isCjange,dnChange,upChange]=F2{changFlag,totalCoef,currentY,targetY}
[0129] The above isChange is the exposure detection result, dnChange is the lower limit of exposure adjustment, upChasnge is the upper limit of exposure adjustment, and changFlag is the final brightness unchanged flag of the image frame to be adjusted.
[0130] In one embodiment, based on step S240, when the exposure detection result shows that the image frame to be adjusted needs to be exposed, the image frame to be adjusted is exposed, including:
[0131] Step S242: determining the brightness value of the light metering area of the image frame to be adjusted based on the preset setting rule of the light metering weight matrix.
[0132] In this step, the above-mentioned photometric weight matrix can be a matrix of weights of the brightness values of each pixel in the brightness calculation process of the image frame set according to a preset rule. Specifically, it can be a fixed weight table, or it can be a weight matrix adaptively generated according to parameters such as a specific scene, photometric mode, etc. The above-mentioned adaptively generated weight matrix can be a weight matrix adaptively generated according to the desired effect, or it can be a weight matrix adaptively generated according to the position or brightness of the pixel.
[0133] The weight matrix is adaptively generated according to the position of the pixel, and the weight matrix of the brightness value of each pixel is set according to the position of each pixel of the image frame, according to the principle that the center of the light-metering area of the image frame to be adjusted has a high weight and the surrounding has a low weight. The weight matrix is adaptively generated according to the brightness of the pixel, and the light-metering area of the image frame to be adjusted is divided into blocks to obtain each small block, determine the brightness value of each small block, sort the brightness values of each small block, obtain the small block corresponding to the median of the brightness value, set the highest weight for the brightness of each pixel of the small block corresponding to the median, and set the matrix of the brightness value weight corresponding to the brightness value of the pixel at each position of the light-metering area of the image frame to be adjusted according to the principle that the larger the difference with the median, the lower the weight. The brightness value of each small block can be the average of the brightness values of each pixel of each small block, or the median of the brightness value of each pixel, or the coefficient weighted result of the brightness value of each pixel.
[0134] Among them, the above-mentioned adaptive generation of the weight matrix according to the desired effect can be specifically set according to specific needs, and this embodiment is not specifically limited here. For example, in order to develop the weak fluorescence of the image frame to be adjusted, when adaptively generating the photometry weight matrix, a larger weight value can be given to the darker area in the region of interest of the image frame to be adjusted. In general, in order to ensure that the brightness area with a large proportion of the image frame to be adjusted remains stable, different weights can be set for different brightnesses of the image frame according to the picture brightness of the image frame to be adjusted. The above-mentioned setting of different weights for different brightnesses of the image frame according to the picture brightness of the image frame to be adjusted can be a statistical picture brightness distribution interval, and the median of the picture brightness is set with the highest weight. According to the principle that the greater the difference with the median brightness, the smaller the set weight, different weights are set for other positions in the picture, and the weight of the invalid area is set to 0. The above-mentioned invalid area can be a non-interested area.
[0135] The above-mentioned determination of the brightness value of the metering area of the image frame to be adjusted based on the setting rules of the preset metering weight matrix can be performed by utilizing the setting rules of the preset metering weight matrix to determine the weights of the brightness values of each pixel in the metering area of the image frame to be adjusted, and then weighted summing is performed on the brightness values of each pixel in the metering area of the image frame to be adjusted to obtain the brightness value of the metering area of the image frame to be adjusted.
[0136] This step facilitates further determining the difference between the brightness value of the light-metering area of the image frame to be adjusted and the target brightness value in the detection parameter by determining the brightness value of the light-metering area of the image frame to be adjusted.
[0137] Step S244, determines the adjustment amount of the exposure parameters of the current exposure adjustment cycle based on the difference between the brightness value of the metering area of the image frame to be adjusted and the target brightness value in the detection parameter, the proportion of the brightness change area in the metering area of the image frame to be adjusted, and the upper and lower limits of the exposure adjustment.
[0138] Among them, the adjustment amount of the exposure parameter of the current exposure adjustment cycle may be the estimated adjustment amount of the exposure parameter of the current exposure adjustment cycle. The adjustment amount of the exposure parameter of the current exposure adjustment cycle is determined based on the difference between the brightness value of the metering area of the image frame to be adjusted and the target brightness value in the detection parameter, the proportion of the brightness change area in the metering area of the image frame to be adjusted, and the upper and lower limits of the exposure adjustment. The estimated adjustment amount of the exposure parameter of the current exposure adjustment cycle may be determined based on the difference between the brightness value of the metering area of the image frame to be adjusted and the target brightness value in the detection parameter, and the proportion of the brightness change area in the metering area of the image frame to be adjusted. If the estimated adjustment amount of the exposure parameter of the current exposure adjustment cycle is within the range of the upper and lower limits of the exposure adjustment, the exposure parameter of the current exposure adjustment cycle remains unchanged; if the estimated adjustment amount of the exposure parameter of the current exposure adjustment cycle exceeds the upper and lower limits of the exposure adjustment, the exposure parameter is adjusted according to the estimated adjustment amount.
[0139] Step S246: performing exposure adjustment on the image frame to be adjusted based on the adjustment amount of the exposure parameter in the current exposure adjustment cycle.
[0140] The exposure adjustment of the image frame to be adjusted may be one or more of shutter priority, light source priority or other agreed methods. The specific exposure adjustment method is not specifically limited in this embodiment.
[0141] In the above steps S242 to S246, the adjustment amount of the exposure parameter of the current exposure adjustment cycle is determined based on the difference between the brightness value of the photometric area of the image frame to be adjusted and the target brightness value in the detection parameter, the proportion of the brightness change area in the photometric area of the image frame to be adjusted, and the upper and lower limits of the exposure adjustment, and then, based on the adjustment amount of the exposure parameter of the current exposure adjustment cycle, the exposure adjustment is performed on the image frame to be adjusted. When the disturbance in the image frame to be adjusted is a large disturbance range, the development area is adjusted.
[0142] The present embodiment is described and illustrated below through preferred embodiments.
[0143] Figure 3 1 is a flow chart of an exposure adjustment method provided by a preferred embodiment of the present application. Figure 3 As shown, the exposure adjustment method includes the following steps:
[0144] Step S301, obtaining an image frame to be adjusted;
[0145] Step S302, initializing the exposure parameters of the current exposure adjustment cycle based on the photometric area and the target brightness value of the detection parameters of the current exposure adjustment cycle;
[0146] Step S303, dividing the light measurement area of the image frame to be adjusted to obtain divided small blocks;
[0147] Step S304, based on the region of interest of the image frame to be adjusted, determining valid small blocks among the segmented small blocks; the valid small blocks are small blocks containing the region of interest;
[0148] Step S305, based on the recorded data of the previous exposure adjustment cycle, the brightness values of each valid small block, and the target brightness value in the detection parameters of the current exposure adjustment cycle, determine the brightness change area ratio and the brightness unchanged mark in the metering area of the image frame to be adjusted;
[0149] Step S306, based on the proportion of the brightness change area and the brightness unchanged mark in the light metering area of the image frame to be adjusted, the brightness value of the light metering area of the image frame to be adjusted, and the target brightness value in the detection parameters of the current exposure adjustment cycle, perform exposure detection on the image frame to be adjusted to obtain the exposure detection result, as well as the upper limit and lower limit of the exposure adjustment;
[0150] Step S307, when the exposure detection result shows that the image frame to be adjusted needs to be exposed, the image frame to be adjusted is exposed;
[0151] Step S308: When the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is not required, the exposure of the image frame to be adjusted is maintained.
[0152] In the above steps S301 to S308, by referring to the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle, the change ratio of the image frame to be adjusted and the brightness unchanged mark are determined. By using the change ratio of the image frame to be adjusted and the brightness unchanged mark, when the disturbance in the image frame to be adjusted is detected to be in a small disturbance range, the exposure remains unchanged, and when the disturbance in the image frame to be adjusted is detected to be in a large disturbance range, the exposure is adjusted. When the illumination angle changes, the instrument is blocked, and the distance changes, the exposure is maintained, and the area of the fluorescence imaging does not change. The problem of inaccurate recognition results of the lesion boundary when the fluorescence imaging area is unstable in the existing exposure adjustment method is solved.
[0153] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0154] Based on the same inventive concept, an exposure adjustment device is also provided in this embodiment, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation in hardware, or a combination of software and hardware, is also possible and conceivable.
[0155] In one embodiment, Figure 4 is a structural block diagram of an exposure adjustment device provided in an embodiment of the present application, such as Figure 4 As shown, the exposure adjustment device comprises:
[0156] An image acquisition module 42, used to acquire an image frame to be detected;
[0157] The proportion calculation module 44 is used to determine the proportion of the brightness change area and the brightness unchanged mark in the metering area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle; the recorded data of the previous exposure adjustment cycle at least includes the brightness information and exposure parameters of the previous exposure adjustment cycle; the detection parameters at least include the metering area and the target brightness value;
[0158] An exposure detection module 46 is used to perform exposure detection on the image frame to be adjusted based on the proportion of the brightness change area and the brightness unchanged mark in the light metering area of the image frame to be adjusted to obtain an exposure detection result;
[0159] And an adjustment module 48 is used to adjust the exposure of the image frame to be adjusted when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is required; or to maintain the exposure of the image frame to be adjusted when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is not required.
[0160] The above-mentioned exposure adjustment device determines the change ratio and brightness unchanged mark of the image frame to be adjusted by referring to the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle. When the disturbance in the image frame to be adjusted is detected to be in a small disturbance range, the exposure remains unchanged, and the exposure adjustment is performed only when the disturbance in the image frame to be adjusted is detected to be in a large disturbance range. When the illumination angle changes, the instrument is blocked, and the distance changes, the exposure is maintained, and the area of fluorescence imaging does not change. The existing exposure adjustment method solves the problem that when the fluorescence imaging area is unstable, there will be inaccurate recognition results of the lesion boundary.
[0161] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0162] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, any one of the exposure adjustment methods in the above embodiments is implemented.
[0163] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0164] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0165] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An exposure adjustment method, characterized in that: The method comprises: Acquire the image frame to be adjusted; Based on the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle, determining the proportion of the brightness change area and the brightness unchanged mark in the metering area of the image frame to be adjusted; the recorded data of the previous exposure adjustment cycle at least includes the brightness information and exposure parameters of the previous exposure adjustment cycle; the detection parameters at least include the metering area and the target brightness value; Based on the proportion of the brightness change area in the light metering area of the image frame to be adjusted and the brightness unchanged mark, performing exposure detection on the image frame to be adjusted to obtain an exposure detection result; When the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is required, the exposure adjustment of the image frame to be adjusted is performed; or when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is not required, the exposure of the image frame to be adjusted is maintained.
2. The exposure adjustment method according to claim 1, characterized in that: Also includes: Based on the light metering area and the target brightness value of the detection parameter of the current exposure adjustment cycle, the exposure parameter of the current exposure adjustment cycle is initialized.
3. The exposure adjustment method according to claim 1, characterized in that: The step of determining the brightness change area ratio and the brightness unchanged flag in the light metering area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle includes: Segmenting the light metering area of the image frame to be adjusted to obtain segmented small blocks; Based on the region of interest of the image frame to be adjusted, determining valid small blocks among the segmented small blocks; the valid small blocks are small blocks containing the region of interest; Based on the recorded data of the previous exposure adjustment cycle, the brightness values of each of the valid small blocks, and the target brightness value in the detection parameters of the current exposure adjustment cycle, the proportion of the brightness change area in the metering area of the image frame to be adjusted and the brightness unchanged mark are determined.
4. The exposure adjustment method according to claim 3, characterized in that: The step of determining the brightness change area ratio and the brightness unchanged flag in the photometric area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle, the brightness values of the effective small blocks, and the target brightness value in the detection parameters of the current exposure adjustment cycle includes: Based on the recorded data of the previous exposure adjustment cycle and the brightness value of each of the valid small blocks, determine the brightness change difference of each of the valid small blocks and the brightness adjustment direction of each of the valid small blocks; the brightness change difference of the valid small blocks is the brightness change difference of the valid small blocks between the current exposure adjustment cycle and the previous exposure adjustment cycle; Based on the brightness adjustment direction of each of the valid small blocks, the brightness value of each of the valid small blocks, the target brightness value in the detection parameter of the current exposure adjustment cycle, and the exposure parameter of the previous exposure adjustment cycle, determine the upper limit of the change degree of each of the valid small blocks and the lower limit of the change degree of each of the valid small blocks; Based on the brightness change difference of each valid small block, the upper limit of the change degree of each valid small block and the lower limit of the change degree of each valid small block, the brightness change area ratio and the brightness unchanged mark in the metering area of the image frame to be adjusted are determined.
5. The exposure adjustment method according to claim 4, characterized in that: The step of determining the brightness change difference of each valid small block and the brightness adjustment direction of each valid small block based on the recorded data of the previous exposure adjustment cycle and the brightness value of each valid small block includes: Based on the recorded data of the previous exposure adjustment cycle, determining the brightness value of each of the valid small blocks in the previous exposure adjustment cycle; Based on the brightness value of each of the valid small blocks in the previous exposure adjustment cycle and the brightness value of each of the valid small blocks, the brightness change difference of each of the valid small blocks and the brightness adjustment direction of each of the valid small blocks are determined.
6. The exposure adjustment method according to claim 4, characterized in that: The determining, based on the brightness change difference of each of the valid small blocks, the upper limit of the change degree of each of the valid small blocks, and the lower limit of the change degree of each of the valid small blocks, the brightness change area ratio and the brightness unchanged flag in the light metering area of the image frame to be adjusted includes: Determine a change ratio coefficient of each valid small block based on a brightness change difference of each valid small block, an upper limit of a change degree of each valid small block, and a lower limit of a change degree of each valid small block; Based on the change degree ratio coefficient of each of the valid small blocks and the total number of the valid small blocks, determining the proportion of the brightness change area in the light metering area of the image frame to be adjusted; Assigning a brightness constant flag to each of the valid small blocks to obtain a brightness constant flag assignment result for each of the valid small blocks; Based on the brightness invariant flag assignment results of the effective small blocks, the brightness invariant flag of the light metering area of the image frame to be adjusted is determined.
7. The exposure adjustment method according to claim 1, characterized in that: The step of performing exposure detection on the image frame to be adjusted based on the proportion of the brightness change area in the light metering area of the image frame to be adjusted and the brightness unchanged flag to obtain the exposure detection result includes: Based on the proportion of the brightness change area in the metering area of the image frame to be adjusted and the brightness unchanged flag, the brightness value of the metering area of the image frame to be adjusted, and the target brightness value in the detection parameters of the current exposure adjustment cycle, exposure detection is performed on the image frame to be adjusted to obtain the exposure detection result, as well as the upper and lower limits of the exposure adjustment.
8. The exposure adjustment method according to claim 7, characterized in that: When the exposure detection result shows that the image frame to be adjusted needs to be exposed, the image frame to be adjusted is exposed, comprising: Based on a preset setting rule of a photometric weight matrix, determining the brightness value of the photometric area of the image frame to be adjusted; the photometric weight matrix is a matrix representing the weight of the brightness value of each pixel in the brightness calculation process of the image frame; Determine the adjustment amount of the exposure parameter of the current exposure adjustment cycle based on the difference between the brightness value of the photometric area of the image frame to be adjusted and the target brightness value in the detection parameter, the proportion of the brightness change area in the photometric area of the image frame to be adjusted, and the upper and lower limits of the exposure adjustment; Based on the adjustment amount of the exposure parameter in the current exposure adjustment cycle, exposure adjustment is performed on the image frame to be adjusted.
9. An exposure adjustment device, characterized in that: The device comprises: An image acquisition module, used for acquiring an image frame to be detected; A proportion calculation module, used to determine the proportion of the brightness change area and the brightness unchanged mark in the photometric area of the image frame to be adjusted based on the recorded data of the previous exposure adjustment cycle and the detection parameters of the current exposure adjustment cycle; the recorded data of the previous exposure adjustment cycle at least includes the brightness information and exposure parameters of the previous exposure adjustment cycle; the detection parameters at least include the photometric area and the target brightness value; an exposure detection module, configured to perform exposure detection on the image frame to be adjusted based on the proportion of the brightness change area in the light metering area of the image frame to be adjusted and the brightness constant flag, and obtain an exposure detection result; and an adjustment module, which is used to adjust the exposure of the image frame to be adjusted when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is required; or to maintain the exposure of the image frame to be adjusted when the exposure detection result shows that the exposure adjustment of the image frame to be adjusted is not required.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the exposure adjustment method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Exposure parameter determination method and device and electronic device
CN112312033A
Wide dynamic exposure control method and camera equipment
CN112954228A
Exposure method and device based on feature point detection, electronic equipment and storage medium
CN118828215A
Endoscope device, and operation method and program of endoscope device
JP2019122492A
Faster automatic exposure control system
US20200036882A1