Imaging apparatus and photographing mode control method thereof, computer program product
By normalizing the image frames of the imaging device, the influence of exposure parameters is reduced, and the proportion of bright and dark areas is accurately obtained. This solves the problem of accuracy in mode switching of the imaging device in wide dynamic range scenes and improves the image quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TP-LINK INT SHENZHEN CO LTD
- Filing Date
- 2026-02-27
- Publication Date
- 2026-05-29
AI Technical Summary
Existing imaging devices have difficulty accurately determining whether to switch to high dynamic range mode in wide dynamic range scenes, leading to overexposure in bright areas or underexposure in dark areas. Existing methods such as brightness detection and brightness histogram distribution have inaccuracies.
By normalizing the brightness map of the image frame, the influence of exposure parameters is reduced or eliminated, and an accurate normalized brightness histogram distribution is obtained. The shooting mode is then switched based on the proportion of bright areas and the proportion of dark areas.
It enables accurate identification of wide dynamic range scenes under different exposure parameters, improves the accuracy and versatility of high dynamic range mode switching, and enhances the imaging quality of imaging devices in different scenarios.
Smart Images

Figure CN122120610A_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of image processing technology, and more specifically, to imaging devices and methods for controlling shooting modes thereof, and computer program products. Background Technology
[0002] Imaging devices are electronic devices capable of imaging the environment, and are widely used in various fields such as security monitoring, industrial inspection, and daily photography. The performance of imaging devices is significantly affected by ambient lighting. For example, in wide dynamic range scenes, such as those where strong light (corresponding to bright areas) and shadows (corresponding to dark areas) coexist, the dynamic range of ordinary imaging devices is limited, often resulting in overexposed bright areas and underexposed dark areas, leading to loss of detail.
[0003] Currently, most imaging devices on the market (such as cameras and mobile phones) have a wide dynamic range (WDR) mode to support imaging in wide dynamic range scenes. In WDR mode, imaging devices can obtain images with a wider dynamic range, making them suitable for capturing wide dynamic range scenes that simultaneously contain bright and dark areas. However, there is still room for improvement in the criteria for determining whether an imaging device is shooting in WDR mode. Summary of the Invention
[0004] At least one embodiment of this disclosure provides a shooting mode control method for an imaging device, comprising: acquiring a brightness map of an image frame of the imaging device in a first shooting mode; normalizing the brightness map according to the exposure parameters of the image frame to determine a normalized brightness histogram distribution of the image frame; determining the proportion of bright areas and / or the proportion of dark areas of the image frame based on the normalized brightness histogram distribution of the image frame; and determining whether to switch the imaging device from the first shooting mode to a second shooting mode based at least on the proportion of bright areas and / or the proportion of dark areas, wherein the first shooting mode and the second shooting mode are different shooting modes in a high dynamic range mode and a normal mode.
[0005] For example, in some embodiments, the first shooting mode is the normal mode, the second shooting mode is the high dynamic range mode, and the image frame is a single image frame captured in the normal mode, and the normalized brightness histogram distribution of the image frame is a normalized brightness histogram distribution statistically analyzed for the single image frame.
[0006] For example, in some embodiments, the granularity of the luminance map is pixel-level. Normalizing the luminance map based on the exposure parameters of the image frame to determine the normalized luminance histogram distribution of the image frame includes: normalizing the luminance map of the individual image frame based on the exposure parameters of the individual image frame to obtain the normalized luminance map of the individual image frame; and statistically analyzing the luminance levels of the normalized luminance map at the pixel level to obtain the normalized luminance histogram distribution of the individual image frame.
[0007] For example, in some embodiments, normalizing the luminance map of a single image frame according to the exposure parameters of the single image frame to obtain a normalized luminance map of the single image frame includes: dividing the luminance level of each pixel of the single image frame by the exposure parameters to obtain the normalized luminance map, wherein the exposure parameters include at least one of exposure time and image gain.
[0008] For example, in some embodiments, normalizing the luminance map of a single image frame according to the exposure parameters of the single image frame to obtain a normalized luminance map of the single image frame includes: multiplying the luminance level of each pixel of the single image frame by a magnification factor and dividing it by the exposure parameters to obtain the normalized luminance map, wherein the exposure parameters include at least one of exposure time and image gain, wherein the magnification factor makes the result of multiplying the luminance level of each pixel by the magnification factor and dividing it by the exposure parameters an integer.
[0009] For example, in some embodiments, the granularity of the luminance map is at the pixel block level. Normalizing the luminance map based on the exposure parameters of the image frame to determine the normalized luminance histogram distribution of the image frame includes: normalizing the luminance map of the individual image frame based on the exposure parameters of the individual image frame to obtain the normalized luminance map of the individual image frame; and statistically analyzing the luminance levels of the normalized luminance map at the pixel block level to obtain the normalized luminance histogram distribution of the individual image frame.
[0010] For example, in some embodiments, determining whether to switch the imaging device from the first shooting mode to the second shooting mode is based at least on the bright area ratio and / or dark area ratio, including: in response to the bright area ratio being greater than a first bright area ratio threshold and the dark area ratio being greater than a first dark area ratio threshold, determining to switch the imaging device from the first shooting mode to the second shooting mode.
[0011] For example, in some embodiments, the shooting mode control method further includes: normalizing the brightness map according to the exposure parameters of the individual image frame and the number of pixels of the individual image frame to obtain the unit average brightness of the individual image frame; wherein, determining whether to switch the imaging device from the first shooting mode to the second shooting mode based at least on the proportion of bright areas and / or the proportion of dark areas includes: in response to the proportion of dark areas being greater than a second dark area proportion threshold and the unit average brightness being greater than a first average brightness threshold, determining to switch the imaging device from the first shooting mode to the second shooting mode.
[0012] For example, in some embodiments, the first shooting mode is the high dynamic range mode, the second shooting mode is the normal mode, and the image frames include long frames and short frames with different exposure parameters, and the normalized brightness histogram distribution of the image frames is a fused brightness histogram distribution that combines the normalized brightness histogram distribution of the long frames and the normalized brightness histogram distribution of the short frames.
[0013] For example, in some embodiments, the granularity of the luminance map is pixel-level. Normalizing the luminance map based on the exposure parameters of the image frame to determine the normalized luminance histogram distribution of the image frame includes: normalizing the luminance map of the long frame and the luminance map of the short frame based on the exposure parameters of the long frame and the short frame respectively, to obtain the normalized luminance map of the long frame and the normalized luminance map of the short frame; statistically analyzing the luminance levels of the pixels in the long frame and the pixels in the short frame at the pixel level to obtain the normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame; and fusing the normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame to obtain the fused luminance histogram distribution.
[0014] For example, in some embodiments, fusing the normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame to obtain the fused luminance histogram distribution includes: merging the normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame into the fused luminance histogram distribution based on the exposure ratio of the long frame and the short frame.
[0015] For example, in some embodiments, the fused luminance histogram distribution includes: a normalized luminance histogram distribution of the long frame corresponding to the first luminance level interval; and an offset normalized luminance histogram distribution obtained by multiplying the normalized luminance histogram distribution of the short frame corresponding to the second luminance level interval by the exposure ratio.
[0016] For example, in some embodiments, the granularity of the luminance map is at the pixel block level. Normalizing the luminance map according to the exposure parameters of the image frame to determine the normalized luminance histogram distribution of the image frame includes: normalizing the luminance map of the long frame and the luminance map of the short frame according to the exposure parameters of the long frame and the short frame respectively, to obtain the normalized luminance map of the long frame and the normalized luminance map of the short frame; statistically analyzing the luminance levels of the pixel blocks in the long frame and the pixel blocks in the short frame at the pixel block granularity to obtain the normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame; and fusing the normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame to obtain the fused luminance histogram distribution.
[0017] For example, in some embodiments, determining whether to switch the imaging device from the first shooting mode to the second shooting mode is based at least on the bright area ratio and / or dark area ratio, including: determining to switch the imaging device from the first shooting mode to the second shooting mode in response to at least one of the following: the bright area ratio is less than a second bright area ratio threshold and the dark area ratio is less than a second dark area ratio threshold; or the dark area ratio is less than a third dark area ratio threshold.
[0018] For example, in some embodiments, the shooting mode control method further includes: normalizing the luminance map of the long frame according to the exposure parameters of the long frame and the total number of pixels in the long frame to obtain the unit average luminance of the long frame; normalizing the luminance map of the short frame according to the exposure parameters of the short frame and the total number of pixels in the short frame to obtain the unit average luminance of the short frame; and merging the unit average luminance of the long frame and the unit average luminance of the short frame to obtain a comprehensive unit average luminance; wherein, determining whether to switch the imaging device from the first shooting mode to the second shooting mode, at least based on the proportion of bright areas and / or the proportion of dark areas, includes: determining to switch the imaging device from the first shooting mode to the second shooting mode in response to the comprehensive unit average luminance being less than a second average luminance threshold.
[0019] For example, in some embodiments, determining whether to switch the imaging device from the first shooting mode to the second shooting mode is based at least on the proportion of bright areas and / or the proportion of dark areas, includes: determining whether at least one of the switching conditions is met at least every predetermined time interval based on the proportion of bright areas and / or the proportion of dark areas; and switching the imaging device from the first shooting mode to the second shooting mode in response to the at least one switching condition being met a predetermined number of times consecutively.
[0020] For example, in some embodiments, the shooting mode control method further includes: in response to a switch from the first shooting mode to the second shooting mode, determining a switching interval length between the switch from the first shooting mode to the second shooting mode and the previous switch from the second shooting mode to the first shooting mode; counting the number of times the switching interval length is less than a switching interval length threshold; in response to the count value being greater than a lock count threshold, locking the imaging device to the normal mode; and in response to locking the imaging device to the normal mode, suspending the step of determining whether at least one of the switching conditions is met based at least on the bright area ratio and / or dark area ratio.
[0021] For example, in some embodiments, the shooting mode control method further includes: in response to at least one of the following, continuing to perform the step of determining whether at least one of a switching condition is met based on the proportion of bright areas and / or the proportion of dark areas: the imaging device has been locked to the normal mode for a lock time length threshold; or the difference between the average brightness of the currently acquired image frame and the average brightness of the locked image frame when the imaging device is locked to the normal mode is greater than the unlock brightness threshold.
[0022] At least one embodiment of this disclosure provides an imaging device, including: at least one processor; and a memory; wherein the memory stores computer-readable instructions and is communicatively connected to the at least one processor; the at least one processor is configured to execute the computer-readable instructions stored in the memory to implement the shooting mode control method as described above.
[0023] At least one embodiment of this disclosure provides a computer program product having instructions stored thereon that, when executed by a processor, cause execution according to the shooting mode control method described above. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments of this disclosure will be briefly described below. Clearly, the drawings described below only relate to some embodiments of this disclosure and are not intended to limit the scope of this disclosure.
[0025] Figure 1 A schematic diagram showing an example image of a wide dynamic range scene captured by an imaging device in normal mode;
[0026] Figure 2 A schematic diagram of a wide dynamic range scene captured by an imaging device in HDR mode is shown;
[0027] Figure 3 A flowchart is shown for a shooting mode control method of an imaging device according to at least one embodiment of the present disclosure;
[0028] Figure 4 A schematic diagram shows an example image of a mid-brightness wide dynamic range scene captured in normal mode according to at least one embodiment of the present disclosure;
[0029] Figure 5 A schematic diagram of a mid-brightness wide dynamic range scene captured by an imaging device in HDR mode is shown.
[0030] Figure 6 A schematic diagram of an example image of a wide dynamic range scene captured in normal mode is shown.
[0031] Figure 7 A schematic diagram of an example image of a wide dynamic range scene captured in HDR mode is shown;
[0032] Figure 8 A schematic diagram of an imaging apparatus according to at least one embodiment of the present disclosure is shown. Detailed Implementation
[0033] Reference will now be made in detail to specific embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. Although the present disclosure will be described in conjunction with specific embodiments, it will be understood that it is not intended to limit the present disclosure to the described embodiments. Rather, it is intended to cover variations, modifications, and equivalents included within the spirit and scope of the present disclosure as defined by the appended claims. It should be noted that the method operations described herein can be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of both.
[0034] To enable those skilled in the art to better understand this disclosure, the disclosure will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0035] Note that the examples described below are merely specific examples and are not intended to limit the embodiments of this disclosure to the specific shapes, hardware, connections, operations, values, conditions, data, sequences, etc., shown and described. Those skilled in the art can utilize the concepts of this disclosure to construct further embodiments not mentioned herein by reading this specification.
[0036] The terminology used in this disclosure is that which is currently widely used in the art in consideration of the functionality of this disclosure; however, these terms may vary depending on the intent, precedent, or new technology of those skilled in the art. Furthermore, specific terms may be chosen by the applicant, and in such cases, their detailed meanings will be described in the detailed description of this disclosure. Therefore, the terminology used in this specification should not be construed as simple names, but rather based on the meaning of the terms and the overall description of this disclosure.
[0037] This disclosure uses flowcharts to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously, as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.
[0038] As mentioned above, imaging devices in wide dynamic range mode can obtain images with a greater dynamic range, making them suitable for capturing scenes containing both bright and dark areas. Exemplary wide dynamic range implementations include digital wide dynamic range and analog wide dynamic range. Digital wide dynamic range is generally referred to as wide dynamic range (WDR), while analog wide dynamic range is generally referred to as high dynamic range (HDR).
[0039] Between WDR and HDR, WDR is a post-processing scheme based on software algorithms, which is a pure image processing method and its effect is generally average in practical applications.
[0040] Unlike WDR, HDR addresses the issue at the hardware level, optimizing the signal acquisition process or method of the image sensor. For example, HDR requires image sensor support, such as the ability of the image sensor to output a long-exposure image (hereinafter referred to as a long frame or long-frame image) and a short-exposure image (hereinafter referred to as a short frame or short-frame image) at different exposure times. The long frame can compensate for or avoid underexposure in dark areas, thus making dark areas in the scene visible, while the short frame can reduce or avoid overexposure in bright areas, thus making bright areas in the scene visible.
[0041] In terms of exposure time, in actual imaging devices, the exposure time ratio of long and short frames is generally fixed (such as 8:1, 16:1, 32:1, etc.) to balance the acquisition of details in bright and dark areas.
[0042] After obtaining the long and short frames, a fusion algorithm can be used to merge the two frames (i.e., the long and short frames) to obtain an image with a wider dynamic range. Furthermore, the above-mentioned HDR technique can be extended to three-frame fusion and multi-frame fusion.
[0043] See below. Figure 1 and Figure 2 These diagrams illustrate how an imaging device captures images of the same wide dynamic range scene in both normal mode (i.e., non-HDR mode) and HDR mode. Figure 1 A schematic diagram of an example image of a wide dynamic range scene captured by an imaging device in normal mode is shown. Figure 2 This diagram illustrates an image of a wide dynamic range scene captured by an imaging device in HDR mode.
[0044] from Figure 1 As shown in the image, the left side of the image largely corresponds to the bright areas of a wide dynamic range scene, and there is overexposure in these bright areas (e.g., near the window), resulting in loss of detail. Conversely, the right side of the image largely corresponds to the dark areas of a wide dynamic range scene, and there is underexposure in these dark areas, also leading to loss of detail.
[0045] In contrast, from Figure 2 As can be seen from the image shown, the area on the left side of the image (and) Figure 1 Similarly, overexposure issues in the bright areas (basically corresponding to wide dynamic range scenes) are overcome, thus revealing more detail. Additionally, the right side of the image (with...) Figure 1 Similarly, the underexposure problem in the dark areas (which basically correspond to wide dynamic range scenes) is overcome, thus revealing more details.
[0046] As shown above, HDR can be applied to wide dynamic range scenes and solve the problems of overexposure in bright areas and underexposure in dark areas. However, HDR also has some drawbacks. For example, the asynchronous exposure of long and short frames makes HDR unsuitable for scenes with fast-moving objects. Also, the short exposure time of short frames can easily cause water ripples under strobe light sources. Therefore, normal mode and wide dynamic range mode each have their applicable scenarios. Only true wide dynamic range scenes are suitable for using HDR to capture information with a higher dynamic range, while using HDR in other scenarios may do more harm than good. Therefore, it is necessary to control the shooting mode of the imaging device (such as the normal mode and HDR mode mentioned above) to ensure that it accurately adopts the shooting mode corresponding to the shooting scene.
[0047] An exemplary method for controlling the shooting mode of an imaging device is to allow the user to manually turn HDR mode on and off by viewing the image captured by the imaging device. This method has some application value for imaging devices that do not require long-term shooting (such as handheld imaging devices like mobile phones and handheld cameras), as users can conveniently manually turn HDR mode on and off while shooting with a handheld imaging device. However, this method is less practical for imaging devices that require long-term shooting, because it is impractical for users to manually turn HDR mode on and off while viewing the image for extended periods or even all day. For example, in security scenarios, whether the scene captured by the security imaging device (such as a camera, webcam, etc.) is a wide dynamic range scene depends on the time of day and the rotation angle of the gimbal, and it is difficult for the user to continuously view the image through a monitor and manually turn HDR mode on and off.
[0048] Therefore, an automatic control mechanism is needed to automatically switch to wide dynamic range (WDR) mode or normal mode after identifying whether the current scene is a WDR scene or a normal scene, in order to meet the shooting requirements of the corresponding scene. For example, a WDR scene can be a scene suitable for shooting using WDR mode, such as a shooting scene that simultaneously contains extremely bright areas (highlight areas) and extremely dark areas (lowlight areas), while a normal scene can be a scene suitable for shooting using normal mode, such as a shooting scene other than a WDR scene.
[0049] One exemplary method is to enable and disable Wide Dynamic Range (WDR) based on brightness detection. Specifically, if the detected image brightness is above a threshold, WDR is enabled; if the detected image brightness is below a threshold, WDR is disabled. The problem with this exemplary method is that the correlation between image brightness and WDR scenes is not high. For example, a lower brightness image may correspond to a WDR scene, while a higher brightness image may correspond to a non-WDR scene (i.e., a normal scene). Therefore, the accuracy of enabling and disabling WDR using this exemplary method is not high.
[0050] Another exemplary method is to enable wide dynamic range mode based on the brightness histogram distribution. Specifically, in normal mode, the brightness distribution histogram of the image is used to determine whether the number of dark areas and the number of bright areas reach a certain ratio. If so, it is considered a wide dynamic range scene, and wide dynamic range mode is then enabled.
[0051] However, the inventors of this disclosure recognized during their research that using luminance histogram distribution to enable wide dynamic range (WDR) also has its drawbacks. Specifically, since the imaging of an imaging device depends on exposure parameters (including exposure time, gain, etc.), different exposure parameters result in different images (e.g., the original image). Furthermore, in practical use, automatic exposure algorithms are typically used to control the exposure parameters for each frame, which may vary between frames. In this situation, directly performing luminance histogram statistics on the original image or the final RGB image does not fully reflect the distribution of ambient brightness. For example, images taken at different times will have different exposure parameters, resulting in no direct comparability of luminance histogram distributions. The luminance histogram distribution can only characterize the relative brightness distribution within a frame, but cannot characterize the absolute brightness distribution changes between frames, making it impossible to use a unified standard to define a WDR scene.
[0052] In view of this, at least one embodiment of the present disclosure provides an imaging device and a shooting mode control method and computer program product thereof, which reduces or eliminates the difference in brightness histogram distribution caused by different exposure parameters by normalizing the brightness map of the image frame, thereby more accurately obtaining the absolute brightness and darkness distribution changes between frames, promoting the use of a unified judgment standard to define dark and bright areas, and improving the versatility of high dynamic range mode switching.
[0053] Figure 3 A flowchart is shown of a shooting mode control method for an imaging device according to at least one embodiment of the present disclosure.
[0054] See Figure 3 The imaging mode control method 300 of the imaging device includes steps S310 to S340.
[0055] In step S310, the brightness map of the image frame of the imaging device in the first shooting mode is obtained.
[0056] Here, an image frame refers to an image divided into units of frames, which can be a single frame or multiple frames (such as long frames and short frames described in context). The image frame can be a raw image (i.e., an unprocessed image frame directly acquired by an image sensor) or a processed image (i.e., an image frame processed by algorithms such as filtering, enhancement, and feature extraction on a raw image).
[0057] As mentioned above, the imaging of an imaging device depends on exposure parameters (including exposure time, gain, etc.). It's worth noting that exposure time, originally from film cameras, refers to the time the film is exposed to light. For digitized images, exposure time also refers to the time the image sensor is exposed to light; each pixel of the image sensor continuously accumulates brightness under illumination. Gain refers to the fact that the brightness value of the image sensor after exposure can be superimposed with analog or digital amplification to ultimately generate the original image output, which accumulates the brightness imparted by the superimposed analog or digital amplification. Therefore, the brightness map here is also called a cumulative brightness map, designed to identify brightness maps that depend on exposure parameters or reflect the influence of exposure parameters.
[0058] Depending on the type of image sensor in the imaging device, the image output from the sensor may be a color image (RGB image) or a grayscale image (non-RGB image). Therefore, the image frame of the imaging device in shooting mode may be a color image (RGB image) or a grayscale image (non-RGB image). In step S310, when the image frame is an RGB image, grayscale processing can be performed on the RGB image to obtain the brightness map of the image frame. When the image frame is a grayscale image (non-RGB image), the grayscale image can be directly used as the brightness map.
[0059] In step S320, the brightness map is normalized according to the exposure parameters of the image frame to determine the normalized brightness histogram distribution of the image frame.
[0060] Normalization here refers to scaling the brightness levels of pixels (e.g., some or all) in a luminance map to reduce or eliminate the influence of exposure parameters on the brightness levels of these pixels. Correspondingly, the influence of exposure parameters in the determined luminance histogram distribution is also reduced or eliminated, i.e., normalized. Therefore, the luminance histogram obtained by normalizing the luminance map is referred to in this paper as the normalized luminance histogram distribution.
[0061] As mentioned above, directly performing luminance histogram statistics on the original image or the final RGB image will result in a lack of direct comparability between the luminance histogram distributions of images taken at different times. In step S320, normalization processing can reduce or eliminate the influence of exposure parameters in the obtained normalized luminance histogram distribution.
[0062] In step S330, the proportion of bright areas and / or dark areas of the image frame is determined based on the normalized brightness histogram distribution of the image frame.
[0063] A normalized luminance histogram distribution can characterize the number of pixels or pixel blocks at different luminance levels in an image frame. Thus, the proportion of bright areas and / or dark areas in an image frame can be obtained. Since the proportion of bright areas and / or dark areas in an image frame accurately characterizes the number of pixels or pixel blocks corresponding to bright and / or dark areas, it can more accurately characterize whether an image frame corresponds to a wide dynamic range scene compared to exemplary methods, such as using luminance to determine a wide dynamic range scene. Furthermore, since the influence of exposure parameters in the normalized luminance histogram distribution is reduced or eliminated, the influence of exposure parameters on the proportion of bright areas and / or dark areas can correspondingly be reduced or eliminated.
[0064] In step S340, it is determined whether to switch the imaging device from a first shooting mode to a second shooting mode, based at least on the proportion of bright areas and / or the proportion of dark areas. The first shooting mode and the second shooting mode are different shooting modes in High Dynamic Range (HDR) mode and Normal mode.
[0065] As mentioned above, since the proportion of bright areas and / or dark areas in an image frame can accurately characterize whether the image frame corresponds to a wide dynamic range scene and reduce or eliminate the influence of exposure parameters, dark areas and bright areas can be defined based on a unified judgment standard for different image frames in order to identify whether the scene captured by the imaging device is a wide dynamic range scene.
[0066] In some embodiments, the shooting mode of the imaging device can be switched based on preset conditions being met for the proportion of bright areas and / or the proportion of dark areas. In other embodiments, the current shooting mode of the imaging device can be maintained based on preset conditions not being met for the proportion of bright areas and / or the proportion of dark areas. For example, the first shooting mode can be a normal mode, and the normal mode can be switched to HDR mode based on preset conditions corresponding to a wide dynamic range scene being met for the proportion of bright areas and / or the proportion of dark areas. As another example, the first shooting mode can be a standard HDR mode, and the HDR mode can be switched back to normal mode based on preset conditions not being met for a wide dynamic range scene being met for the proportion of bright areas and / or the proportion of dark areas.
[0067] As described above, the imaging mode control method of the imaging device according to at least one embodiment of the present disclosure can more accurately determine the absolute brightness and darkness distribution changes between frames, promote the use of a unified judgment standard to define dark and bright areas, and improve the versatility of high dynamic range mode switching.
[0068] In some cases, the imaging device may be in normal mode, and accordingly, it is necessary to determine whether to switch the imaging device from normal mode to wide dynamic range mode (i.e., whether to enter wide dynamic range mode). In other cases, the imaging device may be in HDR mode, and accordingly, it is necessary to determine whether to switch the imaging device from wide dynamic range mode to normal mode (i.e., whether to exit wide dynamic range mode). The control methods for whether the imaging device enters or exits wide dynamic range mode are described below.
[0069] First, the control method for whether the imaging device enters the wide dynamic range mode is described. In this case, the first shooting mode can be the normal mode, and the second shooting mode can be the high dynamic range mode.
[0070] In some embodiments, the image frame is a single image frame captured in normal mode, and the normalized brightness histogram distribution of the image frame is a normalized brightness histogram distribution statistically analyzed for a single image frame. In this regard, for example, formulas (2)-(3) and (5) below can be described by way of example.
[0071] In this way, it is possible to determine whether to enter wide dynamic range mode based on the normalized brightness histogram distribution of a single image frame.
[0072] The inventors of this disclosure recognized during their research that, depending on design requirements, some imaging devices (e.g., handheld imaging devices) may have limited hardware resources and insufficient computing power to support obtaining the normalized brightness histogram distribution as described in steps S310 and S320. Conversely, other imaging devices may have sufficient hardware resources and therefore sufficient computing power to support obtaining the normalized brightness histogram distribution as described in steps S310 and S320. In view of these two hardware resource situations, the normalized brightness histogram distribution can be obtained at the pixel block granularity and pixel block granularity, respectively, for each of these two scenarios.
[0073] For example, in some embodiments, the granularity of the luminance map can be pixel-level. In this case, step S320 above may include: normalizing the luminance map of a single image frame according to the exposure parameters of the single image frame to obtain a normalized luminance map of the single image frame; and statistically analyzing the luminance levels of the normalized luminance map at the pixel level to obtain a normalized luminance histogram distribution of the single image frame.
[0074] As mentioned above, normalization refers to scaling the brightness levels of pixels (e.g., some or all pixels) in a luminance map to reduce or eliminate the influence of exposure parameters on the brightness levels of these pixels. Correspondingly, the influence of exposure parameters in the luminance map obtained after normalization is also reduced or eliminated, i.e., normalized. Therefore, the luminance map obtained by normalizing the luminance map is referred to in this paper as a normalized luminance map.
[0075] In some examples, the image frame bit depth is typically 10 bits or 12 bits. For example, 12 bits can represent 4096 brightness levels and can be statistically analyzed at the pixel level to obtain a brightness histogram distribution.
[0076] Therefore, on the one hand, when the imaging device has sufficient computing power to support obtaining the normalized brightness histogram distribution through steps S310 and S320, the normalized brightness histogram distribution can be determined at the pixel level, thereby obtaining a normalized brightness histogram distribution that can characterize a higher precision brightness level.
[0077] As described above, the influence of exposure parameters on the brightness levels of these pixels in the brightness map can be reduced or eliminated through normalization. To this end, in some embodiments, normalizing the brightness map of a single image frame based on the exposure parameters of that single image frame to obtain a normalized brightness map may include dividing the brightness level of each pixel in the single image frame by the exposure parameters to obtain the normalized brightness map. The exposure parameters may include at least one of exposure time and image gain. In this regard, for example, Equation (1) as described below can be exemplarily described.
[0078] In this embodiment, dividing the brightness level of each pixel in a single image frame by the exposure parameter can eliminate the influence of the exposure parameter on the brightness level of each pixel, thereby enabling the obtained normalized brightness map to reflect the true brightness characteristics of the shooting scene.
[0079] Additionally or alternatively, the effect of exposure parameters on the brightness levels of some or all pixels can be reduced or eliminated by other methods, through various variations of the above division or by incorporating a brightness map, exposure parameters, and a normalized brightness map lookup table.
[0080] In the above embodiments, the exposure parameters of the image frame, when used as the denominator, cause the values of the corresponding pixels in the normalized brightness map to become floating-point numbers, thus reducing the efficiency of subsequent calculations associated with the normalized brightness map.
[0081] In view of this, in some embodiments, normalizing the luminance map of a single image frame according to the exposure parameters of the single image frame to obtain a normalized luminance map of the single image frame may include: multiplying the luminance level of each pixel of the single image frame by a magnification factor and dividing by the exposure parameters to obtain a normalized luminance map. The exposure parameters may include at least one of exposure time and image gain. The magnification factor may be such that the result of multiplying the luminance level of each pixel by the magnification factor and dividing by the exposure parameters is an integer. In this regard, for example, see formula (4) below for exemplary description.
[0082] In this embodiment, the magnification factor can integerize the brightness level of each pixel in the image frame, thereby accelerating computational efficiency in engineering.
[0083] The above describes obtaining the normalized luminance histogram distribution at the pixel block granularity. In other embodiments, the normalized luminance histogram distribution can be obtained at the pixel block granularity.
[0084] For example, in some embodiments, the granularity of the luminance map is at the pixel block level. In this case, step S320 above may include: normalizing the luminance map of a single image frame according to the exposure parameters of a single image frame to obtain a normalized luminance map of a single image frame; and statistically analyzing the luminance levels of the normalized luminance map at the pixel block level to obtain a normalized luminance histogram distribution of a single image frame.
[0085] Compared to obtaining a normalized luminance histogram distribution at the pixel block level, the luminance levels of the luminance histogram distribution obtained by statistical analysis at the pixel block level are compressed to varying degrees, such as to 64 luminance levels or 128 luminance levels. Therefore, determining the normalized luminance histogram distribution at the pixel block level can improve computational efficiency and reduce the computational burden.
[0086] It is understandable that the specific aspects of determining the distribution of normalized luminance histogram at the pixel block level can be the same as or similar to the specific aspects of determining the distribution of normalized luminance histogram at the pixel level, and may differ only in statistical granularity, which will not be elaborated here.
[0087] After obtaining the normalized luminance histogram distribution, the ratio of the number of pixels above the high brightness threshold to the total number of pixels in the image frame can be used as the bright area ratio, and the ratio of the number of pixels below the low brightness threshold to the total number of pixels in the image frame can be used as the dark area ratio. For example, the calculation of the bright area ratio and / or dark area ratio can be illustrated by formulas (6) and (7) below.
[0088] After obtaining the proportion of bright areas and / or dark areas in an image frame, it can be determined whether to switch the imaging device from normal mode to HDR mode based on whether the proportion of bright areas and / or dark areas meets the conditions for switching wide dynamic range mode.
[0089] For example, in some embodiments, step S340 may include: in response to a bright area ratio greater than a first bright area ratio threshold and a dark area ratio greater than a first dark area ratio threshold, determining to switch the imaging device from a first shooting mode to a second shooting mode.
[0090] Here, the fact that the proportion of bright areas is greater than the first bright area proportion threshold and the proportion of dark areas is greater than the first dark area proportion threshold corresponds to a condition for switching wide dynamic range (WDR) mode. This condition corresponds to a situation where both bright and dark areas reach a certain proportion, thus being suitable for most typical WDR scenarios. For example, see [link to relevant documentation]. Figure 1 and Figure 2 The scenario described. In some examples, the threshold for the proportion of the first bright area can be 0.01~0.1, and the threshold for the proportion of the first dark area can be 0.05~0.2.
[0091] The above describes determining whether to switch the imaging device from normal mode to HDR mode based on the proportion of bright areas and / or dark areas. Furthermore, the inventors of this disclosure recognized in their research that wide dynamic range scenes are diverse. To make the shooting mode control method of this disclosure adaptable to more shooting scenarios as much as possible, the proportion of bright areas and / or dark areas can be combined with the average brightness of the image frames as a criterion for determining the appropriate shooting mode (e.g., as a criterion for determining whether to enter HDR mode). Additionally, different exposure parameters will lead to differences in image brightness. Directly calculating the average brightness of image frames will not accurately represent the absolute brightness changes between frames, making it impossible to use a unified standard to measure the brightness of a scene.
[0092] In view of this, in some embodiments, the shooting mode control method may further include: normalizing the luminance map according to the exposure parameters of a single image frame and the number of pixels in a single image frame to obtain the unit average luminance of a single image frame. Normalizing the image frame for the exposure parameters and the number of pixels in a single image frame makes the luminance obtained after normalization the average luminance of the luminance map, and the influence of the exposure parameters is also reduced or eliminated. Therefore, in this context, the unit average luminance can also be referred to as the normalized average luminance map. In this regard, the calculation of the unit average luminance can be exemplarily described by, for example, formula (8) below. In this case, step S340 above may include: determining whether to switch the imaging device from the first shooting mode to the second shooting mode based on the proportion of bright areas and / or the proportion of dark areas, and further based on the unit average luminance.
[0093] In this embodiment, after obtaining the unit average brightness, it can be determined whether to switch the imaging device from the first shooting mode to the second shooting mode based on the proportion of bright areas and / or dark areas, and further based on the unit average brightness. Compared with simply using the proportion of bright areas and / or dark areas, combining the proportion of bright areas and / or dark areas with the unit average brightness can cover or map to more shooting scenarios. In addition, since the proportion of bright areas and / or dark areas and the unit average brightness both eliminate the influence of exposure parameters, a unified standard can be used to define the conditions for switching wide dynamic range modes, improving the versatility of the imaging device's shooting mode control method.
[0094] For example, in some embodiments, the step of determining whether to switch the imaging device from the first shooting mode to the second shooting mode based on the proportion of bright areas and / or the proportion of dark areas, and further based on the average brightness per unit, may include: in response to the proportion of dark areas being greater than a second dark area proportion threshold and the average brightness per unit being greater than a first average brightness threshold, determining to switch the imaging device from the first shooting mode to the second shooting mode.
[0095] Here, a dark area proportion greater than the second dark area proportion threshold and a unit average brightness greater than the first average brightness threshold can correspond to a switching wide dynamic range (WDR) mode condition. This WDR mode switching condition is suitable for shooting scenes with many low-brightness areas but few high-brightness areas, where the overall brightness reaches a certain level; this is referred to as a medium-brightness WDR scene. In some examples, the second dark area proportion threshold can be 0.1~0.2, and the first average brightness threshold can be 100,000~200,000.
[0096] The inventors of this disclosure recognized during their research that frequently determining whether the conditions for switching wide dynamic range mode are met will lead to high power consumption of the imaging device. In addition, triggering the switching of shooting mode once the conditions for switching wide dynamic range mode are detected are easily caused by false triggering of shooting mode switching (for example, when the imaging device moves to shoot, there may be instantaneous fluctuations in the image, which may lead to false triggering), reducing the accuracy of shooting scene switching.
[0097] In view of this, in some embodiments, step S340 may include: determining whether at least one of a switching condition is met at least every predetermined time interval based on the proportion of bright areas and / or the proportion of dark areas; and switching the imaging device from a first shooting mode to a second shooting mode in response to the at least one switching condition being met a predetermined number of times consecutively. For ease of description, this step will be referred to below as the "avoiding frequent switching" mechanism.
[0098] In this embodiment, the determination of whether the corresponding wide dynamic mode switching conditions are met can be performed at a predetermined time, thereby avoiding power consumption caused by frequently determining whether the wide dynamic mode switching conditions are met. In one example, the predetermined time can be 100~1000 ms.
[0099] Furthermore, in this embodiment, the shooting mode switch is only executed when the same wide dynamic range mode switching condition is met consecutively a predetermined number of times. This avoids accidental triggering of shooting mode switching and improves the accuracy of shooting scene switching. In one example, the predetermined number of times can be 10 to 20.
[0100] It is worth noting that although a "avoid frequent switching" mechanism is described here for the control method of whether to enter wide dynamic mode, this mechanism can also be applied to the control method of whether to exit wide dynamic mode. For example, this mechanism can be applied to the control method of whether to exit wide dynamic mode if the predetermined time and / or predetermined number of times change or remain unchanged.
[0101] The following describes the control method for whether the imaging device enters a wide dynamic range mode through exemplary steps. It is understood that these exemplary steps are intended to clearly illustrate exemplary aspects of the control method for whether the imaging device enters a wide dynamic range mode in conjunction with specific application scenarios, or as a supplement to the control method, and should not be considered as limitations. For example, the steps described below may not need to be performed completely to achieve one or more aspects of the imaging device's shooting mode control method. Furthermore, the steps described below may not need to be performed strictly in the described order, but may be performed simultaneously, substantially simultaneously, or even in reverse order.
[0102] An exemplary step of the control method for entering wide dynamic range mode is as follows:
[0103] Step 1: The brightness map of the image frame can be obtained from the image sensor of the imaging device. , where i can identify the i-th pixel in the image frame. For example, step 1 could be an example of step S310.
[0104] For example, step 2: the brightness map can be calculated using the following formula (1). Normalized brightness map :
[0105] Formula (1)
[0106] Where expt is the exposure time and iso is the image gain, they are examples of the exposure parameters described above.
[0107] It is worth noting that Formula (1) is merely an example, and the normalized luminance map obtained can be made to be unaffected by the exposure parameters through various variations of Formula (1) or by including the luminance map, exposure parameters, and a normalized luminance map lookup table.
[0108] Furthermore, in step 2, the normalized brightness map can be determined using formula (2). The normalized brightness histogram distribution H(l):
[0109]
[0110] Formula (2)
[0111] Where l represents the luminance level of the normalized luminance map, and bits represents the number of bits in the luminance map, such as 10 bits for a 10-bit luminance map. Let be the Dirac impulse function, which is expressed as formula (3):
[0112] Formula (3)
[0113] It is understood that formulas (2) and (3) are merely exemplary, and the normalized brightness map can be determined in other ways. The histogram distribution H(l).
[0114] For example, step 2 could be an example of step S320.
[0115] In formula (1), the exposure parameters of the image frame, used as the denominator, will make the normalized brightness map... The value is changed to a floating-point number, reducing the subsequent normalized brightness map. The efficiency of related computations.
[0116] Therefore, as an alternative to formula (1), the brightness map can be calculated using formula (4). Normalized brightness map :
[0117] Formula (4)
[0118] Here, f is a magnification factor, which makes the result of formula (2) an integer, thereby speeding up the calculation efficiency in engineering. In some examples, f can be 100000000~300000000.
[0119] With the introduction of the amplification factor, the above formula (2) can be transformed into the following formula (5):
[0120]
[0121] Formula (5)
[0122] Step 3: After obtaining the normalized brightness histogram distribution H(l), the proportion of bright areas can be calculated using formulas (6) and (7) respectively. and dark area ratio :
[0123] Formula (6)
[0124] Formula (7)
[0125] in, Low brightness threshold; This refers to the brightness threshold. In some cases, the low brightness threshold and high brightness threshold can be determined based on the sensitivity of the image sensor used and by considering the image quality changes caused by switching to wide dynamic range mode. In some examples, It can be 5~20, It can be 650~1000.
[0126] For example, step 3 could be an example of step S330.
[0127] Step 4: The luminance map of the image frame can be calculated based on formula (8). unit average brightness :
[0128] Formula (8)
[0129] in, The number of pixels in an image frame. The brightness level for each pixel.
[0130] For example, step 4 can be an example of obtaining the unit average brightness of an image frame.
[0131] Step 5: Obtain the proportion of bright areas and / or percentage of dark areas and average brightness per unit After that, at predetermined intervals, the percentage of the lit area will be adjusted accordingly. and / or percentage of dark areas and average brightness per unit One or more of the criteria are used to determine whether at least one of the conditions for switching to wide dynamic range mode is met. If the same condition for switching to wide dynamic range mode is met consecutively a predetermined number of times, then the system can switch to wide dynamic range mode. In some examples, the predetermined time can be 100~1000 ms, and the predetermined number of times can be 10~20.
[0132] For example, one condition for switching to wide dynamic range mode is the proportion of bright areas. Greater than the threshold of the first bright area And the proportion of dark areas Greater than the threshold of the first dark area For example, the threshold for the proportion of the first bright area. It can be 0.01~0.1, the threshold for the proportion of the first dark area. It can be 0.05~0.2.
[0133] For example, one condition for switching to wide dynamic range mode is the proportion of dark areas. Greater than the threshold for the proportion of the second dark area And the average brightness per unit Greater than the first average brightness threshold For example, the threshold for the proportion of the second dark area. The threshold value can be 0.1 to 0.2, representing the first average brightness threshold. The value can be 100,000 to 200,000. This switching condition for wide dynamic range mode is applicable to medium-brightness wide dynamic range scenes.
[0134] In the aforementioned medium-brightness wide dynamic range (WDR) scenarios, enabling the WDR mode on the imaging device can brighten dark areas and deliver superior image quality, such as... Figure 4 and Figure 5 As shown. Figure 4 A schematic diagram is shown of an example image of a medium-brightness wide dynamic range scene captured in normal mode according to at least one embodiment of the present disclosure. Figure 5 This illustration shows a diagram of a mid-brightness wide dynamic range scene captured by an imaging device in HDR mode. Combined with... Figure 4 and Figure 5 It can be seen that, with Figure 4 compared to, Figure 5 The overexposure at the light on the left was reduced, and Figure 5The dark area on the right side was brightened and revealed more details.
[0135] For example, step 5 could be an example of step S340.
[0136] The above describes the control method for whether the imaging device enters wide dynamic range mode. The following describes the control method for whether the imaging device exits wide dynamic range mode. In this case, the first shooting mode is HDR mode, and the second shooting mode is normal mode.
[0137] The inventors of this disclosure recognized in their research that a brightness distribution histogram can directly reflect a wide dynamic range (WDR) scene, and therefore, determining whether to switch an imaging device from normal mode to WDR (i.e., whether to enter WDR) using the proportion of bright areas and / or dark areas in the brightness distribution histogram has a fairly high accuracy. However, due to technical problems, such as the difficulty in continuing to determine whether the scene still retains the characteristics of a WDR scene from the image after the fusion of long and short frames, using brightness to determine whether to switch the imaging device from WDR to normal mode (i.e., whether to exit WDR) leads to some drawbacks.
[0138] For example, if the exit from wide dynamic range mode is still determined by brightness, there may be scenarios where the conditions for entering wide dynamic range mode and exiting wide dynamic range mode are met at the same time, resulting in repeated switching between normal mode and wide dynamic range mode.
[0139] For example, using only brightness as an indirect condition for judgment is inaccurate. The reason for using brightness as an indirect condition is, as mentioned above, that the wide dynamic range image after fusing long and short frames no longer retains the original bright and dark area characteristics, making it difficult to continue determining whether the scene still maintains wide dynamic range from the fused image. Figure 6 and Figure 7 As shown. Figure 6 A schematic diagram of an example image of a wide dynamic range scene captured in normal mode is shown. Figure 7 A schematic diagram of an example image of a wide dynamic range scene captured in HDR mode is shown. See also Figure 6 and Figure 7 It can be seen that, compared to Figure 6 , Figure 7 The wide dynamic range has been significantly weakened. At this point, if we continue to use, for example, based on... Figure 7 The brightness histogram distribution shown is based on the combined long and short frames captured in HDR shooting mode. This will cause the system to exit wide dynamic range mode, resulting in repeated switching between normal mode and wide dynamic range mode.
[0140] In view of this, at least one embodiment of the present disclosure obtains a fused brightness histogram distribution by fusing the normalized brightness histogram distribution of the normalized brightness map of the long frame and the normalized brightness histogram distribution of the normalized brightness map of the short frame, and uses the histogram distribution statistically obtained from the fused images of the long frame and the short frame in HDR shooting mode, which is an indirect condition such as brightness, or directly uses the histogram distribution obtained by statistically analyzing the images of the long frame and the short frame after fusion.
[0141] For example, in some embodiments, the first shooting mode is a high dynamic range mode, the second shooting mode is a normal mode, and the image frames in the high dynamic range mode include long frames and short frames with different exposure parameters, and the normalized brightness histogram distribution of the image frames in the high dynamic range mode is a fused brightness histogram distribution that combines the normalized brightness histogram distributions of the long frames and the normalized brightness histogram distributions of the short frames. In this regard, see, for example, Equation (14) below for exemplary description.
[0142] In this embodiment, since the fused brightness histogram distribution includes the normalized brightness histogram distribution of the normalized brightness map of the long frame and the normalized brightness histogram distribution of the normalized brightness map of the short frame, rather than statistical histogram distribution of the fused image after the long frame and the short frame, it can have the original bright and dark area characteristics. Therefore, it is possible to accurately determine whether to exit the wide dynamic range mode based on the fused brightness histogram distribution.
[0143] As mentioned above, some imaging devices may have sufficient computing power to support obtaining the normalized brightness histogram distribution through steps S310 and S320, while other imaging devices may not have sufficient computing power to obtain the normalized brightness histogram distribution through steps S310 and S320.
[0144] Therefore, the normalized brightness histogram distribution can be obtained by using pixel block granularity and pixel block granularity respectively for the two cases mentioned above.
[0145] For example, in some embodiments, the granularity of the luminance map is pixel-level. In this case, step S320 may include: normalizing the luminance map according to the exposure parameters of the image frame to determine the normalized luminance histogram distribution of the image frame, including: normalizing the luminance map of the long frame and the luminance map of the short frame according to the exposure parameters of the long frame and the short frame respectively to obtain the normalized luminance map of the long frame and the normalized luminance map of the short frame; statistically analyzing the luminance levels of the pixels in the long frame and the pixels in the short frame at the pixel level to obtain the normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame; and fusing the normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame to obtain the fused luminance histogram distribution. In this regard, the normalized luminance histogram distributions of the long frame and the short frame will be described exemplary with reference to formulas (11) and (12) below.
[0146] In this way, it is possible to obtain the normalized luminance histogram distribution of long frames and short frames at the pixel level, which is suitable for imaging devices with sufficient computing power to obtain normalized luminance histogram distributions with high-precision luminance levels.
[0147] In some embodiments, normalizing the luminance maps of the long frame and the short frame according to the exposure parameters of the long frame and the short frame respectively to obtain the normalized luminance map of the long frame and the normalized luminance map of the short frame may include: dividing the luminance level of each pixel in the long frame by the exposure parameter to obtain the normalized luminance map of the long frame; and dividing the luminance level of each pixel in the short frame by the exposure parameter to obtain the normalized luminance map of the short frame. In this regard, for example, see formulas (9) and (10) below for exemplary description.
[0148] In other respects, similar to or analogous to the above description, when normalizing long and short frames, the brightness level of each pixel in the long and short frames can be multiplied by the magnification factor and divided by the exposure parameter. In this regard, see, for example, the exemplary descriptions in formulas (9) and (10) below.
[0149] In some embodiments, fusing the normalized luminance histogram distributions of long frames and short frames to obtain a fused luminance histogram distribution includes: merging the normalized luminance histogram distributions of long frames and short frames into a fused luminance histogram distribution based on the exposure ratio of the long frames and short frames.
[0150] Merging the normalized luminance histogram distributions of long and short frames based on their exposure ratios can eliminate the differences in exposure ratios between long and short frames, thereby unifying the image's luminance benchmark. This makes the bright area ratio and dark area ratio obtained based on the fused luminance histogram distribution more valuable for reference.
[0151] In some embodiments, the fused luminance histogram distribution may include: a normalized luminance histogram distribution of long frames corresponding to a first luminance level interval; and an offset normalized luminance histogram distribution obtained by multiplying the normalized luminance histogram distribution of short frames corresponding to a second luminance level interval by the exposure ratio. Since long exposures of long frames can result in excellent performance in low-light shooting areas (e.g., they can well characterize details in low-light shooting areas), while underexposure of short frames can result in excellent performance in high-light shooting areas (e.g., they can well characterize details in high-light shooting areas), in some embodiments, the first luminance level interval can be a low-luminance interval, and the second luminance level interval can be a high-luminance interval.
[0152] In this embodiment, the offset normalized luminance histogram distribution can be obtained by multiplying the normalized luminance histogram distribution of a long frame within a certain luminance level range and the normalized luminance histogram distribution of a short frame within a certain luminance level range by the exposure ratio. In this embodiment, multiplying the normalized luminance histogram distribution of the short frame within a certain luminance level range by the exposure ratio can offset or map the normalized luminance histogram distribution of the short frame to the same luminance reference as the normalized luminance histogram distribution of the long frame. For example, the fused luminance histogram distribution can be exemplarily described by formula (14) below.
[0153] Of course, the embodiments disclosed herein are not limited thereto. In other embodiments, the fused luminance histogram distribution may include: an offset normalized luminance histogram distribution obtained by dividing the normalized luminance histogram distribution of the long frame corresponding to the first luminance level range by the exposure ratio; and a normalized luminance histogram distribution of the short frame corresponding to the second luminance level range.
[0154] The above describes obtaining the normalized luminance histogram distribution at the pixel block granularity. In other embodiments, the normalized luminance histogram distribution can be obtained at the pixel block granularity.
[0155] For example, in some embodiments, the granularity of the luminance map is at the pixel block level. In this case, step S320 may include: normalizing the luminance maps of the long frame and the short frame according to the exposure parameters of the long frame and the short frame, respectively, to obtain normalized luminance maps of the long frame and the short frame; statistically analyzing the luminance levels of the pixel blocks of the long frame and the pixel blocks of the short frame at the pixel block level, respectively, to obtain normalized luminance histogram distributions of the long frame and the short frame; and fusing the normalized luminance histogram distributions of the long frame and the short frame to obtain a fused luminance histogram distribution.
[0156] In this way, it is possible to obtain the normalized brightness histogram distribution of long and short frames at the pixel block granularity, which is suitable for imaging devices with insufficient computing power or for those that pursue efficiency.
[0157] It is understandable that the specific aspects of determining the distribution of normalized luminance histogram at the pixel block level can be the same as or similar to the specific aspects of determining the distribution of normalized luminance histogram at the pixel level, and may differ only in statistical granularity, which will not be elaborated here.
[0158] After obtaining the fused brightness histogram distribution, the ratio of the number of pixels above the high brightness threshold in the fused brightness histogram distribution to the number of pixels in the image frame can be used as the bright area ratio, and the ratio of the number of pixels below the low brightness threshold in the fused brightness histogram distribution to the number of pixels in the image frame can be used as the dark area ratio. For example, the calculation of the bright area ratio and / or dark area ratio can be exemplarily described by formulas (15) and (16) below.
[0159] After obtaining the proportion of bright areas and / or dark areas, it can be determined whether to switch the imaging device from HDR mode to normal mode based on whether the proportion of bright areas and / or dark areas meets the conditions for switching wide dynamic range mode.
[0160] For example, in some embodiments, step S340 may include: determining to switch the imaging device from a first shooting mode to a second shooting mode in response to at least one of the following: the proportion of bright areas is less than a second bright area proportion threshold and the proportion of dark areas is less than a second dark area proportion threshold; or the proportion of dark areas is less than a third dark area proportion threshold.
[0161] In this embodiment, a bright area proportion less than a second bright area proportion threshold and a dark area proportion less than a second dark area proportion threshold can correspond to a wide dynamic range mode switching condition. This condition corresponds to a situation where neither the bright nor dark areas reach a certain proportion (e.g., both bright and dark areas are insufficient), thus suitable for exiting HDR mode in most typical wide dynamic range scenes. In some examples, the second bright area proportion threshold can be 0.06~0.1, and the second dark area proportion threshold can be 0.02~0.06.
[0162] Additionally, in this embodiment, a dark area percentage less than a third dark area percentage threshold can correspond to a wide dynamic range mode switching condition suitable for exiting HDR mode when the shooting scene suddenly becomes generally bright. In some examples, the third dark area percentage threshold can be 0.001~0.005.
[0163] As mentioned above, wide dynamic range (WDR) scenes are diverse. To make the shooting mode control method disclosed herein adaptable to more shooting scenarios, the proportion of bright areas and / or dark areas can be combined with the average brightness of image frames as a criterion for determining the appropriate shooting mode (e.g., as a criterion for deciding whether to exit HDR mode). In addition, directly calculating the average brightness of image frames cannot accurately represent the absolute brightness changes between frames, making it impossible to use a unified standard to measure the brightness of a scene.
[0164] In view of this, in some embodiments, the shooting mode control method may further include: normalizing the brightness map of the long frame according to the exposure parameters of the long frame and the total number of pixels in the long frame to obtain the unit average brightness of the long frame; normalizing the brightness map of the short frame according to the exposure parameters of the short frame and the total number of pixels in the short frame to obtain the unit average brightness of the short frame; and merging the unit average brightness of the long frame and the unit average brightness of the short frame to obtain the comprehensive unit average brightness. In this regard, the calculation of the unit average brightness can be exemplarily described, for example, by referring to formula (17) below. In this case, step S340 above may include: determining whether to switch the imaging device from the first shooting mode to the second shooting mode based on the proportion of bright areas and / or the proportion of dark areas, and further based on the comprehensive unit average brightness.
[0165] For example, in some embodiments, the step of determining whether to switch the imaging device from the first shooting mode to the second shooting mode based on the proportion of bright areas and / or the proportion of dark areas, and further based on the average brightness per unit, may include: determining to switch the imaging device from the first shooting mode to the second shooting mode in response to the overall average brightness per unit being less than a second average brightness threshold.
[0166] Here, the fact that the average brightness of the unit is less than the second average brightness threshold can correspond to a switching condition for wide dynamic range mode (HDR), which is suitable for exiting HDR mode when the shooting scene suddenly becomes normally low-light. In some examples, the second average brightness threshold can be 20,000 to 40,000.
[0167] The following describes the control method for whether the imaging device exits wide dynamic range mode through exemplary steps. It is understood that these exemplary steps are intended to clearly illustrate exemplary aspects of the control method for whether the imaging device exits wide dynamic range mode in conjunction with specific application scenarios, or as a supplement to the control method for whether the imaging device exits wide dynamic range mode, and should not be considered as limitations. For example, the steps described below may not need to be performed completely to achieve one or more aspects of the imaging device's shooting mode control method. Furthermore, the steps described below may not need to be performed strictly in the described order, but may be performed simultaneously, substantially simultaneously, or even in reverse order.
[0168] An example of the steps for exiting the wide dynamic range control method is as follows:
[0169] Step 1: Brightness maps of long and short frames can be obtained from the image sensor of the imaging device. and For example, step 1 could be an example of step S310. Additionally, in step 1, luminance maps of both long and short frames can be obtained. and Corresponding exposure time , Image gain long and short frame exposure ratio For example, 16:1. Exposure time. , Image gain This is an example of the exposure parameters described above.
[0170] For example, in step 2, the normalized luminance maps of long frames and short frames can be obtained separately using the following formulas (9)-(10). :
[0171] Formula (9)
[0172] Formula (10)
[0173] It is worth noting that formulas (9)-(10) are merely exemplary and can be modified by various variations of formulas (9)-(10) or by including a luminance map, exposure parameters, and a normalized luminance map lookup table to make the obtained normalized luminance map no longer affected by the exposure parameters.
[0174] Furthermore, in step 2, the normalized luminance histogram distributions of the long frame and the short frame can be calculated using formulas (11)-(12) respectively. :
[0175]
[0176] Formula (11)
[0177]
[0178] Formula (12)
[0179] Where l represents the luminance level of the normalized luminance map, bits represents the number of bits in the luminance map, and Let be the Dirac impulse function, which is expressed as formula (13):
[0180] Formula (13)
[0181] It is understood that formulas (11)-(12) are merely exemplary, and the normalized brightness histogram distribution can be determined in other ways. .
[0182] In formulas (9)-(12), f is a magnification factor, which makes the calculation results of the corresponding formulas integers, thereby speeding up the calculation efficiency in engineering. In some examples, f can be 100000000~300000000.
[0183] As an alternative, f in formulas (9)-(12) can be replaced with 1 to suit scenarios where it is not necessary to make the calculation results of the corresponding formulas integer.
[0184] Furthermore, it can be based on the exposure ratio of long and short frames. According to formula (14), the brightness histogram distribution of long frames and short frames is... Merged into a fused brightness histogram distribution :
[0185]
[0186] Formula (14)
[0187] In formula (14), the fused luminance histogram distribution uses the normalized luminance histogram distribution of the long frame, which includes the normalized luminance histogram distribution of all luminance levels except the highest luminance level, while the exposure of the short frame is the same as that of the long frame. Therefore, the normalized luminance histogram distribution of the long frame is multiplied by the exposure ratio to shift or map the normalized luminance histogram distribution of the short frame to the same luminance reference as the normalized luminance histogram distribution of the long frame. Additionally, the luminance histogram distribution of the short frame... The range of brightness levels represented by a partial brightness level overlaps with the range of brightness levels represented by the brightness histogram distribution of a long frame, so this part is deducted in formula (14).
[0188] For example, step 2 can be an example of step S320.
[0189] Step 3: After obtaining the fused brightness histogram distribution H(l), the proportion of bright areas can be calculated using formulas (15) and (16) respectively. and dark area ratio :
[0190] Formula (15)
[0191] Formula (16)
[0192] in, Low brightness threshold; This refers to the brightness threshold. In some cases, the low brightness threshold and high brightness threshold can be determined based on the sensitivity of the image sensor used and by considering the image quality changes caused by switching to wide dynamic range mode. In some examples, It can be 5~20, It can be 650~1000.
[0193] For example, step 3 can be an example of step S330.
[0194] Step 4: The unit average brightness of the brightness maps of long and short frames can be calculated based on formula (17) to obtain the comprehensive unit average brightness. :
[0195]
[0196] Formula (17)
[0197] in, and These represent the number of pixels in a long frame or a short frame, respectively. and These represent the brightness levels of each pixel in both long and short frames. The average brightness per unit of a long frame. This represents the average brightness per unit of a short frame.
[0198] For example, step 4 can be an example of obtaining the average brightness per unit.
[0199] Step 5: Obtain the proportion of bright areas and / or percentage of dark areas and average brightness per unit After that, at predetermined intervals, the percentage of the lit area will be adjusted accordingly. and / or percentage of dark areas and average brightness per unit One or more of the criteria are used to determine whether at least one of the conditions for switching to wide dynamic range mode is met. If the same condition for switching to wide dynamic range mode is met consecutively a predetermined number of times, then the system can switch to wide dynamic range mode. In some examples, the predetermined time can be 100~1000 ms, and the predetermined number of times can be 10~20.
[0200] For example, one condition for switching to wide dynamic range mode is the proportion of bright areas. Less than the threshold for the proportion of the second bright area And the proportion of dark areas Less than the threshold for the proportion of the second dark area This could correspond to a condition for switching to a wide dynamic range mode. For example, the threshold for the proportion of the second bright area. The threshold value can be between 0.06 and 0.1, representing the proportion of the second dark area. It can be 0.02~0.06.
[0201] For example, one condition for switching to wide dynamic range mode is the proportion of dark areas. Less than the third dark area percentage threshold For example, the threshold for the proportion of the third dark area. It can be 0.001 to 0.005.
[0202] For example, one condition for switching to wide dynamic range mode is the overall average brightness per unit. Less than the second average brightness threshold For example, the second average brightness threshold. It can be between 20,000 and 40,000.
[0203] For example, step 5 can be an example of step S340.
[0204] The foregoing describes the control method and exemplary steps for entering wide dynamic range mode, and the control method and exemplary steps for exiting wide dynamic range mode. The following describes the mechanism that can be equally applied to the control method and exemplary steps for entering wide dynamic range mode, and to both.
[0205] The inventors of this disclosure recognized during their research that repeated switching of shooting modes would lead to high power consumption of the imaging device and potentially cause the captured image to flicker, thus reducing the user's shooting experience.
[0206] In view of this, in some embodiments, the shooting mode control method may further include: in response to a switch from a first shooting mode to a second shooting mode, determining the length of a switching interval between the switch from the first shooting mode to the second shooting mode and the previous switch from the second shooting mode to the first shooting mode; counting the number of times the switching interval length is less than a switching interval length threshold; in response to the count value being greater than a locking count threshold, locking the imaging device to a normal mode; and in response to locking the imaging device to a normal mode, suspending the step of determining whether at least one of the switching conditions is met based at least on the proportion of bright areas and / or the proportion of dark areas. For ease of description, this step will be referred to as the "locking" mechanism below.
[0207] In this embodiment, the shooting mode is locked by determining that the number of times the switching interval between two adjacent switches is less than a switching interval length threshold exceeds a lock count threshold. For example, the shooting mode is locked to normal mode. This avoids the high power consumption caused by repeated switching of shooting modes and improves the user's shooting experience. In addition, in this embodiment, after locking to normal mode, the determination of whether the conditions for switching to wide dynamic range mode are met can be temporarily suspended, further reducing power consumption.
[0208] In some examples, the switching interval length threshold can be 60 seconds, and the lock count threshold can be 5.
[0209] It is worth noting that in this embodiment, the normal mode is universal because it has general shooting parameters that take into account various shooting scenarios. Locking the shooting mode to the normal mode allows the user to obtain satisfactory or relatively satisfactory images in various scenarios. Additionally or alternatively, the shooting mode of the imaging device can be locked to HDR mode. For example, the normal mode or HDR mode can be set as the default mode of the imaging device, and the shooting mode can be locked to this default mode. Alternatively, the shooting mode can also be locked to the current shooting mode. For example, if the lock is triggered when the imaging device is in normal mode, the normal mode can be maintained; if the lock is triggered when the imaging device is in HDR mode, the HDR mode can be maintained, thus avoiding further switching of shooting modes and reducing power consumption.
[0210] The above describes how the imaging device enters a locked state to prevent repeated switching of shooting modes. To continue using the shooting mode switching function, the method for unlocking the locked state is described below.
[0211] In some embodiments, the shooting mode control method may further include: in response to at least one of the following, continuing to perform the step of determining whether at least one of a switching condition is met based on the proportion of bright areas and / or the proportion of dark areas: the imaging device has been locked in normal mode for a lock time length threshold; or the difference between the average brightness of the currently acquired image frame and the average brightness of the locked image frame when the imaging device is locked in normal mode is greater than an unlock brightness threshold. For ease of description, this step will be referred to below as the "unlocking mechanism".
[0212] Since a lock time exceeding a lock time length threshold can correspond to a change in the shooting scene, and a change in the average brightness of the current image frame compared to the average brightness of the locked image frame exceeding a certain threshold can correspond to a significant change in the shooting scene, the above embodiments can effectively unlock the device, allowing it to resume the step of checking whether the conditions for switching to wide dynamic range mode are met. In some examples, the lock time length threshold can be 5 to 12 hours. Of course, the embodiments disclosed herein are not limited to this; for example, the lock time length threshold can be adjusted for different similar imaging devices.
[0213] Furthermore, to accurately reflect the brightness characteristics of the shooting scene, the average brightness of the current image frame can be the unit average brightness of the current image frame, and the average brightness of the locked image frame can be the unit average brightness of the locked image frame. For example, the unit average brightness of the current image frame and the unit average brightness of the locked image frame can be obtained using formula (8) (for entering wide dynamic range mode) and formula (17) (for exiting wide dynamic range mode). In some examples, the unlock brightness threshold is 200,000~1,000,000.
[0214] At least one embodiment of this disclosure also provides a computer program product having instructions stored thereon that, when executed by a processor, cause the shooting mode control method according to at least one embodiment of this disclosure to be performed.
[0215] At least one embodiment of this disclosure also provides an imaging device. Figure 8 A schematic diagram of an imaging apparatus according to at least one embodiment of the present disclosure is shown.
[0216] like Figure 8 As shown, the imaging device 800 includes at least one processor 820 and a memory 810. The memory 810 stores computer-readable instructions and is communicatively connected to the processor 820. The processor 820 executes the computer-readable instructions stored in the memory 810 to implement the shooting mode control method and its additional aspects according to at least one embodiment of the present disclosure.
[0217] For example, the memory 810 and the processor 820 can communicate with each other directly or indirectly. For example, in some examples, such as... Figure 8 As shown, the imaging device 800 may also include a system bus 830, through which the memory 810 and the processor 820 can communicate with each other. For example, the processor 820 can access the memory 810 through the system bus 830. For example, in other examples, components such as the memory 810 and the processor 820 can communicate through a network on-chip (NOC) connection.
[0218] For example, processor 820 can control other components in imaging device 800 to perform desired functions. Processor 820 can be a device with data processing and / or program execution capabilities, such as a central processing unit (CPU), tensor processor (TPU), network processor (NP), or graphics processing unit (GPU), or it can be a digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0219] For example, memory 810 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, etc.
[0220] For example, one or more computer-readable instructions can be stored on memory 810, and processor 820 can execute the computer-readable instructions to perform various functions. Various application programs and various data, such as instruction processing code and various data used and / or generated by the application programs, can also be stored in the computer-readable storage medium.
[0221] For example, some computer instructions stored in memory 810 can be executed by processor 820 to perform one or more steps in the shooting mode control method described above.
[0222] For example, such as Figure 8 As shown, the imaging device 800 may also include an image sensor 835. The image sensor 835 can be used to acquire optical information of the shooting scene and output corresponding image frames.
[0223] For example, such as Figure 8 As shown, the imaging device 800 may further include an input interface 840 that allows external devices to communicate with the imaging device 800. For example, the input interface 840 may be used to receive instructions from external computer devices, users, etc. The imaging device 800 may also include an output interface 850 that enables the imaging device 800 to connect to one or more external devices. For example, the imaging device 800 can communicate via the output interface 850, etc.
[0224] It should be noted that the imaging device 800 according to at least one embodiment of the present disclosure is exemplary and not restrictive. Depending on the actual application needs, the imaging device 800 may also include other conventional components or structures. For example, in order to realize the necessary functions of the imaging device, those skilled in the art may set other conventional components or structures according to the specific application scenario. The embodiments of the present disclosure do not limit this.
[0225] At least one embodiment of this disclosure also provides a computer-readable storage medium. This computer-readable storage medium stores computer-readable instructions that, when executed by a computer (including a processor), can implement the shooting mode control method and its additional aspects according to at least one embodiment of this disclosure.
[0226] For example, one or more computer-readable instructions may be stored on a computer-readable storage medium. Some of the computer-readable instructions stored on the computer-readable storage medium may be, for example, instructions for implementing one or more steps in the methods described above.
[0227] For example, a computer-readable storage medium may include a storage component of a tablet computer, a hard disk of a personal computer, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), optical disc read-only memory (CD-ROM), flash memory, or any combination of the above computer-readable storage media, or other suitable storage media. For example, a computer-readable storage medium may include the memory 810 in the imaging device 800 described above.
[0228] In addition to the exemplary descriptions above, the following points should be noted regarding this disclosure:
[0229] (1) The accompanying drawings of the embodiments of this disclosure only involve the structures involved in the embodiments of this disclosure. Other structures can be referred to the general design.
[0230] (2) Where there is no conflict, the embodiments of this disclosure and the features in the embodiments can be combined with each other to obtain new embodiments.
[0231] The above description is merely an exemplary embodiment of this disclosure and is not intended to limit the scope of protection of this disclosure, which is determined by the appended claims.
Claims
1. A method for controlling the shooting mode of an imaging device, comprising: Obtain the brightness map of the image frame of the imaging device in the first shooting mode; The brightness map is normalized based on the exposure parameters of the image frame to determine the normalized brightness histogram distribution of the image frame. Based on the normalized brightness histogram distribution of the image frame, determine the proportion of bright areas and / or dark areas of the image frame. as well as Based at least on the proportion of bright areas and / or the proportion of dark areas, determine whether to switch the imaging device from the first shooting mode to the second shooting mode, wherein the first shooting mode and the second shooting mode are different shooting modes in high dynamic range mode and normal mode.
2. The shooting mode control method according to claim 1, wherein, The first shooting mode is the normal mode, the second shooting mode is the high dynamic range mode, and the image frame is a single image frame captured in the normal mode, and the normalized brightness histogram distribution of the image frame is a normalized brightness histogram distribution statistically analyzed for the single image frame.
3. The shooting mode control method according to claim 2, wherein, The granularity of the brightness map is pixel-level. The process of normalizing the luminance map based on the exposure parameters of the image frame to determine the normalized luminance histogram distribution of the image frame includes: The brightness map of the individual image frame is normalized based on the exposure parameters of the individual image frame to obtain the normalized brightness map of the individual image frame; and The brightness levels of the normalized brightness map are statistically analyzed at the pixel level to obtain the normalized brightness histogram distribution of the individual image frame.
4. The shooting mode control method according to claim 3, wherein, The brightness map of the individual image frame is normalized based on the exposure parameters of the individual image frame to obtain the normalized brightness map of the individual image frame, including: The normalized brightness map is obtained by dividing the brightness level of each pixel in the single image frame by the exposure parameter, wherein the exposure parameter includes at least one of exposure time and image gain.
5. The shooting mode control method according to claim 3, wherein, The brightness map of the individual image frame is normalized based on the exposure parameters of the individual image frame to obtain the normalized brightness map of the individual image frame, including: The normalized brightness map is obtained by multiplying the brightness level of each pixel in the single image frame by a magnification factor and dividing by the exposure parameters, wherein the exposure parameters include at least one of exposure time and image gain. The magnification factor is such that the result of multiplying the brightness level of each pixel by the magnification factor and dividing by the exposure parameter is an integer.
6. The shooting mode control method according to claim 2, wherein, The granularity of the brightness map is at the pixel block level. The process of normalizing the luminance map based on the exposure parameters of the image frame to determine the normalized luminance histogram distribution of the image frame includes: The brightness map of the individual image frame is normalized based on the exposure parameters of the individual image frame to obtain the normalized brightness map of the individual image frame; and The brightness levels of the normalized brightness map are statistically analyzed at the pixel block level to obtain the normalized brightness histogram distribution of the individual image frame.
7. The shooting mode control method according to claim 2, wherein, Determining whether to switch the imaging device from the first shooting mode to the second shooting mode, based at least on the proportion of bright areas and / or the proportion of dark areas, includes: In response to the bright area ratio being greater than a first bright area ratio threshold and the dark area ratio being greater than a first dark area ratio threshold, it is determined to switch the imaging device from the first shooting mode to the second shooting mode.
8. The shooting mode control method according to claim 2 further includes: The brightness map is normalized based on the exposure parameters of the individual image frame and the number of pixels in the individual image frame to obtain the unit average brightness of the individual image frame. The determination of whether to switch the imaging device from the first shooting mode to the second shooting mode, based at least on the proportion of bright areas and / or the proportion of dark areas, includes: In response to the dark area ratio being greater than a second dark area ratio threshold and the unit average brightness being greater than a first average brightness threshold, it is determined to switch the imaging device from the first shooting mode to the second shooting mode.
9. The shooting mode control method according to claim 1, wherein, The first shooting mode is the high dynamic range mode, the second shooting mode is the normal mode, and wherein... The image frames include long frames and short frames with different exposure parameters, and the normalized brightness histogram distribution of the image frames is a fused brightness histogram distribution that combines the normalized brightness histogram distributions of the long frames and the normalized brightness histogram distributions of the short frames.
10. The shooting mode control method according to claim 9, wherein, The granularity of the brightness map is pixel-level. The process of normalizing the luminance map based on the exposure parameters of the image frame to determine the normalized luminance histogram distribution of the image frame includes: The brightness maps of the long frame and the short frame are normalized according to the exposure parameters of the long frame and the exposure parameters of the short frame, respectively, to obtain the normalized brightness map of the long frame and the normalized brightness map of the short frame. The luminance levels of pixels in the long frame and the short frame are statistically analyzed at the pixel granularity to obtain the normalized luminance histogram distributions of the long frame and the short frame; and The normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame are fused to obtain the fused luminance histogram distribution.
11. The shooting mode control method according to claim 10, wherein, The fused luminance histogram distribution is obtained by fusing the normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame, including: Based on the exposure ratio of the long frame and the short frame, the normalized brightness histogram distribution of the long frame and the normalized brightness histogram distribution of the short frame are merged into the fused brightness histogram distribution.
12. The shooting mode control method according to claim 11, wherein, The fused brightness histogram distribution includes: The normalized luminance histogram distribution of the long frame corresponding to the first luminance level interval; and The offset normalized brightness histogram distribution is obtained by multiplying the normalized brightness histogram distribution of the short frame corresponding to the second brightness level range by the exposure ratio.
13. The shooting mode control method according to claim 9, wherein, The granularity of the brightness map is at the pixel block level. The process of normalizing the luminance map based on the exposure parameters of the image frame to determine the normalized luminance histogram distribution of the image frame includes: The brightness maps of the long frame and the short frame are normalized according to the exposure parameters of the long frame and the exposure parameters of the short frame, respectively, to obtain the normalized brightness map of the long frame and the normalized brightness map of the short frame. The brightness levels of pixel blocks in the long frame and the short frame are statistically analyzed at the pixel block granularity to obtain the normalized brightness histogram distribution of the long frame and the normalized brightness histogram distribution of the short frame; and The normalized luminance histogram distribution of the long frame and the normalized luminance histogram distribution of the short frame are fused to obtain the fused luminance histogram distribution.
14. The shooting mode control method according to claim 9, wherein, Determining whether to switch the imaging device from the first shooting mode to the second shooting mode, based at least on the proportion of bright areas and / or the proportion of dark areas, includes: In response to at least one of the following, it is determined to switch the imaging device from the first shooting mode to the second shooting mode: The proportion of bright areas is less than the second bright area proportion threshold and the proportion of dark areas is less than the second dark area proportion threshold; or The proportion of the dark area is less than the threshold for the proportion of the third dark area.
15. The shooting mode control method according to claim 10, further comprising: The brightness map of the long frame is normalized based on the exposure parameters of the long frame and the total number of pixels in the long frame to obtain the unit average brightness of the long frame. The brightness map of the short frame is normalized based on the exposure parameters of the short frame and the total number of pixels in the short frame to obtain the unit average brightness of the short frame. as well as The average unit brightness of the long frame and the average unit brightness of the short frame are combined to obtain the comprehensive average unit brightness. The determination of whether to switch the imaging device from the first shooting mode to the second shooting mode, based at least on the proportion of bright areas and / or the proportion of dark areas, includes: In response to the fact that the average brightness of the integrated unit is less than a second average brightness threshold, it is determined to switch the imaging device from the first shooting mode to the second shooting mode.
16. The shooting mode control method according to any one of claims 1-15, wherein, Determining whether to switch the imaging device from the first shooting mode to the second shooting mode, based at least on the proportion of bright areas and / or the proportion of dark areas, includes: At predetermined intervals, it is determined whether at least one of the switching conditions is met based on the bright area ratio and / or dark area ratio; and In response to one of the at least one switching conditions being satisfied a predetermined number of times consecutively, the imaging device is switched from the first shooting mode to the second shooting mode.
17. The shooting mode control method according to any one of claims 1-15, further comprising: In response to a switch from the first shooting mode to the second shooting mode, the length of the switching interval between the switch from the first shooting mode to the second shooting mode and the last switch from the second shooting mode to the first shooting mode is determined. The number of times the switching interval length is less than the switching interval length threshold is counted. In response to the count value being greater than the lock count threshold, the imaging device is locked to the normal mode; as well as In response to locking the imaging device into the normal mode, the step of determining whether at least one of the switching conditions is met is suspended, based at least on the proportion of bright areas and / or the proportion of dark areas.
18. The shooting mode control method according to claim 17, further comprising: In response to at least one of the following, the step of determining whether at least one of the switching conditions is met based on the bright area ratio and / or dark area ratio continues: The imaging device has been locked to the normal mode for a lock time length threshold. or The difference between the average brightness of the currently acquired image frame and the average brightness of the locked image frame when the imaging device is locked in the normal mode is greater than the unlock brightness threshold.
19. An imaging device, comprising: At least one processor; as well as Memory; wherein, The memory stores computer-readable instructions and is communicatively connected to the at least one processor; The at least one processor is configured to execute the computer-readable instructions stored in the memory to implement the shooting mode control method according to any one of claims 1-18.
20. A computer program product having instructions stored thereon, which, when executed by a processor, cause the shooting mode control method according to any one of claims 1-18 to be performed.