Method, device and equipment for adjusting exposure time and readable medium
By combining peak exposure and mean exposure algorithms, histogram statistics and exposure weight calculations are used to coordinate the exposure time adjustment, which solves the problem of inaccurate exposure time adjustment in the prior art, and achieves a more accurate exposure effect in different scenarios.
Patent Information
- Application Number
- CN202411933580.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-11
AI Technical Summary
In dynamic shooting environments, existing automatic exposure algorithms (mean exposure and peak exposure) are difficult to accurately adjust the exposure time in different scenarios, resulting in an imbalance in the light and darkness of the photos.
By combining the peak exposure algorithm and the mean exposure algorithm, the exposure weight calculation is performed using histogram statistics results, and the exposure time is coordinated to make it more accurate in different scenarios.
The exposure time adjustment in different scenarios is achieved more accurate, avoiding the wrong adjustment of traditional algorithms in overexposure or underexposure areas.
Smart Images

Figure CN119815184A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image exposure technology, and in particular to an exposure time adjustment method, device, equipment and readable medium. Background Art
[0002] Exposure is a very important part of photography, which directly affects the brightness and overall quality of the photo. Exposure refers to the process of light entering the camera through the lens and irradiating the photosensitive element. The length and intensity of this process determines the brightness and details of the photo. In a dynamic shooting environment, the brightness of the object will change with the change of light, which requires the photographer or the camera's automatic exposure system to be able to adjust the exposure parameters in time to adapt to different light conditions.
[0003] The automatic exposure (AE) algorithm converges in a loop that continuously updates the exposure time. The logic of the two more commonly used automatic exposure algorithms is average exposure and peak exposure. When there are large areas of pure white, high reflectivity, and high brightness in the image, the average exposure algorithm often obtains a lower, incorrect exposure time, and therefore cannot obtain the correct calculation result; when the peak exposure algorithm has uniform exposure in the image as a whole, it may cause an imbalance in the overall exposure of the picture, and then incorrectly increase the exposure time.
[0004] Under the application conditions of medical endoscopes, the above two scenarios will occur frequently, and the use of a single algorithm cannot fully adapt to the surgical scenario. Summary of the invention
[0005] In view of this, an embodiment of the present invention aims to propose a method, device, equipment and readable medium for adjusting exposure time, which can collaboratively adjust the exposure time through a peak exposure algorithm and a mean exposure algorithm in different scenarios, so that the exposure time can be adjusted more accurately.
[0006] Based on the above purpose, one aspect of an embodiment of the present invention provides a method for adjusting exposure time, comprising the following steps: setting an exposure time, exposing a current image based on the exposure time, and performing histogram statistics on the exposed image to obtain statistical results; performing peak exposure calculation and mean exposure calculation based on the statistical results to obtain a first adjustment time and a second adjustment time; performing exposure weight calculation based on the statistical results to obtain an adjustment weight, and performing weighted calculation on the first adjustment time and the second adjustment time based on the adjustment weight to obtain a pre-adjusted exposure time; and updating the exposure time based on the pre-adjusted exposure time, and exposing the next frame of image.
[0007] In some embodiments, peak exposure calculation and mean exposure calculation are performed based on the statistical results to obtain a first adjustment time and a second adjustment time, including: judging whether the proportion of the overexposed area of the current image exceeds a preset proportion based on the statistical results; in response to the proportion of the overexposed area of the current image exceeding the preset proportion, reducing the exposure time to obtain a negative first adjustment time; in response to the proportion of the overexposed area of the current image not exceeding the preset proportion, increasing the exposure time to obtain a non-negative first adjustment time.
[0008] In some embodiments, performing peak exposure calculation and mean exposure calculation based on the statistical results to obtain a first adjustment time and a second adjustment time includes: judging whether the average brightness of the current image is higher than a preset brightness based on the statistical results; in response to the average brightness of the current image being higher than the preset brightness, reducing the exposure time to obtain a negative second adjustment time; in response to the average brightness of the current image being not higher than the preset brightness, increasing the exposure time to obtain a non-negative second adjustment time.
[0009] In some embodiments, performing exposure weight calculation based on the statistical results to obtain the adjustment weight includes: calculating a first exposure weight based on the proportion of highlight areas of the current image in the statistical results, the first exposure weight being positively correlated with the proportion of highlight areas; calculating a second exposure weight based on the uniformity of the current image in the statistical results, the second exposure weight being positively correlated with the uniformity; performing weighted calculation of the first adjustment time and the second adjustment time based on the adjustment weight to obtain the pre-adjusted exposure time includes: performing weighted calculation of the first adjustment time based on the first exposure weight and of the second adjustment time based on the second exposure weight to obtain the pre-adjusted exposure time.
[0010] In some embodiments, updating the exposure time based on the pre-adjusted exposure time and exposing the next frame of image includes: determining whether the pre-adjusted exposure time exceeds the adjustment tolerance range; if exceeded, adjusting the time to the exposure adjustment time, and exposing the next frame of image based on the adjusted exposure time; if not exceeded, exposing the next frame of image based on the exposure time.
[0011] In some implementations, determining whether the pre-adjusted exposure time exceeds an adjustment tolerance range includes: subtracting the pre-adjusted exposure time from the exposure time to obtain an adjustment difference, and determining whether the adjustment difference exceeds an adjustment tolerance range.
[0012] In some embodiments, updating the exposure time based on the pre-adjusted exposure time and exposing the next frame image includes: calculating an adjustment trend based on the historical exposure time, and determining whether the pre-adjusted exposure time is consistent with the adjustment trend; if consistent, adjusting the time to the exposure adjustment time, and exposing the next frame image based on the adjusted exposure time; if inconsistent, exposing the next frame image based on the exposure time.
[0013] On the other hand, an embodiment of the present invention further provides an exposure time adjustment device, including: an exposure module, configured to set the exposure time, expose the current image based on the exposure time, and perform histogram statistics on the exposed image to obtain statistical results; a calculation module, configured to perform peak exposure calculation and mean exposure calculation based on the statistical results, respectively, to obtain a first adjustment time and a second adjustment time; a weighting module, configured to perform exposure weight calculation based on the statistical results to obtain an adjustment weight, and perform weighted calculation on the first adjustment time and the second adjustment time based on the adjustment weight to obtain a pre-adjusted exposure time; and an adjustment module, configured to update the exposure time based on the pre-adjusted exposure time, and expose the next frame of image.
[0014] According to another aspect of the embodiments of the present invention, there is provided a computer device, comprising: at least one processor; and a memory, wherein the memory stores computer instructions executable on the processor, and the instructions implement the steps of the above method when executed by the processor.
[0015] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program that implements the above method steps when executed by a processor.
[0016] The present invention has at least the following beneficial technical effects: in different scenarios, the exposure time is collaboratively adjusted through the peak exposure algorithm and the average exposure algorithm, so that the adjustment of the exposure time is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A schematic diagram of an embodiment of a method for adjusting exposure time provided by the present invention; Figure 2A flow chart of an embodiment of a method for adjusting exposure time provided by the present invention; Figure 3 A schematic diagram of an embodiment of an exposure time adjustment device provided by the present invention; Figure 4 A schematic diagram of an embodiment of a computer device provided by the present invention; Figure 5 A schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0019] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0020] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.
[0021] Based on the above purpose, a first aspect of the embodiments of the present invention provides an embodiment of a method for adjusting exposure time. Figure 1 FIG. 2 is a schematic diagram of an embodiment of a method for adjusting exposure time provided by the present invention. Figure 1 As shown, the exposure time adjustment method of the embodiment of the present invention includes the following steps: 001. Set the exposure time, expose the current image based on the exposure time, and perform histogram statistics on the exposed image to obtain statistical results; 002. Perform peak exposure calculation and average exposure calculation based on the statistical results to obtain a first adjustment time and a second adjustment time; 003. Calculate the exposure weight based on the statistical result to obtain the adjustment weight, and perform weighted calculation on the first adjustment time and the second adjustment time based on the adjustment weight to obtain the pre-adjustment exposure time; and 004. Update the exposure time based on the pre-adjusted exposure time, and expose the next frame of image.
[0022] In this embodiment, the exposure time adjustment algorithm converges in a cycle of continuously updating the exposure time. First, the exposure time of the Nth frame is set, and the image sensor is exposed according to the exposure time to obtain the image of the Nth frame. According to the histogram statistics of the Nth frame image, the exposure time of the N+1th frame is calculated by the peak exposure algorithm, the mean exposure algorithm and the weight algorithm. The exposure time of the image sensor is re-set, and the image of the N+1th frame obtained using the newly calculated exposure time will be obtained. And so on.
[0023] In this embodiment, the peak exposure algorithm, the average exposure algorithm and the weight algorithm are independent operation modules. This solves the coupling problem of the traditional exposure algorithm that needs to take into account both the peak and average exposure algorithms. The logic within the algorithm module is clear, and the submodules can be updated according to the optimization, adjustment and iteration of the algorithm without considering the impact on other modules. The algorithm debugging process is convenient and fast.
[0024] In some embodiments of the present invention, peak exposure calculation and mean exposure calculation are performed based on statistical results to obtain a first adjustment time and a second adjustment time, including: judging whether the proportion of overexposed areas of the current image exceeds a preset proportion based on statistical results; in response to the proportion of overexposed areas of the current image exceeding the preset proportion, reducing the exposure time to obtain a negative first adjustment time; in response to the proportion of overexposed areas of the current image not exceeding the preset proportion, increasing the exposure time to obtain a non-negative first adjustment time.
[0025] In this embodiment, the peak exposure calculation is performed based on the statistical results to obtain the first adjustment time. The peak exposure algorithm uses the highest possible exposure time to ensure that the overexposed area in the image meets the constraints of the algorithm. For example, if the overexposed area is set to 10% of the entire image, when the result of the histogram calculation shows that only 9% of the area is overexposed, the exposure time will be increased, otherwise the exposure time will be reduced.
[0026] In some embodiments of the present invention, peak exposure calculation and mean exposure calculation are performed based on statistical results to obtain a first adjustment time and a second adjustment time, including: judging whether the average brightness of the current image is higher than a preset brightness based on the statistical results; in response to the average brightness of the current image being higher than the preset brightness, reducing the exposure time to obtain a negative second adjustment time; in response to the average brightness of the current image being not higher than the preset brightness, increasing the exposure time to obtain a non-negative second adjustment time.
[0027] In this embodiment, the mean exposure calculation is performed based on the statistical results to obtain the second adjustment time. The mean exposure algorithm first sets a standard image brightness, calculates the average brightness of the image through a histogram, and compares it with the marked image brightness value. If the statistical value is higher than the target value, the image is considered to be overexposed, and the algorithm reduces the exposure time; if the statistical value is lower than the target value, the image is considered to be underexposed, and the algorithm increases the exposure time.
[0028] In some embodiments of the present invention, performing exposure weight calculation based on statistical results to obtain adjustment weights includes: calculating a first exposure weight based on the proportion of highlight areas of the current image in the statistical results, the first exposure weight being positively correlated with the proportion of highlight areas; calculating a second exposure weight based on the uniformity of the current image in the statistical results, the second exposure weight being positively correlated with the uniformity; performing weighted calculation of the first adjustment time and the second adjustment time based on the adjustment weight to obtain a pre-adjusted exposure time, including: performing weighted calculation of the first adjustment time based on the first exposure weight and of the second adjustment time based on the second exposure weight to obtain the pre-adjusted exposure time.
[0029] In this embodiment, the coupling of the peak exposure algorithm and the average exposure algorithm is independently formed into a weighted algorithm module, and the module only needs to consider the algorithm implementation method and the respective weights of the peak exposure algorithm and the average exposure algorithm, which is simple to implement.
[0030] In this embodiment, under the application conditions of a medical endoscope, when normally photographing internal tissues, the image will only have a few high-light reflection points. In this case, the scene is overall uniform, and the mean exposure algorithm is optimal, so the second exposure weight will be increased; when there are instruments in the surgical scene, a large number of high-reflection and high-brightness areas will be formed on the metal surface of the instruments. At this time, it is more reasonable to use the peak exposure algorithm, so the first exposure weight will be increased.
[0031] In some embodiments of the present invention, updating the exposure time based on the pre-adjusted exposure time and exposing the next frame of image includes: determining whether the pre-adjusted exposure time exceeds the adjustment tolerance range; if exceeded, adjusting the time to the exposure adjustment time, and exposing the next frame of image based on the adjusted exposure time; if not exceeded, exposing the next frame of image based on the exposure time.
[0032] In this embodiment, a step of adjusting the tolerance is provided to provide a logic for reducing jitter for the algorithm. When a slight change in the image scene causes the algorithm to need adjustment, a subtraction judgment can be made with the adjustment tolerance algorithm. Peak value adjustment is only made when the adjustment amount is greater than the adjustment tolerance, avoiding frequent adjustments caused by slight brightness changes in the image in a short period of time, causing the entire image to flicker bright and dark, causing visual discomfort.
[0033] In some embodiments of the present invention, determining whether the pre-adjusted exposure time exceeds the adjustment tolerance range includes: subtracting the pre-adjusted exposure time from the exposure time to obtain an adjustment difference, and determining whether the adjustment difference exceeds the adjustment tolerance range.
[0034] In some embodiments of the present invention, updating the exposure time based on the pre-adjusted exposure time and exposing the next frame of image includes: calculating the adjustment trend based on the historical exposure time, and determining whether the pre-adjusted exposure time is consistent with the adjustment trend; if consistent, adjusting the time to the exposure adjustment time, and exposing the next frame of image based on the adjusted exposure time; if inconsistent, exposing the next frame of image based on the exposure time.
[0035] In this embodiment, a step of adjusting the tolerance is set to provide a logic for reducing jitter for the algorithm. The trend adjustment predicts the trend based on the adjustment values of multiple frames of the algorithm, and starts the adjustment only when the trends of multiple frames remain consistent, avoiding frequent adjustments caused by small brightness changes in the image in a short period of time, causing the entire image to flicker and cause visual discomfort.
[0036] The specific implementation manner of the present invention is further described below based on specific examples. Figure 2 FIG. 2 is a flow chart of an embodiment of the method for adjusting the exposure time provided by the present invention. Figure 2 As shown, at the beginning of the algorithm, the first frame is still exposed with the initial exposure time. After passing through the histogram statistics module, the statistical results of the histogram are input into the three modules of "peak exposure algorithm", "mean exposure algorithm" and "weight algorithm" respectively. Among them, the "peak exposure algorithm" uses the standard peak exposure algorithm and outputs the calculation result △SHSpp; the "mean exposure algorithm" also outputs the calculation result △SHSmean, and the "weight algorithm" is responsible for calculating the weight ratios of peak exposure and mean exposure △SHSpp_Weight and △SHSmean_Weight. The three modules calculate independently and output the results to the "AE weighted algorithm" module. Finally, the outputs of the above three modules are calculated to obtain the final AE algorithm adjustment value △SHS. In order to avoid AE adjustments caused by slight changes in light, △SHS will be compared with the adjustment tolerance △SHS_Tolerance. The exposure time of the sensor will be adjusted only when it is greater than the tolerance range.
[0037] In order to further constrain the calculation results of the AE algorithm and make it converge at any time, the algorithm constrains and limits the following parameters.
[0038] HEffect_Set and VEffect_Set identify the valid range of the input image. The valid range of the image is based on the center of the image as the zero point, and the range of ±HEffect_Set / 2 and ±VEffect_Set / 2 is valid data. The image within this range is histogram counted. The value range of HEffect_Set and VEffect_Set should be less than or equal to the maximum row and column resolution of the image, and the minimum value is 480, which is the valid number of rows of D1 resolution under N system.
[0039] LumMax_Set is the maximum brightness value of the pixel. Generally, 10-bit AD is 1023, and 12-bit AD is 4095.
[0040] HisOverExp_Set is the boundary value of the overexposed area in the histogram. Generally, points in the histogram that are greater than or equal to this value are considered overexposed points. The value range is an integer between -5 and 5 (inclusive). The larger the value, the more overexposed areas are allowed.
[0041] AESpeed_Set sets the adjustment speed of the AE algorithm, and the value range is an integer between -5 and 5 (inclusive). The larger the value, the larger the single step size of AE adjustment and the faster the algorithm speed.
[0042] Lum_Set is a brightness setting used to adjust the brightness preference of the output image. The value range is an integer between -5 and 5 (inclusive). The larger the value, the brighter the output image.
[0043] AEPreference_Set sets the AE algorithm preference. The value range is an integer between -5 and 5 (inclusive). The larger the value, the higher the weight of peak exposure.
[0044] AESensitivity_Set is the sensitivity setting of AE. The value range is an integer between -5 and 5 (inclusive). The larger the value, the lower the single step size allowed by AE to be adjusted, and the higher the sensitivity of AE.
[0045] It should be pointed out in particular that the various steps in the various embodiments of the above-mentioned exposure time adjustment method can be cross-linked, replaced, added, and deleted. Therefore, these reasonable arrangements and combinations of the exposure time adjustment method should also belong to the protection scope of the present invention, and the protection scope of the present invention should not be limited to the embodiments.
[0046] Based on the above purpose, a second aspect of an embodiment of the present invention provides a device for adjusting exposure time. Figure 3 FIG. 2 is a schematic diagram of an embodiment of an exposure time adjustment device provided by the present invention. Figure 3As shown, the exposure time adjustment device of the embodiment of the present invention includes the following modules: an exposure module 011, configured to set the exposure time, expose the current image based on the exposure time, and perform histogram statistics on the exposed image to obtain statistical results; a calculation module 012, configured to perform peak exposure calculation and mean exposure calculation based on the statistical results, respectively, to obtain a first adjustment time and a second adjustment time; a weighting module 013, configured to perform exposure weight calculation based on the statistical results to obtain an adjustment weight, and perform weighted calculation on the first adjustment time and the second adjustment time based on the adjustment weight to obtain a pre-adjusted exposure time; and an adjustment module 014, configured to update the exposure time based on the pre-adjusted exposure time, and expose the next frame of the image.
[0047] Based on the above purpose, a third aspect of an embodiment of the present invention provides a computer device. Figure 4 FIG. 2 is a schematic diagram of an embodiment of a computer device provided by the present invention. Figure 4 As shown, the computer device of the embodiment of the present invention includes the following devices: at least one processor 021; and a memory 022, the memory 022 stores computer instructions 023 that can be executed on the processor, and the instructions implement the steps of the above method when executed by the processor.
[0048] The present invention also provides a computer-readable storage medium. Figure 5 FIG. 2 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 5 As shown, the computer-readable storage medium 031 stores a computer program 032 that performs the above method when executed by a processor.
[0049] Finally, it should be noted that a person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the program of the exposure time adjustment method can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program can be a disk, an optical disk, a read-only storage memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiment can achieve the same or similar effect as any corresponding above-mentioned method embodiment.
[0050] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a processor, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiment of the present invention are performed.
[0051] In addition, the above method steps and system units may also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.
[0052] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0053] In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted through a computer-readable medium as one or more instructions or codes. Computer-readable media include computer storage media and communication media, which include any media that facilitate the transfer of computer programs from one location to another. The storage medium may be any available medium that can be accessed by a general or special-purpose computer. As an example and not by way of limitation, the computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the required program code in the form of instructions or data structures and can be accessed by a general or special-purpose computer or a general or special-purpose processor. In addition, any connection may be appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves are used to send software from a website, server, or other remote source, the above-mentioned coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are all included in the definition of the medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0054] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
[0055] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.
[0056] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0057] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0058] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A method for adjusting exposure time, characterized in that: The following steps are involved: Setting an exposure time, exposing the current image based on the exposure time, and performing histogram statistics on the exposed image to obtain a statistical result; Based on the statistical results, peak exposure calculation and average exposure calculation are performed respectively to obtain a first adjustment time and a second adjustment time; performing exposure weight calculation based on the statistical result to obtain an adjustment weight, and performing weighted calculation on the first adjustment time and the second adjustment time based on the adjustment weight to obtain a pre-adjusted exposure time; as well as The exposure time is updated based on the pre-adjusted exposure time, and the next frame of image is exposed.
2. The exposure time adjustment method according to claim 1, characterized in that: Based on the statistical results, peak exposure calculation and average exposure calculation are respectively performed to obtain the first adjustment time and the second adjustment time, which includes: Determine whether the proportion of the overexposed area of the current image exceeds a preset proportion based on the statistical result; In response to the overexposed area ratio of the current image exceeding a preset ratio, reducing the exposure time to obtain a negative first adjustment time; In response to the fact that the proportion of the overexposed area of the current image does not exceed the preset proportion, the exposure time is increased to obtain a first adjustment time with a non-negative value.
3. The method for adjusting the exposure time according to claim 1, characterized in that: Based on the statistical results, peak exposure calculation and average exposure calculation are respectively performed to obtain the first adjustment time and the second adjustment time, which includes: Determine whether the average brightness of the current image is higher than a preset brightness based on the statistical result; In response to the average brightness of the current image being higher than a preset brightness, reducing the exposure time to obtain a second adjustment time of a negative value; In response to the average brightness of the current image being not higher than the preset brightness, the exposure time is increased to obtain a second adjustment time with a non-negative value.
4. The method for adjusting the exposure time according to claim 1, characterized in that: Calculating the exposure weight based on the statistical results to obtain the adjustment weight includes: Calculating a first exposure weight based on the proportion of the highlight area of the current image in the statistical result, where the first exposure weight is positively correlated with the proportion of the highlight area; Calculating a second exposure weight based on the uniformity of the current image in the statistical result, where the second exposure weight is positively correlated with the uniformity; Performing weighted calculation on the first adjustment time and the second adjustment time based on the adjustment weight to obtain the pre-adjusted exposure time includes: The first adjustment time is weightedly calculated based on the first exposure weight and the second adjustment time is weightedly calculated based on the second exposure weight to obtain a pre-adjusted exposure time.
5. The method for adjusting exposure time according to claim 1, characterized in that: Updating the exposure time based on the pre-adjusted exposure time and exposing the next frame of image includes: Determining whether the pre-adjusted exposure time exceeds an adjustment tolerance range; If it exceeds, adjusting the time to the exposure adjustment time, and exposing the next frame of image based on the adjusted exposure time; If not, the next frame of image is exposed based on the exposure time.
6. The method for adjusting the exposure time according to claim 5, characterized in that: Determining whether the pre-adjusted exposure time exceeds the adjustment tolerance range includes: The pre-adjusted exposure time and the exposure time are subtracted to obtain an adjustment difference, and it is determined whether the adjustment difference exceeds an adjustment tolerance range.
7. The exposure time adjustment method according to claim 1, characterized in that: Updating the exposure time based on the pre-adjusted exposure time and exposing the next frame of image includes: Calculating an adjustment trend based on the historical exposure time, and determining whether the pre-adjusted exposure time is consistent with the adjustment trend; If they are consistent, the time is adjusted to the exposure adjustment time, and the next frame of image is exposed based on the adjusted exposure time; If they are inconsistent, the next frame of image is exposed based on the exposure time.
8. An exposure time adjustment device, characterized in that: include: An exposure module, configured to set an exposure time, expose the current image based on the exposure time, and perform histogram statistics on the exposed image to obtain a statistical result; A calculation module, configured to perform peak exposure calculation and average exposure calculation based on the statistical results, so as to obtain a first adjustment time and a second adjustment time; a weighting module configured to perform exposure weight calculation based on the statistical result to obtain an adjustment weight, and perform weighted calculation on the first adjustment time and the second adjustment time based on the adjustment weight to obtain a pre-adjusted exposure time; as well as The adjustment module is configured to update the exposure time based on the pre-adjusted exposure time and expose the next frame of image.
9. A computer device, characterized in that: include: at least one processor; as well as A memory storing computer instructions executable on the processor, wherein the instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.