Image Exposure Method and Related Devices

By determining the exposure value deviation during the automatic exposure process and adjusting the metering strategy, the problem of inaccurate exposure is solved, more accurate image exposure is achieved, and image quality and user experience are improved.

CN119521007BActive Publication Date: 2025-07-11HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510061285.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-07-11
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

The prior art is prone to inaccurate exposure problems during automatic exposure, which leads to overexposed or insufficient exposure of images, affecting the user experience.

Method used

By acquiring the target image, determining the exposure value deviation, adjusting the metering strategy according to the exposure value deviation, accurately calculating the exposure parameters, and performing image exposure processing.

Benefits of technology

It improves the accuracy of image exposure, reduces inaccurate exposure, and improves the display effect and user experience of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119521007B_ABST
    Figure CN119521007B_ABST
Patent Text Reader

Abstract

The present application provides an image exposure method and related devices. In this method, the metering strategy matching the current scene is re-determined based on the exposure value deviation of the current scene, so as to obtain more accurate metering information. Thus, after using this metering information to perform exposure processing on the image, an image with more appropriate brightness and better imaging quality can be obtained, and the situation of large-area overexposure of the image can be reduced. Specifically, since the exposure value deviation is used to measure the difference between the exposure amount required for accurate exposure of the target image and the current exposure amount, the larger the exposure value deviation, the greater the possibility of inaccurate exposure (such as large-area overexposure) after exposure according to the current exposure amount. At this time, the metering strategy should be adjusted in a timely manner to obtain more accurate exposure parameters and improve the final imaging quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of camera technology, and particularly relates to an image exposure method and related devices. Background Art

[0002] Cameras are usually installed on electronic devices. Users can use the camera application to call the camera on the electronic device to take pictures, such as taking photos or videos through the camera application. With the development of technology, more and more electronic devices have the function of automatic exposure. After the automatic exposure function is turned on, the electronic device can autonomously control the exposure parameters according to the brightness of the currently captured image, so as to adjust the exposure amount to an appropriate range, making the brightness of the image captured according to the adjusted exposure parameters suitable for human eyes to view.

[0003] However, due to the fact that the actual shooting scene may be relatively complex, when the electronic device takes pictures through the automatic exposure technology, there are sometimes situations where the exposure is inaccurate, such as overexposure of the image, which affects the user experience. Summary of the Invention

[0004] Embodiments of this application provide an image exposure method and related devices, which can improve the accuracy of image exposure and reduce the situation of inaccurate exposure (such as overexposure).

[0005] In a first aspect, an image exposure method is provided, which is applied to an electronic device. The method includes: obtaining a target image, determining an exposure value deviation of the current shooting scene according to the target image, then determining a metering strategy according to the exposure value deviation, processing the target image according to the metering strategy to obtain metering information, and then determining target exposure parameters according to the metering information. Finally, perform exposure processing on the target image according to the target exposure parameters. Among them, the above exposure value deviation is used to measure the difference between the exposure amount required for accurate exposure of the target image and the current exposure amount.

[0006] In the above solution, the exposure parameters are determined based on the exposure value deviation. The exposure amount represents the light received by the photosensitive element of the camera and is determined by exposure parameters such as exposure time, aperture size, and gain. The larger the exposure amount, the higher the brightness of the captured image; conversely, the smaller the exposure amount, the lower the brightness of the captured image. The standard exposure amount in this application refers to the currently used exposure amount, or the exposure amount determined according to the original image, or the exposure amount determined after analyzing and processing the original image using a preset algorithm. The target exposure amount in this application refers to the exposure amount determined according to the target image, or the exposure amount required for accurate exposure of the target image.

[0007] The exposure value deviation is used to measure the difference between the exposure amount required for accurate exposure of the target image and the current exposure amount. Or rather, the above exposure value deviation is used to measure the difference in exposure values between accurate exposure and inaccurate exposure of the target image. Therefore, the larger the exposure value deviation, the greater the likelihood of inaccurate exposure (such as large-area overexposure) after exposure according to the current exposure amount. At this time, the metering strategy should be adjusted in a timely manner to obtain more accurate exposure parameters and improve the final imaging quality. If the exposure value deviation is small, it indicates that the likelihood of inaccurate exposure (such as large-area overexposure) after exposure according to the current exposure amount is small. At this time, the original metering strategy can be adopted, that is, no exposure correction is required, thus saving resources.

[0008] It can be understood that the current exposure amount refers to the exposure amount determined after metering the target image according to the current metering strategy (or the preset metering strategy) (the exposure amount is calculated from the exposure parameters).

[0009] It can also be understood that the electronic device involved in the embodiments of the present application can be any type of electronic device, and the electronic device can use a camera for shooting, where the camera can be a built-in camera of the electronic device or an external camera of the electronic device, which is not limited in this application.

[0010] Optionally, in a possible implementation, obtaining the target image may refer to processing the original image according to the target zoom ratio to obtain the target image. Here, the target zoom ratio is greater than 1, that is, the target image is an image obtained by magnifying the original image. That is, the solution of the present application is applicable to the scenario of image zoom magnification. The specific method of zooming is not limited in this application. In a possible example, zooming can be performed by the method of digital cropping.

[0011] It should be understood that the above original image can be a RAW domain image, which is an image collected by the image sensor in the camera. Therefore, the resolution of the original image is determined by the parameters of the image sensor itself.

[0012] Optionally, in a possible implementation, the current ambient brightness is lower than a preset threshold. That is, the solution of the present application is applicable to the night shooting scenario.

[0013] Optionally, in a possible implementation, the electronic device is currently in the night shooting mode. The night shooting mode refers to a mode on the electronic device dedicated to shooting images or videos at night.

[0014] As an example, in some shooting scenarios, there are sometimes situations where the brightness distribution is uneven, or the brightness difference between different regions is large (i.e., some regions are too bright and some regions are too dark). If the target image is exposed according to the existing strategy, it is easy to have inaccurate exposure, such as overexposure or underexposure, which affects the user experience. By calculating the exposure value deviation, such a scenario can be calibrated, so that the metering strategy can be adjusted in a timely manner. As a result, after using the metering information to expose the image, an image with more appropriate brightness and better imaging quality can be obtained, and the situation of large-area overexposure of the image can be reduced.

[0015] Combined with the first aspect, in a certain implementation manner of the first aspect, determining the exposure value deviation according to the target image includes: dividing the target image into M grids, where M is an integer greater than 1; determining the exposure value deviation according to the dynamic range of each of the multiple grids.

[0016] In the above solution, the target image is divided into multiple grids. By analyzing the dynamic range of each grid, the light and dark conditions of different positions of the target image can be determined. It should be understood that the brightness value corresponding to each grid is not used here, but the dynamic range corresponding to each grid is used, because inaccurate exposure (such as overexposure) is usually caused by the large brightness difference between different regions. Therefore, the brightness value cannot reflect the brightness contrast. The above solution can more clearly reflect whether a local area is too bright or too dark by using the dynamic range of the grid, so as to determine a more accurate exposure value deviation.

[0017] It should be understood that the average brightness of the target image is determined by the brightness of all grids that make up the target image, and the brightness of each grid is usually different, that is, some are higher than the average brightness and some are lower than the average brightness. If the dynamic range of a grid is relatively large (such as exceeding a preset threshold), it means that this grid is a relatively bright or dark area compared to the entire image. The more grids with a dynamic range exceeding the preset threshold, or the larger the sum of the dynamic ranges of all grids, the more uneven the brightness distribution of the target image. At this time, the brightness difference between different regions of the target image is large, and there are local over-bright or local over-dark situations. In this case, there is a high probability of inaccurate exposure after exposing the target image in a preset manner.

[0018] The exposure value deviation can be used to measure the difference in exposure values when accurately exposing and inaccurately exposing the target image; and the size of the dynamic range of different grids in the target image is associated with the probability of inaccurate exposure. Therefore, the exposure value deviation can be determined according to the dynamic range of each grid in the target image.

[0019] This application does not limit the specific implementation method for determining the exposure value deviation according to the dynamic range. However, it should be understood that the more Grids with a dynamic range exceeding the preset threshold, or the larger the sum of the dynamic ranges of all Grids, the greater the exposure value deviation; conversely, the fewer Grids with a dynamic range exceeding the preset threshold, or the smaller the dynamic range of all Grids, the smaller the exposure value deviation.

[0020] In a possible example, the sum of all Grids can be used as the exposure value deviation.

[0021] Combined with the first aspect, in a certain implementation manner of the first aspect, M is determined according to the hardware capabilities of the electronic device, and M is less than the first threshold.

[0022] It should be understood that the number of Grids (i.e., the size of M) can be a preset value or a value determined according to the hardware capabilities of the electronic device, and this application does not limit this. That is to say, the target image can be divided into a fixed number of Grids, or the number of Grids can be flexibly set based on the hardware capabilities. However, it should be noted that the more Grids there are, the higher the accuracy of the algorithm provided by this application, and the better the final exposure effect. However, correspondingly, the device power consumption and the requirements for hardware capabilities are also higher. Therefore, when determining the size of M in this application, considering the balance between accuracy and power consumption is also required under the condition that the hardware capabilities permit, that is, controlling the value of M to be less than the first threshold. In other words, M is the maximum value that the hardware of the electronic device can support under the condition of satisfying being less than the first threshold. In this way, the balance between accuracy and power consumption can be achieved.

[0023] Combined with the first aspect, in a certain implementation manner of the first aspect, determining the exposure value deviation according to the dynamic range of each Grid among multiple Grids includes: determining the exposure value deviation according to the dynamic range of each Grid among multiple Grids and the position weight corresponding to each Grid.

[0024] Exemplarily, when a user previews an image, their line of sight usually focuses on a certain position in the image rather than being scattered across various positions. Therefore, for the target image, the impact of Grids in different regions on the user experience is different, that is, the importance of Grids in different regions is different. In view of this, the target image can be divided into multiple different regions, each region includes multiple Grids, and different position weights are assigned to each region. The position weight is used to represent the impact degree of the Grids in different regions on the exposure parameter. The greater the position weight corresponding to a region, the greater the impact of the Grids in that region on the final image exposure result. In this way, a relatively large position weight can be assigned to the region with high user attention, and a relatively small position weight can be assigned to the region with low user attention, so that the calculated exposure value deviation is more accurate. After automatically exposing the target image according to the exposure value deviation, the display effect of the obtained image is better, more suitable for human eyes to view, thus improving the user experience.

[0025] This application does not limit the specific implementation manner of determining the exposure value deviation based on the dynamic range and position deviation of the grid. In one example, the exposure value deviation can be determined using the following formula:

[0026] ;

[0027] where evd represents the exposure value deviation, M is the number of Grids in the target image, evd i represents the exposure value deviation of the i-th Grid among the M Grids, and pos_wt i represents the position weight corresponding to the i-th Grid. In one example, the dynamic range of the i-th Grid can be used as the exposure value deviation of the i-th Grid.

[0028] Combined with the first aspect, in a certain implementation manner of the first aspect, the method further includes: dividing the target image into multiple regions according to pre-configured information, each region includes multiple Grids, the distance of each region from the center point of the target image is different, and the position weight corresponding to each region is also different, and the distance from the center point and the position weight are inversely proportional; determining the position weight corresponding to each Grid according to the region where each Grid is located.

[0029] In the above solution, the division method of the region and the allocation method of the weight can be written in advance in the pre-configured information. After obtaining the target image, the target image can be directly divided into multiple regions according to the pre-configured information, and different position weights are assigned to each region according to the pre-configured information. This way can improve the execution efficiency of this solution, reduce the jitter of the shooting screen, and improve the user experience. The following makes an exemplary description of an implementation manner indicated by the configuration item information.

[0030] Exemplarily, in most cases, when a user observes an image, most of their attention will be focused on the center of the image. For example, when the object located at the center of the target image is overexposed, the user will immediately notice this when observing the image, which will have a relatively large impact on the user experience. On the other hand, if the object at the center of the target image is accurately exposed while the object at the edge of the image is overexposed, the impact on the user experience will be much smaller. Based on this analysis, a larger position weight can be assigned to the central region of the target image, and a smaller weight can be assigned to the edge region of the target image. In this way, the calculated exposure value deviation can be made more accurate, and the display effect of the image obtained after automatically adjusting the exposure of the target image according to the exposure value deviation is better and more suitable for human eyes to view, thereby improving the user experience.

[0031] In combination with the first aspect, in a certain implementation of the first aspect, the method further includes: based on the artificial intelligence analysis result of the target image and / or the depth information of the target image, dividing the target image into multiple regions, each region includes multiple Grids, the degree of interest corresponding to each region is different, and the position weight corresponding to each region is also different, and the size of the position weight is proportional to the degree of interest. Further, according to the region where each Grid is located, determine the position weight corresponding to each Grid.

[0032] In the above solution, the target image can be flexibly divided into multiple regions and position weights can be assigned according to the image content in the target image. After obtaining the target image, analyze the image content in the target image, and on this basis, divide the target image into multiple regions and assign position weights according to preset rules. This way can make the region division method more in line with the current shooting scene, thereby improving the execution effect of this solution, that is, it can further improve the accuracy of the exposure value deviation calculated subsequently and further improve the display effect of the image after exposure. The following makes an exemplary description of a possible implementation.

[0033] Exemplarily, due to the complex and ever-changing shooting scenarios, for images captured in different scenarios, the content distribution therein is unpredictable. Therefore, when a user views images at different points, the distribution of their line of sight is uncertain. For example, for a landscape image, the user may focus more attention on the center of the image. However, if there is a person standing at the edge of an image, the user may focus more attention on the area where there is someone at the edge of the image. That is to say, for different images, the user's region of interest is different, and it may be in the center of the image or at the edge of the image. In this implementation, it is desired to divide the target image into different regions according to the degree of user interest. Moreover, the higher the degree of user interest in a region, the greater the position weight assigned to that region. In this way, the calculated exposure value deviation can be made more accurate and more in line with the user's visual experience. After performing automatic exposure processing on the target image according to the exposure value deviation, the display effect of the obtained image is better and more suitable for viewing by the human eye, thus improving the user experience.

[0034] Combined with the first aspect, in a certain implementation of the first aspect, determining the exposure value deviation according to the dynamic range of each Grid among multiple Grids and the position weight corresponding to each Grid includes: determining the exposure value deviation according to the dynamic range of each Grid among multiple Grids, the position weight corresponding to each Grid, and one or more of the following parameters: oversaturation ratio, zoom magnification, ambient brightness; wherein, the oversaturation ratio is the proportion of Grids with a dynamic range exceeding a second threshold among all Grids of the target image; the zoom magnification is the zoom magnification used when acquiring the target image, and the target image is obtained by zooming and magnifying the original image using the zoom magnification; the ambient brightness is the brightness of the surrounding environment of the current shooting scene.

[0035] Exemplarily, the over-saturation ratio refers to the proportion of Grids in the target image whose dynamic range exceeds a preset threshold. Assuming that the over-saturation ratio corresponds to a first weight, and the first weight is used to determine the above-mentioned target weight, the value range of the first weight can be set between 0 and 1. As can be seen from the previous introduction, the more Grids with a dynamic range exceeding the preset threshold, the greater the exposure value deviation; on the contrary, the fewer Grids with a dynamic range exceeding the preset threshold, the smaller the exposure value deviation. Therefore, within a certain range, the over-saturation ratio should be directly proportional to the first weight; the zoom ratio refers to the zoom ratio used when obtaining the target image by zooming in on the original image. Assuming that the zoom ratio corresponds to a second weight, and the second weight is used to determine the above-mentioned target weight, the value range of the second weight can be set between 0 and 1. The ambient brightness refers to the ambient brightness of the current shooting scene. Assuming that the ambient brightness corresponds to a third weight, and the third weight is used to determine the above-mentioned target weight, the value range of the third weight can be set between 0 and 1. It should be understood that when shooting in a bright scene (i.e., relatively high ambient brightness), it is generally not easy to have inaccurate exposure situations such as overexposure of the image, while in night shooting (i.e., relatively low ambient brightness), local highlights are more likely to be overexposed. By introducing these three parameters: over-saturation ratio, zoom ratio, and ambient brightness, the accuracy of the exposure value deviation can be improved.

[0036] In combination with the first aspect, in a certain implementation manner of the first aspect, the exposure value deviation is determined according to the dynamic range of each Grid among multiple Grids, the position weight corresponding to each Grid, and one or more of the following parameters, including: determining a target weight according to one or more of the first weight, the second weight, and the third weight; wherein, the first weight is determined according to the over-saturation ratio, and within a first preset range, the over-saturation ratio is directly proportional to the first weight; the second weight is determined according to the zoom ratio, and within a second preset range, the zoom ratio is directly proportional to the second weight; the third weight is determined according to the ambient brightness, and within a third preset range, the ambient brightness is inversely proportional to the third weight; determining the exposure value deviation according to the target weight, the dynamic range of each Grid among multiple Grids, and the position weight corresponding to each Grid.

[0037] In a second aspect, an electronic device is provided, including a memory and a processor. A computer program that can run on the processor is stored on the memory. When the processor executes the computer program, the electronic device implements the steps of the method described in any one of the above first aspects.

[0038] In a third aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the above first aspects are implemented.

[0039] Fourthly, a computer program product is provided, which, when running on an electronic device, enables the electronic device to execute the method described in any one of the above first aspects.

[0040] Fifthly, a chip system is provided, which includes a processor coupled to a memory, and the processor executes a computer program stored in the memory to implement the method described in any one of the above first aspects.

[0041] Among them, the chip system can be a single chip or a chip module composed of multiple chips.

[0042] It can be understood that the beneficial effects of the above second to fifth aspects can be referred to the relevant descriptions in the above first aspect, and will not be elaborated here. Description of the Drawings

[0043] Figure 1 Shows a schematic diagram of an application scenario provided by an embodiment of the present application;

[0044] Figure 2 Shows a schematic diagram of another application scenario provided by an embodiment of the present application;

[0045] Figure 3 Shows a schematic diagram of yet another application scenario provided by an embodiment of the present application;

[0046] Figure 4 Shows an exemplary flowchart of method 200 provided by an embodiment of the present application;

[0047] Figure 5 Shows a possible example diagram of the division method of Grid provided by an embodiment of the present application;

[0048] Figure 6 Shows a possible example diagram of the division method of Grid provided by an embodiment of the present application;

[0049] Figure 7 Shows a possible example diagram of the division method of Grid provided by an embodiment of the present application;

[0050] Figure 8 Schematically shows the relationship between each parameter and the corresponding weight;

[0051] Figure 9 Shows a schematic diagram of an effect of the solution provided by an embodiment of the present application;

[0052] Figure 10 Shows a schematic diagram of an application scenario provided by an embodiment of the present application;

[0053] Figure 11The architecture diagram of the software system provided by the embodiments of the present application is shown;

[0054] Figure 12 The architecture diagram of the hardware system provided by the embodiments of the present application is shown. Detailed implementation manners

[0055] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.

[0056] Cameras are usually installed on electronic devices. Users can use the camera application to call the camera on the electronic device for shooting, such as taking pictures or recording videos through the camera application. The camera consists of devices such as a lens and a photosensitive element. During the process of the electronic device calling the camera for image acquisition, light will pass through the lens and irradiate on the photosensitive element. The amount of light received by the photosensitive element can be called the exposure amount. The exposure amount is determined by exposure parameters such as exposure time, aperture size, and gain. The larger the exposure amount, the higher the brightness of the captured image; conversely, the smaller the exposure amount, the lower the brightness of the captured image.

[0057] With the rapid development and wide application of multimedia technology and network technology, people use a large amount of image information in daily life and production activities. For different shooting scenes, for example, shooting scenes with weak light intensity and dimness, or shooting scenes with strong light intensity and extreme brightness, the electronic device can use the automatic exposure (AE) technology to automatically adjust the exposure parameters of the camera according to the brightness value of the image (affected by the intensity of external light), preventing the image from being overexposed or underexposed. Therefore, the purpose of automatic exposure is to make the image or video captured by the camera neither too dark nor too bright under different lighting conditions and scenes, that is, to make the brightness of the image captured after automatic exposure more suitable for human eyes to view and the display effect better.

[0058] As can be seen from the above introduction, the automatic exposure technology adjusts the exposure parameters to avoid the image being too bright or too dark. Among them, the exposure parameters refer to the relevant parameters that affect the exposure effect, including but not limited to: exposure time (shutter speed), aperture size, sensitivity (international standards organization, ISO), and exposure gain. The following will be introduced in turn.

[0059] The exposure time, also known as the shutter speed, represents the time interval from when the shutter opens to when it closes. The shutter is a device in the imaging equipment used to control the time for light to irradiate the photosensitive element. The larger the exposure time, the greater the light flux of the lens per unit time, and the brighter the image; the smaller the exposure time, the smaller the light flux of the lens per unit time, and the darker the image.

[0060] The aperture is a device in the lens that controls the size of the aperture through which light enters the camera. The larger the aperture, the larger the light-passing aperture, and the greater the light flux of the lens per unit time, resulting in a higher picture brightness. Correspondingly, the smaller the aperture, the smaller the light-passing aperture, and the smaller the light flux of the lens per unit time, resulting in a lower picture brightness. It can be understood that for some types of electronic devices (such as mobile phones), the aperture size is fixed. At this time, the brightness of the image obtained by exposure can be changed by adjusting other exposure parameters such as the exposure time and ISO.

[0061] The sensitivity (ISO), also known as the photosensitivity, refers to the intensity of incident light sensed by the photosensitive device of the camera (such as a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS)) and related electronic circuits. ISO is achieved by adjusting the sensitivity of the photosensitive device or combining photosensitive points, that is, by increasing the light sensitivity of the photosensitive device or combining several adjacent photosensitive points to achieve the purpose of increasing ISO. ISO determines the amount of light required to record an image and the time the shutter needs to be open. A lower ISO means that for taking an image, the photosensitive element requires a longer exposure time or more light; on the contrary, a higher ISO means that the photosensitive element requires less light and a shorter exposure time.

[0062] Exposure gain (gain): The exposure gain can be simply referred to as gain, and its magnitude is related to the sensitivity. A high gain represents high sensitivity, and the higher the gain, the more sensitive it is to low light. Since the noise signal is also amplified during the process of amplifying the image signal, the amplifier gain is usually set to the minimum. The gain can be increased when the ambient light is dim, the image signal is weak, and the exposure time does not want to be increased. Generally speaking, the gain range provided by digital cameras can be from 1000 to 128000.

[0063] It can be understood that the electronic device involved in the embodiments of the present application can be any type of electronic device, and the electronic device can use a camera for shooting. The camera can be a built-in camera of the electronic device or an external camera of the electronic device, which is not limited in the present application. The electronic device in the present application can be, for example, a mobile phone (including a folding-screen mobile phone and a straight-board mobile phone), a digital camera, a tablet computer, a desktop computer (desktop computer), a handheld computer, a laptop computer (laptop computer), an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, etc. The specific form of the electronic device is not particularly limited in the embodiments of the present application.

[0064] Taking a mobile phone as an example, an exemplary introduction is given to a shooting scenario provided by the embodiments of the present application.

[0065] Figure 1 In (a) therein, an exemplary user interface 11 for displaying the application programs installed on the mobile phone 100 is exemplarily shown.

[0066] It can be understood that the term "user interface" involved in the embodiments of the present application is a media interface for interaction and information exchange between an application program or an operating system and a user, and it realizes the conversion between the internal form of information and the form acceptable to the user. The common manifestation form of the user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations displayed in a graphical manner. It can be an interface element such as an icon, a window, a control, etc. displayed on the display screen of the electronic device, and the control can include visible interface elements such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.

[0067] As Figure 1 shown in (a) therein, the user interface 11 displays a page with application icons placed thereon. The page may include multiple application icons (for example, a clock application icon, a calendar application icon, a gallery application icon, a memo application icon, a file management application icon, an email application icon, a music application icon, etc.). A page indicator may also be displayed below the above-mentioned multiple application icons to indicate the positional relationship between the currently displayed page and other pages. There are multiple application icons (for example, a camera application icon 111, a contacts application icon, a phone application icon, an information application icon) below the page indicator. The application icons remain displayed during page switching.

[0068] It is understandable that the camera application icon 111 is the icon of the camera application. The camera application icon 111 can be used to trigger the start of the camera application. The camera application is an image capture application on electronic devices such as smartphones and tablets, and the name of this application is not restricted in this application.

[0069] It should be noted that Figure 1 The user interface 11 shown in (a) in

[0070] is only an example provided by this application and should not be regarded as a limitation to this application. That is to say, the user interface 11 can display more or less content, and this application does not make any restrictions on this. Figure 1 The mobile phone 100 can detect a user operation (such as a touch / click operation) on the camera application icon 111. In response to this operation, the mobile phone 100 can display

[0071] the user interface 12 shown in (b) in

[0072] As Figure 1 shown in (b) in

[0073] The user interface 12 can include a preview area 121, a zoom control 122, a parameter adjustment area 123, a camera mode option 124, a camera mode indication control 125, a shutter control 126, an album shortcut control 127, a camera flip control 128, etc.

[0074] The preview area 121 can be used to display a preview image. This preview image is an image captured in real time by the camera of the mobile phone 100. The mobile phone 100 can refresh the display content in the preview area 121 in real time to facilitate the user to preview the image currently captured by the camera.

[0075] Multiple shooting parameter setting controls (referred to as parameter controls for short) can be displayed in the parameter adjustment area 123. One parameter control is used to set a type of parameter of the camera, thereby changing the image captured by the camera. For example, the parameter adjustment area 123 can display parameter controls such as aperture, flash, intelligent mode control, and filter. The aperture can be used to adjust the aperture size of the camera, thereby changing the picture brightness of the image captured by the camera; the flash can be used to turn on or off the flash, thereby changing the picture brightness of the image captured by the camera; the intelligent mode control can be used to turn on the artificial intelligence shooting mode, and this mode can automatically select shooting parameters based on artificial intelligence; the filter can be used to select a filter style, and then adjust the image color. The parameter adjustment area 123 can also include a setting control. The setting control can be used to provide more controls for adjusting the shooting parameters of the camera or the image optimization parameters.

[0076] One or more shooting mode options can be displayed in the camera mode option 124. These one or more shooting mode options can include: night scene mode option, intelligent portrait mode option, photo shooting mode option, video recording mode option, and more options. It can be understood that these one or more shooting mode options can be presented as text information on the interface, such as "Night Scene", "Portrait", "Photo", "Video", "More", and can also be presented as icons or other forms of interactive elements (interactive element, IE), and this application does not limit this.

[0077] The camera mode indication control 125 is used to indicate the current shooting mode. For example, if the text information corresponding to the camera mode indication control 125 is "Photo", it means that the current shooting mode is the default photo shooting mode.

[0078] The album quick control 127 can be used to open the album application. In response to a user operation (such as a touch / click operation) on the album quick control 127, the mobile phone 100 can open the album application.

[0079] The shutter control 126 can be used to monitor the user operation that triggers taking a photo. The mobile phone 100 can detect the user operation acting on the shutter control 126. In response to this operation, the mobile phone 100 can process the preview image in the preview area 121 and save it as a picture in the album application. In addition, the mobile phone 100 can also display a thumbnail of the saved image in the album quick control 127. That is to say, the user can trigger taking a photo by operating on the shutter control 126. It can be understood that the shutter control 126 can be a button or other forms of controls, and this application does not limit this.

[0080] The camera flip control 128 can be used to monitor user operations that trigger the flipping of the camera. The mobile phone 100 can detect a user operation acting on the camera flip control 128, such as a touch operation. In response to this operation, the mobile phone 100 can flip the camera used for shooting, for example, switch the rear camera to the front camera, or switch the front camera to the rear camera.

[0081] The user interface 12 may also include more or fewer controls, which are not limited in the embodiments of the present application.

[0082] Figure 2 An actual shooting scene in which the mobile phone 100 provided in the embodiments of the present application is located is shown. As Figure 2 shown, it is currently in a night scene and the ambient brightness is relatively low. The user turns on the camera application in the mobile phone 100 and aims the camera of the mobile phone 100 at the current scene. The mobile phone 100 can display the user interface 13 as shown in Figure 3 (a) of. The preview area of the user interface 13 displays a preview image. It can be understood that the preview image is an image obtained by automatically exposing the original image captured by the camera based on the automatic exposure technology. From Figure 2 it can be seen that the current shooting scene is relatively dark. Therefore, the automatic exposure technology will adjust the exposure parameters to increase the overall brightness of the preview image.

[0083] As can be seen from the previous introduction, the automatic exposure technology is a technology that automatically adjusts the image brightness by automatically determining the exposure parameters. By adjusting the exposure amount to a suitable position through the automatic exposure technology, the image captured according to the adjusted exposure parameters has an appropriate brightness and is suitable for human eyes to view. At this time, it can be called "accurate exposure". However, in some shooting scenes, due to the uneven brightness distribution in the shooting scene or the relatively large difference in the dynamic range of different regions, the exposure amount determined by the automatic exposure technology may not be appropriate, and the image captured according to the adjusted exposure parameters may have a situation of local overexposure or local underexposure (such as overexposure in the light-emitting area), which is not suitable for human eyes to view. At this time, it is called "inaccurate exposure" or "non-accurate exposure".

[0084] For example, Figure 3The preview image shown in (a) includes a light board 131, and the glowing text "Happy Hotel" is included on the light board 131. Since the brightness of the light board 131 is much higher than the brightness of the surrounding environment, when the entire image is uniformly exposed, the brightness of the surrounding environment is increased. However, for the light board 131, the exposure intensity may be too high, which may cause overexposure of the text on the light board 131, affecting the display effect of the image. Especially in the zoom scenario, the impact of inaccurate exposure on the image quality is particularly obvious. Specifically, for example, the user can detect a user operation (such as a click / slide operation) on the zoom control 132. In response to this operation, the mobile phone 100 can display Figure 3 the user interface 14 shown in (b). In the preview area of the user interface 14, a preview image after zoom magnification is displayed, and the zoom ratio is displayed in the zoom control 142 (as shown in the figure, "5×" represents a zoom ratio of 5). After the light board 131 in the user interface 12 is zoomed in, it becomes the light board 141 in the user interface 14. As can be seen from the figure, the glowing text in the zoomed light board 141 shows obvious overexposure (the overexposure effect in the figure is only for illustration), and the imaging quality is poor, affecting the user experience.

[0085] It can be understood that Figures 1 - 3 the scene applicable to the embodiments of the present application is described by taking the photographing scene as an example, but the present application is not limited thereto. For example, the present application can also be applicable to the video recording scene, which will not be described in detail here.

[0086] Based on the above content, the present application provides an image exposure method. In this method, the metering strategy matching the current scene is re-determined through the exposure value deviation of the current scene, so as to obtain more accurate metering information. Thus, after using this metering information to perform exposure processing on the image, an image with more appropriate brightness and better imaging quality can be obtained, reducing the situation of large-area overexposure of the image. The following combines Figure 4 method 200 in to detail the specific implementation process of the image exposure method provided by the embodiments of the present application. It should be understood that method 200 is executed by an electronic device, and this electronic device can provide a shooting service for the user through a camera.

[0087] S210. Obtain a target image.

[0088] Exemplarily, the target image in the embodiments of the present application refers to the image to be exposed, which can be the original image captured by the camera or the image obtained after zoom magnification of the original image. The present application does not make any limitation thereto.

[0089] The following mainly takes the second scenario (that is, the target image is obtained after zoom magnification of the original image) as an example for description.

[0090] It should be understood that the above-mentioned original image is, for example, a RAW domain image, which is an image captured by an image sensor in a camera. Therefore, the resolution of the original image is determined by the parameters of the image sensor itself. For the convenience of description, the size of the entire picture of the original image is denoted as X*Y.

[0091] The electronic device can process the original image based on the target zoom ratio to obtain a target image. Here, the target zoom ratio can be the multiple by which the user selects the image to be zoomed, and the target zoom ratio can be obtained based on the user's zoom operation, or it can be the target zoom ratio automatically set by the electronic device system.

[0092] In an exemplary scenario, the target zoom ratio is greater than 1, that is, the target image is an image obtained by zooming in and magnifying the original image, because the problem of image overexposure usually appears in the scenario of image magnification.

[0093] This application does not limit the specific method of zooming. In a possible example, zooming can be performed by the method of digital cropping. Assuming that the target zoom ratio is n, the zooming process can be regarded as cropping out a target image with a size of x*y from the original image with a size of X*Y, where x = X / n and y = Y / n.

[0094] S220. Determine the exposure value deviation of the current shooting scene according to the target image.

[0095] Exemplarily, after the electronic device obtains the target image, it determines the exposure value deviation (EVD) of the current shooting scene according to the target image, and this exposure value deviation represents the difference between the target exposure amount and the standard exposure amount.

[0096] Among them, the exposure amount represents the light received by the photosensitive element of the camera and is determined by exposure parameters such as exposure time, aperture size, and gain. The larger the exposure amount, the higher the brightness of the captured image; conversely, the smaller the exposure amount, the lower the brightness of the captured image.

[0097] The standard exposure amount in this application refers to the currently used exposure amount, or the exposure amount determined according to the original image, or the exposure amount determined after analyzing and processing the original image using a preset algorithm.

[0098] The target exposure amount in this application refers to the exposure amount determined according to the target image, or the exposure amount that needs to be used for accurate exposure of the target image.

[0099] Therefore, the above exposure value deviation can be used to measure the difference in exposure values when accurately exposing and inaccurately exposing the target image. If the difference value is small, no exposure correction is required, that is, the target image can be exposed according to the standard exposure amount; if the difference value is large, it means that if no exposure correction is performed, the image obtained after the exposure process may be overexposed. For the specific solution, please refer to the description in the subsequent step S240, which will not be elaborated here for the time being.

[0100] It should be understood that the purpose of determining the exposure value deviation in this application is to accurately expose the target image subsequently, that is, to determine the target exposure amount. Therefore, it is impossible to use the definition of the exposure value deviation to determine the exposure value deviation here. Therefore, this application hopes to infer the magnitude of the exposure value deviation through the relevant parameters of the target image and / or environmental parameters. An exemplary description of a possible implementation method is given below.

[0101] In a possible implementation method (denoted as Solution 1), the target image is divided into multiple grids (Grids), and the exposure value deviation is determined according to the dynamic range of each Grid in the target image.

[0102] Exemplarily, the target image is divided into M grids (Grids), where M is an integer greater than 1. The purpose of dividing the Grid is to analyze the brightness and darkness of different positions of the target image. If the pixels of the target image are directly analyzed, the computational complexity is obviously very high, which will cause a sharp increase in the power consumption of the electronic device, and the hardware capabilities may not support it either. Therefore, the target image can be divided into M Grids, and each Grid includes multiple pixels. Therefore, the process of dividing the Grid can also be regarded as a downsampling process of the target image.

[0103] It should be understood that the number of Grids (i.e., the size of M) can be a preset value or a value determined according to the hardware capabilities of the electronic device, and this application does not limit this. That is to say, the target image can be divided into a fixed number of Grids, or the number of Grids can be flexibly set based on the hardware capabilities. However, it should be noted that the more the number of Grids, the higher the accuracy of the algorithm provided by this application, and the better the final exposure effect, but correspondingly, the device power consumption and the requirements for hardware capabilities are also higher. Therefore, when determining the size of M in this application, the balance between accuracy and power consumption needs to be considered under the condition that the hardware capabilities permit, and the specific method is not limited here.

[0104] Take Figure 5 as an example to show the division method of the Grid: Assume Figure 5 in (a) shows the target image, and the target image can be divided into a×b Grids (such as Figure 5as shown in (b) therein, that is, after division, the target image is composed of a×b Grids. It should be understood that A = a×b.

[0105] It should be noted that Figure 5 the division method of the Grid shown in (b) therein is only an example and does not limit this application. In one implementation, a is 60 and b is 48 above.

[0106] After dividing the target image into M Grids, the exposure value deviation is further determined according to the dynamic range of each Grid.

[0107] Among them, the dynamic range of the Grid is used to represent the deviation of the brightness of this Grid from the average brightness of the target image. For example, the dynamic range of a Grid is the absolute value of the difference between the brightness of this Grid and the average brightness of the target image.

[0108] It should be understood that the average brightness of the target image is determined by the brightness of all the Grids that make up the target image, and the brightness of each Grid is usually different, that is, some are higher than the average brightness and some are lower than the average brightness. If the dynamic range of a Grid is relatively large (such as exceeding a preset threshold), it means that this Grid is a relatively bright or dark area compared to the entire image. The more Grids with a dynamic range exceeding the preset threshold, or the larger the sum of the dynamic ranges of all Grids, the more uneven the brightness distribution of the target image. At this time, the brightness difference between different areas of the target image is very large, and there is a situation of local over - brightness or local over - darkness. In this case, after exposing the target image in a preset manner, the probability of inaccurate exposure is very high.

[0109] The exposure value deviation can be used to measure the difference in exposure values when accurately exposing and inaccurately exposing the target image; and the size of the dynamic ranges of different Grids in the target image is associated with the probability of inaccurate exposure. Therefore, the exposure value deviation can be determined according to the dynamic range of each Grid in the target image.

[0110] This application does not limit the specific implementation method of determining the exposure value deviation according to the dynamic range. However, it should be understood that the more Grids with a dynamic range exceeding the preset threshold, or the larger the sum of the dynamic ranges of all Grids, the larger the exposure value deviation; on the contrary, the fewer Grids with a dynamic range exceeding the preset threshold, or the smaller the dynamic ranges of all Grids, the smaller the exposure value deviation.

[0111] In a possible example, the sum of all Grids can be used as the exposure value deviation.

[0112] In another possible implementation (denoted as Solution 2), the exposure value deviation is determined according to the dynamic range of each grid in the target image and the position weight corresponding to each grid.

[0113] When a user previews an image, the line of sight usually focuses on a certain position in the image rather than being scattered at various positions. Therefore, for the target image, the impact of Grids in different regions on the user experience is different, that is, the importance of Grids in different regions is different. In view of this, the target image can be divided into multiple different regions, each region includes multiple Grids, and different position weights are assigned to each region. The position weight is used to represent the impact degree of the Grids in different regions on the exposure parameter. The greater the position weight corresponding to a region, the greater the impact of the Grids in that region on the final image exposure result. In this way, a relatively large position weight can be assigned to the region with high user attention, and a relatively small position weight can be assigned to the region with low user attention, so that the calculated exposure value deviation is more accurate, and the display effect of the image obtained after automatically exposing the target image according to the exposure value deviation is better and more suitable for human eyes to view, thereby improving the user experience.

[0114] This application does not limit the specific implementation of determining the exposure value deviation according to the dynamic range of the grid and the position deviation. In one example, the exposure value deviation can be determined by the following formula:

[0115] ;

[0116] where evd represents the exposure value deviation, M is the number of Grids in the target image, evd i represents the exposure value deviation of the i-th Grid among the M Grids, and pos_wt i represents the position weight corresponding to the i-th Grid. In one example, the dynamic range of the i-th Grid can be used as the exposure value deviation of the i-th Grid.

[0117] The following uses examples to make an exemplary description of the region division method and the weight assignment method.

[0118] Example 1: The region division method and the weight assignment method can be pre-written in the pre-configuration information. After obtaining the target image, the target image is directly divided into multiple regions according to the pre-configuration information, and different position weights are assigned to each region according to the pre-configuration information. This method can improve the execution efficiency of this solution, reduce the lag of the shooting screen, and improve the user experience. The following makes an exemplary description of an implementation method indicated by the configuration item information.

[0119] In most cases, when a user observes an image, most of their attention will be focused on the center of the image. For example, when the object located at the center of the target image is overexposed, the user will immediately notice this situation when observing the image, thus having a relatively large impact on the user experience. On the other hand, if the object at the center of the target image is accurately exposed while the object at the edge of the image is overexposed, the impact on the user experience will be relatively much smaller. Based on this analysis, a larger position weight can be assigned to the central region of the target image, and a smaller weight to the edge region of the target image.

[0120] As an example, starting from the center point of the target image, expand it according to a preset size to obtain P regions, and then assign weights to each region according to the principle that the closer to the center point, the greater the weight. Here, P is a preset value.

[0121] Figure 6 Figure (a) in Figure 6 is a schematic application diagram of Example 1, in which P is equal to 3. As shown in Figure (a) in

[0122] It should be noted that in Figure 6 the example given in Figure (a) in, taking P equal to 3 as an example, but this application is not limited to this. The target image can be divided into two regions according to actual needs, or it can be divided into 4 or more regions, and this application does not make a limitation.

[0123] It should also be noted that the values of the above preset ratios and the position weight values corresponding to each region can be set according to requirements. The above is only an example and is not limited herein.

[0124] Example 2: The target image can be flexibly divided into multiple regions and position weights can be assigned according to the image content in the target image. After obtaining the target image, the image content in the target image is analyzed. On this basis, the target image is divided into multiple regions and position weights are assigned according to preset rules. This method can make the region division method more in line with the current shooting scene, thereby improving the execution effect of this solution, that is, it can further improve the accuracy of the exposure value deviation calculated subsequently and further improve the display effect of the image after exposure. An exemplary description of a possible implementation method is given below.

[0125] Since the shooting scene is complex and changeable, for images taken in different scenes, the content distribution therein is unpredictable. Therefore, when the user views different images, the distribution of the line of sight is uncertain. For example, for a landscape image, the user may focus more attention on the center of the image. However, if there is a person standing at the edge of an image, the user may focus more attention on the area where there is a person at the edge of the image. That is to say, for different images, the user's region of interest is different, and it may be in the center of the image or at the edge of the image. In this implementation method, it is desired to divide the target image into different regions according to the user's degree of interest, and the higher the user's degree of interest in a region, the greater the position weight assigned to that region. Referring to Figure 6 the example shown in (b) of , the target image is divided into a first region, a second region, and a third region according to the user's degree of interest. The degree of interest corresponding to the first region is higher than that of the second region, and the degree of interest of the second region is higher than that of the first region. Based on this, a first position weight is assigned to the first region, a second position weight is assigned to the second region, and a third position weight is assigned to the third region. The values of the first position weight, the second position weight, and the third position weight decrease in sequence. For example, the first position weight is equal to 1, the second position weight is equal to 0.5, and the third position weight is equal to 0.2.

[0126] This application does not limit the implementation method for determining the user's region of interest and non-interest region in the target image. As an example, the user's region of interest and non-interest region (or the degree of interest of different regions) can be determined based on the analysis result of the artificial intelligence model for the target image (AI Segmentation Map), or the user's region of interest and non-interest region (or the degree of interest of different regions) can be determined based on the depth information corresponding to the target image (PD Depth Map). This application does not limit this.

[0127] Understandably, Figure 5 and Figure 6 In the Grid division method for the target image described above, the size of each Grid is the same, but the present application is not limited thereto. In other words, different areas can also be divided into Grids of different sizes according to actual needs. Figure 7 (a) in the figure gives an example of Figure 6 The example given in (a) corresponds to Figure 6 In (a), starting from the center point of the target image, the image is expanded according to the preset size to obtain three regions. Among the three regions, the region closer to the center point has a larger position weight, and the region farther from the center point has a smaller position weight, that is, the importance of the first region, the second region, and the third region decreases in sequence. The first region can be divided into multiple grids according to the first preset size, the second region can be divided into multiple grids according to the second preset size, and the third region can be divided into multiple grids according to the third preset size, wherein the first preset size, the second preset size, and the third preset size increase in sequence. In other words, the division of the grid and the division of the region can be performed simultaneously. For the region with a relatively high position weight, the grid is divided according to a smaller size, and for the region with a relatively low position weight, the grid is divided according to a larger size. Since the region closer to the center has a higher importance and a greater probability of attracting the user's attention, dividing this region into a smaller grid can improve the accuracy of the acquired dynamic range and other information; while the region closer to the edge has a lower importance and a lower probability of attracting the user's attention, dividing this region into a larger grid can reduce power consumption.

[0128] Figure 7 (b) in the figure gives another example, which is similar to Figure 6 The specific implementation principle is similar to Figure 7 The example given in (a) is similar and will not be repeated here.

[0129] In yet another possible implementation (Solution 3), the exposure value deviation is determined according to the dynamic range of each grid in the target image, the position information of each grid, and the target weight.

[0130] The purpose of the embodiments of the present application is to avoid inaccurate exposure of the target image as much as possible. It should be understood that inaccurate exposure usually does not occur in most shooting scenes, but is prone to occur in some special shooting scenes, such as scenes with uneven brightness distribution or scenes with large brightness differences in different areas. For example, in Figure 2 and Figure 3In the shown scenario, when taking a night scene photo, local bright light appears, and even the image is zoomed in. At this time, it is easy to have a situation of local overexposure as shown in (b) of Figure 3 . Based on this, the present application can also introduce the concept of a target weight. This target weight is related to the current shooting scene and is used to characterize the possibility of inaccurate exposure when automatically exposing the target image taken under the current shooting scene according to the standard exposure parameters. The value range of the target weight can be set between 0 and 1. The larger the target weight, the greater the possibility of inaccurate exposure, and thus the greater the exposure value deviation; the smaller the target weight, the smaller the possibility of inaccurate exposure, and thus the smaller the exposure value deviation.

[0131] In a possible implementation manner, the target weight is determined according to one or more of the following parameters: oversaturation ratio, zoom ratio, and ambient brightness. The following will be described in turn.

[0132] Oversaturation ratio: It refers to the proportion of grids in all grids of the target image whose dynamic range exceeds a preset threshold. Assuming that the oversaturation ratio corresponds to a first weight, and the first weight is used to determine the above target weight, the value range of the first weight can be set between 0 and 1. As introduced before, the more grids whose dynamic range exceeds the preset threshold, the greater the exposure value deviation; on the contrary, the fewer grids whose dynamic range exceeds the preset threshold, the smaller the exposure value deviation. Therefore, within a certain range, the oversaturation ratio should be directly proportional to the first weight. Figure 8 Figure (a) in Figure 8 exemplarily shows a schematic diagram of the relationship between the oversaturation ratio and the first weight. As shown in (a) of

[0133] , when the oversaturation ratio is between b1 and b2, the oversaturation ratio and the first weight are in a direct proportional relationship, that is, the larger the oversaturation ratio, the larger the first weight. b1 and b2 are pre-configured thresholds. When the oversaturation ratio is less than or equal to b1, it can be considered that the influence of the oversaturation ratio can be ignored, and at this time, the first weight can be set to 0. When the oversaturation ratio is greater than or equal to b2, it can be considered that the oversaturation ratio is already too high, and the target image is likely to have a large area of overexposure, and at this time, the first weight can be set to 1.

[0133] Zoom ratio: When the target image is obtained by zooming in on the original image, the zoom ratio used. Assuming that the zoom ratio corresponds to a second weight, and the second weight is used to determine the above target weight, the value range of the second weight can be set between 0 and 1. As shown by the Figure 3 example given, the larger the zoom ratio, the more likely it is for the local bright light in the target image to be overexposed. Figure 8 Figure (b) inFigure 8 As shown in (b) thereof, when the zoom ratio is between c1 and c2, the zoom ratio and the second weight are in a direct proportional relationship, that is, the larger the zoom ratio, the larger the second weight. c1 and c2 are pre-configured thresholds. When the zoom ratio is less than or equal to c1, it can be considered that the influence of the zoom ratio can be ignored, and at this time the second weight can take a value of 0. When the zoom ratio is greater than or equal to c2, it can be considered that the zoom ratio is too high, and there is a high probability that the target image will be overexposed in a large area. At this time, the second weight can take a value of 1. That is to say, in the implementation manner of taking the zoom ratio as an influencing factor of the target weight, the solution of the present application only targets the scenario where zooming in occurs. If the image is not zoomed in, it can be considered that there will be no overexposure situation that affects the user experience, and the second weight is set to 0, resulting in the target weight being 0 and the exposure value deviation also being 0. At this time, no exposure correction is required, that is, the subsequent step S230 does not need to be executed.

[0134] Ambient brightness: refers to the ambient brightness corresponding to the current shooting scene. Assume that the ambient brightness corresponds to a third weight, and the third weight is used to determine the above-mentioned target weight. The value range of the third weight can be set between 0 and 1. It should be understood that when shooting in a bright light scene (that is, the ambient brightness is relatively high), it is generally not easy to have inaccurate exposure situations such as overexposure of the image, while in Figure 2 the night scene shooting shown (that is, the ambient brightness is relatively low), local bright light is more likely to be overexposed. Figure 8 Figure (c) therein exemplarily shows a schematic diagram of the relationship between the ambient brightness and the third weight. As Figure 8 shown in (c) therein, when the ambient brightness is between d1 and d2, the ambient brightness and the third weight are in an inverse proportional relationship, that is, the larger the ambient brightness, the smaller the third weight. d1 and d2 are pre-configured thresholds. When the ambient brightness is greater than or equal to d2, it can be considered that the ambient brightness is high enough, and the probability of inaccurate exposure such as overexposure can be ignored. At this time, the third weight can take a value of 0. When the ambient brightness is less than or equal to d1, it can be considered that the ambient brightness is low enough, and the probability of overexposure and other situations of local bright light is very high. At this time, the third weight can take a value of 1. That is to say, in the implementation manner of taking the ambient brightness as an influencing factor of the target weight, the solution of the present application only targets low-light shooting scenes such as night scenes. If shooting is performed in a bright light scene, it can be considered that there will be no overexposure situation that affects the user experience, and the third weight is set to 0, resulting in the target weight being 0 and the exposure value deviation also being 0. At this time, no exposure correction is required, that is, the subsequent step S230 does not need to be executed.

[0135] It should be understood that the present application does not limit the method for obtaining the ambient brightness. In one example, the ambient brightness can be determined according to the original image and the initial exposure parameters corresponding to the original image, and the specific implementation method is not limited in the present application. The initial exposure parameters here refer to the exposure parameters used when obtaining the original image. In another example, one or more ambient light sensors can also be used to obtain the ambient brightness.

[0136] After determining one or more of the over-saturation ratio, zoom magnification, and ambient brightness, the target weight can be determined according to one or more of these parameters. The present application does not limit the specific implementation method for determining the target weight. Assuming that in the current scene, the target weight is determined based on these three items of over-saturation ratio, zoom magnification, and ambient brightness together, the calculation can be performed according to the following formula:

[0137] ;

[0138] Wherein, wt represents the target weight, over_sat_wt represents the first weight corresponding to the over-saturation ratio, zoom_factor_wt represents the second weight corresponding to the zoom magnification, and lv_wt represents the third weight corresponding to the ambient brightness.

[0139] In one possible implementation, the dynamic range of each grid in the target image, the position information of each grid, the target weight, and the exposure value deviation satisfy the following relationship:

[0140] ;

[0141] Wherein, evd represents the exposure value deviation, wt represents the target weight, M is the number of Grids in the target image, evd i represents the exposure value deviation of the i-th Grid among the M Grids (which can be represented by the dynamic range of the i-th Grid), and pos_wt i represents the position weight corresponding to the i-th Grid.

[0142] S230. Determine the metering strategy according to the exposure value deviation.

[0143] S240. Process the target image according to the metering strategy to obtain metering information.

[0144] Exemplarily, after determining the exposure value deviation, the metering strategy is determined according to the exposure value deviation.

[0145] In one example, when the exposure value deviation is less than or equal to the first threshold, it indicates that the current is in a medium or low metering scene. At this time, a preset metering method can be used to process the target image. The preset metering strategy can be, for example, expose to the right (ETTR).

[0146] When the exposure value deviation is greater than or equal to the first threshold, it indicates that the current is in a medium-high metering scene. At this time, the corresponding metering method can be used to process the target image, such as spot metering mode, etc.

[0147] S250. Determine the target exposure parameter according to the metering information.

[0148] S260. Perform exposure processing on the target image according to the target exposure parameter.

[0149] Exemplarily, after obtaining the metering information, the corresponding target exposure parameter is determined according to the metering information. It should be understood that the metering information is used as a reference parameter for determining the exposure parameter. The target exposure parameter is used to perform automatic exposure processing on the target image.

[0150] After the electronic device processes the target image using the target exposure parameter, the obtained image can be displayed in the preview area, or the image can be saved based on a user instruction. This application does not limit this.

[0151] In summary, the embodiments of the present application provide an image exposure method. In this method, the exposure parameter matching the current shooting scene can be determined according to the exposure value deviation of the current scene, so as to achieve accurate exposure of the target image, make the image obtained after exposure more suitable for human eyes to view, and improve the user experience.

[0152] Specifically, in some shooting scenes, sometimes there will be a situation where the brightness distribution is uneven, or the brightness difference between different regions is large (that is, some regions are too bright and some regions are too dark). If the target image is exposed according to the existing strategy, it is easy to have inaccurate exposure, such as overexposure or underexposure, which affects the user experience. However, the embodiments of the present application can comprehensively determine the exposure value deviation of the current shooting scene according to one or more of the dynamic range of different Grids in the target image, the position weight of different Grids, the over-saturation ratio, the zoom ratio, the ambient brightness, etc., so that the exposure value deviation can more accurately represent the deviation between the currently used exposure parameter and the target exposure parameter. Thus, the adjustment direction of the metering strategy can be determined according to the exposure value deviation, making the metering strategy more in line with the current shooting scene, improving the exposure accuracy of the target image, and ensuring the imaging quality. The specific effect can be seen in Figure 9 : Figure 9 In (a) of Figure 3 corresponds to the content in (b) of Figure 9In (a), a night scene superimposed with a zoom scene is taken as an example for illustration. In this example, no exposure correction is performed, that is, the metering strategy is not adjusted based on the actual shooting scene. Therefore, the text inside the illuminated sign 141 in the middle position is overexposed, which affects the imaging quality. After readjusting the exposure parameters by adopting the solution provided in this application, the user interface 15 as shown in (b) in Figure 9 can be obtained. The preview area of the user interface 15 shows an illuminated sign 151. As can be seen from the figure, the illuminated text in the illuminated sign 151 is not overexposed, thus improving the user experience.

[0153] It can be understood that the technical solution provided in this application can be integrated as a function in an electronic device. The electronic device can turn on or off this function according to a user instruction, or can also decide to turn on or off this function independently, or can also default to always turn on this function. This application does not make any limitation on this. The following combines Figure 10 to give several examples. In this example, the electronic device is taken as a mobile phone for example.

[0154] In one example, the electronic device turns on or off this function according to a user instruction. Figure 10 In (a), an exemplary user interface 21 for displaying application programs installed on the mobile phone is exemplarily shown. As Figure 10 shown in (a), the user interface 21 shows a page with application icons placed on it. This page may include multiple application icons, including a settings application icon 210 among them. The settings application icon 210 can be used to trigger the start of the settings application program. The camera application program is an application program on electronic devices such as smart phones and tablet computers for setting system functions or application functions. This application does not limit the name of this application program.

[0155] In response to a user's click operation on the settings application icon 210, the electronic device displays the user interface 22 as shown in (b) in Figure 10 This user interface 22 includes multiple function options such as "Wireless Network", "Bluetooth", "Camera", etc. Each function option corresponds to a jump control. The user can control the electronic device to display detailed setting interfaces of different function options based on these jump controls.

[0156] In response to a user's click operation on the jump control 220, the electronic device displays as shown in (b) in Figure 10The user interface 23 shown in (c) therein, the user interface 23 includes a switch control 230, and the switch control 230 is used to control the on and off of the "adaptive night scene exposure adjustment" function. It should be understood that the "adaptive night scene exposure adjustment" function is a function integrating the solution of the present application, and this name is only for example. When the switch control 230 is in the off state, in response to the user's click operation on the switch control 230, the electronic device turns on the "adaptive night scene exposure adjustment" function. After this function is turned on, when entering the shooting scene, the electronic device will judge whether it is necessary to correct the exposure parameters according to the solution provided by the embodiments of the present application.

[0157] In another example, when the electronic device switches to the night scene shooting mode, the "adaptive night scene exposure adjustment" function is automatically turned on; when the electronic device switches to other modes other than the night scene shooting mode, the "adaptive night scene exposure adjustment" function is automatically turned off. Please refer to Figure 10 In (d) therein, in response to the user's operation of selecting the "night scene" mode in the camera mode option, the electronic device switches to the night scene shooting mode, and at the same time automatically turns on the "adaptive night scene exposure adjustment" function.

[0158] In yet another example, the "adaptive night scene exposure adjustment" function is always turned on after the electronic device is turned on.

[0159] Corresponding to the method provided in the above embodiments, the present application also provides a software system architecture diagram of an electronic device applicable to the above method. It should be understood that the software system of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present invention, taking the Android system with a layered architecture as an example, in combination with Figure 11 Exemplarily illustrate the software structure of the electronic device.

[0160] As Figure 11 shown, the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through interfaces. In some embodiments, the Android system may include an application layer, an application framework layer, an Android runtime, a system library, a hardware abstraction layer (HAL), and a kernel layer. It should be noted that the embodiments of the present application take the Android system as an example for illustration. In other operating systems (such as the IOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of the present application, the solution of the present application can also be implemented.

[0161] Among them, the application layer may include a series of application packages.

[0162] The application package may include applications such as a camera, a gallery, a calendar, a call, a map, a navigation, wireless local area networks (WLAN), Bluetooth, music, video, short messages, a lock screen application, a settings application, etc.

[0163] Figure 11 Taking the camera application related to the embodiments of the present application as an example. Among them, the camera application has the functions of shooting and video recording. In response to the user's operation of opening the camera application, the electronic device can perform shooting or video recording. It can be understood that the shooting and video recording functions of the camera application can also be called by other applications. For example, the lock screen application can call the shooting function of the camera application to perform face recognition or face unlocking based on the captured image.

[0164] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. For example, it may include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, and a camera service (Camera Service), etc. The embodiments of the present application do not impose any restrictions on this.

[0165] Figure 11 Taking the Camera Service related to the embodiments of the present application as an example. Among them, the Camera Service can be started during the boot phase of the electronic device and can be used to transfer and save relevant information of the camera.

[0166] The HAL layer is an encapsulation of the Liux kernel driver, providing an interface upward and shielding the implementation details of the low-level hardware.

[0167] The HAL layer may include Wi-Fi HAL, audio HAL, and camera HAL, etc.

[0168] Figure 11 Taking the camera HAL related to the embodiments of the present application as an example. Among them, the camera HAL is the core software framework of the camera (Camera). In the embodiments of the present application, the HAL layer further includes an automatic exposure algorithm module for adjusting the exposure parameters according to the target image.

[0169] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, etc.

[0170] Figure 11 Taking the camera driver related to the embodiments of the present application as an example. Among them, the camera driver is the driver layer of the Camera device and is mainly responsible for the interaction with the hardware.

[0171] In the embodiments of the present application, the camera driver may include the driver corresponding to the rear main camera, the driver corresponding to the wide-angle camera, the driver corresponding to the telephoto camera, and the driver corresponding to the front camera, etc. Among them, the driver corresponding to the front camera may include the driver corresponding to the front main camera and the driver corresponding to the TOF camera.

[0172] The hardware layer includes a display, a camera, various sensors, etc.

[0173] Figure 11 Taking the camera and the ambient light sensor related to the embodiments of the present application as an example. Among them, the camera may include a rear main camera, a wide-angle camera, a telephoto camera, and a front camera, etc. Among them, the front camera may include a front main camera and a TOF camera, etc.

[0174] The interaction process between the modules will be described below by way of example.

[0175] As Figure 11 shown, in response to the user opening the camera application or other applications calling the camera application, the camera application in the application layer may send a shooting request to the camera service in the application framework layer. The shooting request may include parameters such as the camera identifier (identity, ID) corresponding to the current shooting scene and the shooting mode. The camera service may directly send the shooting request to the camera HAL in the HAL layer. After receiving the shooting request, the camera HAL may trigger the camera driver to turn on the corresponding camera. For example, the camera driver may turn on the corresponding camera according to the camera ID corresponding to the current shooting scene. The turned-on camera may collect image data and report the image data to the camera HAL through the camera driver. The camera HAL may further trigger the automatic exposure algorithm module to determine the exposure parameters of the current scene. As an example, the automatic exposure algorithm module includes an EVD calculation module, a metering strategy decision module, a metering module, an exposure parameter decision module, etc. Among them, the EVD calculation module is used to determine the exposure value deviation corresponding to the current shooting scene, and the specific implementation method can refer to the description of step S220 in method 200; it should be understood that during the process of calculating the exposure value deviation, the exposure value deviation can also be determined according to the ambient brightness reported by the ambient light sensor, and the specific implementation method will not be elaborated here. The metering strategy decision module is used to determine the metering strategy applicable to the current shooting scene according to the exposure value deviation, and the specific implementation method can refer to step S230 in method 200; the metering module is used to process the target image based on the metering strategy to obtain metering information, and the specific implementation method can refer to step S240 in method 200; the exposure parameter decision module is used to determine the target exposure parameter based on the metering information, and the specific implementation method can refer to step S250 in method 200.

[0176] It should be noted that the shooting scenarios described in the embodiments of this application may include scenarios where the electronic device takes pictures (takes photos or records videos) in different shooting modes after the camera application is launched, as well as shooting scenarios where other applications call the camera application for shooting. Among them, the shooting scenarios of the electronic device in different shooting modes after the camera application is launched may include scenarios where the electronic device is in the multi-camera shooting mode and scenarios where the electronic device is in the single-camera shooting mode. Among them:

[0177] The multi-camera shooting mode refers to a mode in which the electronic device takes pictures through multiple cameras. When the electronic device is in the multi-camera shooting mode, the display screen simultaneously displays the images captured by multiple cameras in the shooting preview interface. The images captured by different cameras can be spliced and displayed, or displayed in a picture-in-picture manner. Among them, according to the types of cameras used by the electronic device and the display methods of the images captured by different cameras, multi-camera shooting may include sub-modes such as front-back shooting mode, back-back shooting mode, picture-in-picture shooting mode, single-front shooting mode (abbreviated as single-front mode), single-back shooting mode, etc. In the embodiments of this application, multi-camera shooting may include multi-camera video recording and multi-camera photo taking.

[0178] The front-back shooting mode refers to a mode in which the electronic device can simultaneously take pictures through the front camera and the rear camera. When the electronic device is in the front-back shooting mode, the images captured by the front camera and the rear camera (for example, the first image, the second image) can be simultaneously displayed in the shooting preview interface, and the first image and the second image are spliced and displayed. Among them, when the electronic device is held vertically, the first image and the second image can be spliced vertically; when the electronic device is held horizontally, the first image and the second image can be spliced horizontally. By default, the display area of the first image is the same as the display area of the second image.

[0179] The back-back shooting mode refers to a mode in which the electronic device can simultaneously take pictures through two rear cameras (if there are multiple rear cameras). When the electronic device is in the back-back shooting mode, the electronic device can simultaneously display the images captured by the two rear cameras (for example, the first image, the second image) in the shooting preview interface, and the first image and the second image are spliced and displayed. Among them, when the electronic device is held vertically, the first image and the second image can be spliced vertically; when the electronic device is held horizontally, the first image and the second image can be spliced horizontally.

[0180] The picture-in-picture shooting mode refers to a mode in which an electronic device can shoot simultaneously through two cameras. When the electronic device is in the picture-in-picture shooting mode, the images captured by the two cameras can be displayed simultaneously in the shooting preview interface (for example, the first image and the second image). Among them, the second image is displayed in the entire area of the shooting preview interface, the first image is superimposed on the second image, and the display area of the first image is smaller than that of the second image. By default, the first image can be located at the lower left of the second image. The above two cameras can be freely combined. For example, they can be two front cameras, two rear cameras, or one front camera and one rear camera.

[0181] The single-front shooting mode refers to a mode in which an electronic device shoots through the front camera. The single-rear shooting mode refers to a mode in which an electronic device shoots through the rear camera. Different from the ordinary front shooting mode and rear shooting mode, in the sub-modes of single-front shooting and single-rear shooting in the multi-lens shooting mode, users can use the function of switching lenses through the air in the multi-lens shooting mode, that is, they can switch cameras through air gestures. For example, they can switch from the single-front shooting mode to the single-rear shooting mode through air gestures, or switch from the single-rear shooting mode to the front-and-rear shooting mode, etc., which are not limited here.

[0182] The single-lens shooting mode refers to a mode in which an electronic device shoots only through one camera. When the electronic device is in the single-lens shooting mode, only the image captured by one camera is displayed in the shooting preview interface. Among them, single-lens shooting can include the front shooting mode, the rear shooting mode, etc.

[0183] Among them, the front shooting mode refers to a mode in which an electronic device shoots through the front camera. When the electronic device is in the front shooting mode, the image captured by the front camera can be displayed in real time in the shooting preview interface.

[0184] Optionally, the front shooting mode can include shooting sub-modes such as face recognition, face unlock, portrait, photo taking (ordinary photo taking), video recording, short video, watermark, time-lapse photography, and dynamic photo.

[0185] The rear shooting mode refers to a mode in which an electronic device shoots through the rear camera. When the electronic device is in the rear shooting mode, the image captured by the rear camera can be displayed in real time in the shooting preview interface.

[0186] Optionally, the rear shooting mode can include shooting sub-modes such as photo taking (ordinary photo taking), high-pixel photo taking, video recording (ordinary video recording), 60fps video recording, short video, watermark, dynamic photo, slow-motion shooting, portrait mode, large aperture, time-lapse photography (timelapse), professional, and super macro.

[0187] Both the rear shooting mode and the front shooting mode can include shooting sub - modes such as taking photos, recording videos, short videos, adding watermarks, taking live photos, time - lapse photography, etc. However, due to the different cameras activated, the camera modes (sensormode) corresponding to the shooting sub - modes such as taking photos, recording videos, short videos, adding watermarks, taking live photos, time - lapse photography, etc. in the rear shooting mode and those in the front shooting mode can be different. In other words, the shooting scenes corresponding to the shooting sub - modes such as taking photos, recording videos, short videos, adding watermarks, taking live photos, time - lapse photography, etc. in the rear shooting mode and those in the front shooting mode can be regarded as different shooting scenes.

[0188] It should be noted that the above "multi - lens shooting mode", "front - rear shooting mode", "picture - in - picture shooting mode", "rear - rear shooting mode", "single - lens shooting mode", "front shooting mode", "rear shooting mode" are just some names used in the embodiments of this application. The meanings they represent have been recorded in the embodiments of this application, and their names do not constitute any limitation to this embodiment.

[0189] Scenes where other applications call the camera application for shooting can include face recognition scenes, face unlocking scenes, face payment scenes, and photo / video shooting function call scenes.

[0190] Among them, the face unlocking scene can refer to the scene where the lock - screen application calls the shooting function of the camera application and performs face unlocking according to the captured image.

[0191] The face recognition scene can refer to the scene where application programs such as bank applications and wealth management applications call the shooting function of the camera application during identity verification and perform face recognition according to the captured image.

[0192] The face payment scene can refer to the scene where application programs such as bank applications and wealth management applications call the shooting function of the camera application during face payment and perform face recognition and payment according to the captured image.

[0193] The photo / video shooting function call scene can refer to the scene where other applications call the shooting function of the camera application to take pictures or videos.

[0194] Corresponding to the method and software architecture diagram given in the above - mentioned embodiments, this application also provides a hardware structure of an electronic device, as Figure 12 shown.

[0195] Please refer to Figure 12, the electronic device may include: a processor 410, 1 to N display screens 420 (N is an integer greater than 1), 1 to N cameras 430, an internal memory 440, and a sensor 450.

[0196] The structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In some embodiments of the present application, the electronic device may include more components than those illustrated.

[0197] For example, a mobile communication module, a wireless communication module, an audio module, a speaker, a receiver, a microphone, a headphone jack, a subscriber identity module (SIM) card slot, keys, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, a motor, an indicator, etc.

[0198] In some embodiments of the present application, the electronic device may include fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. The interface connection relationships between the modules illustrated in the embodiments of the present application are only illustrative and do not constitute a structural limitation on the electronic device.

[0199] The processor may include one or more processing units. For example, the processor may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a codec (e.g., a video codec), a digital signal processor (DSP) 412, a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, the codec 411 may be used to transform a signal or a data stream. A memory may also be provided in the processor for storing instructions and data.

[0200] The electronic device may implement a display function through a GPU, a display screen, and an application processor, etc. The GPU is a microprocessor for image processing, connecting the display screen and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor may include one or more GPUs, which execute program instructions to generate or change display information. The display screen is used to display images, videos, etc. In some embodiments, the electronic device may include one or more display screens.

[0201] The camera is used to capture static images or videos. The ISP is used to process the data fed back by the camera. The camera may include a lens, an image sensor, etc. The image sensor is a photosensitive element. Light is transmitted through the lens to the image sensor, where the optical signal is converted into an electrical signal, and then the image sensor transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye.

[0202] It can be understood that the image sensor mentioned in this application may be a semiconductor chip, including but not limited to charge couple device (CCD), complementary metal-oxide-semiconductor (CMOS), etc.

[0203] It can be understood that the electronic device may include one or more cameras. In some embodiments of this application, the electronic device may include a main camera (i.e., the main shooter) and a secondary camera. Briefly, the main camera refers to the camera mainly responsible for shooting, generally used to capture the subject (i.e., the shooting object) for daily shooting. The main camera has a wide range of applications and can be used in most shooting scenarios. The secondary camera is generally used for assisting shooting. The secondary camera can be used to supplement image brightness and details, as well as in special shooting scenarios such as long-distance shooting and wide-angle shooting. In one possible implementation, the main camera may be a wide camera, and the secondary camera may be a tele camera or an ultra-wide camera. A wide camera usually refers to a wide-angle lens, which means a lens with a relatively large field of view. Shooting with a wide camera can capture a broad picture. A tele camera usually refers to a telephoto lens, which means a lens with a relatively small field of view. Shooting with a tele camera can make the subject look farther and magnified. An ultra-wide camera is a lens with a larger field of view than a wide camera and is usually used to shoot scenes within a wider field of view.

[0204] The internal memory 440 may include one or more RAMs and one or more non-volatile memories. The random access memory can be directly read and written by the processor and can be used to store the operating system or executable programs (e.g., machine instructions) of other running programs, and can also be used to store user and application data, etc. The non-volatile memory can also store executable programs and store user and application data, etc., and can be pre-loaded into the random access memory for the processor to directly read and write.

[0205] In the embodiments of this application, the code for implementing the image exposure method described in the embodiments of this application can be stored on the non-volatile memory. When running the camera application, the electronic device can load the executable code stored in the non-volatile memory into the random access memory.

[0206] In some embodiments of the present application, the electronic device may be provided with a photometric system. The photometric system may be used to determine the ambient brightness and the ambient dynamic range. The photometric system may be used to measure the brightness of the light reflected by the object to be photographed, i.e., reflective photometry. The photometric system may include a photometric element, and the electronic device may automatically measure the light input amount through the photometric element to obtain the photometric brightness.

[0207] The sensor 450 may include an ambient light sensor for collecting the brightness of the surrounding environment. Optionally, the sensor 450 may further include other types of sensors, such as: a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0208] This concludes the introduction to the hardware structure of the electronic device. It can be understood that, Figure 12 the components included in the shown hardware structure do not constitute a specific limitation on the electronic device. The electronic device may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.

[0209] The embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments can be implemented.

[0210] The embodiment of the present application provides a computer program product, and when the computer program product runs on a device, the device can implement the steps in the above method embodiments when executed.

[0211] The embodiment of the present application provides a chip, and the chip is used to execute instructions. When the chip runs, it executes the technical solutions in the above embodiments. The implementation principle and technical effects are similar and will not be elaborated here.

[0212] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a high-definition digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0213] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above embodiment methods of the present application, a computer program can be used to instruct the relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a portable hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0214] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0215] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0216] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0217] It should be understood that the "embodiments" mentioned throughout the specification mean that the specific features, structures, or characteristics related to the embodiments are included in at least one embodiment of this application. Therefore, the various embodiments mentioned throughout the specification do not necessarily refer to the same embodiments. In addition, these specific features, structures, or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of this application, the magnitudes of the serial numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.

[0218] The above-described embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included in the protection scope of this application.

[0219] In addition, it should be noted that the various numerical numbers involved in this application (such as the terms "first", "second", "third", "fourth" in the description, claims and the above-mentioned drawings, and other various term numbers (if any), etc.) are only for the convenience of description and are not used to limit the scope of this application. The magnitude of the serial numbers of each process does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic.

[0220] The terms "comprising" and "having" and any variations thereof mean "including but not limited to", unless otherwise specifically emphasized. For example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0221] In the embodiments of this application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the embodiments of this application should not be construed as more preferred or more advantageous than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.

[0222] In the various embodiments of this application, if there is no special description and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be cross-referenced, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships. The specific operation methods in the method embodiments of this application can also be applied to the device embodiments or system embodiments.

Claims

1. An image exposure method, applied to an electronic device, characterized in that, The method includes: Obtain a target image; Divide the target image into M grids Grid, where M is an integer greater than a second threshold, and the second threshold is greater than or equal to 2; According to the dynamic range of each of the M grids, determine an exposure value deviation, where the exposure value deviation is used to measure the difference between the exposure amount required for accurate exposure of the target image and the current exposure amount. The dynamic range is used to represent the deviation of the brightness of the corresponding grid from the average brightness of the target image. The exposure value deviation is proportional to the number of grids among the M grids whose dynamic range exceeds a third threshold, or the exposure value deviation is proportional to the sum of the dynamic ranges of all the M grids; Determine a metering strategy according to the exposure value deviation; Process the target image according to the metering method indicated by the metering strategy to obtain metering information; Determine target exposure parameters according to the metering information; Perform exposure processing on the target image according to the target exposure parameters.

2. The method according to claim 1, wherein Determine M according to the hardware capabilities of the electronic device, and M is less than a first threshold.

3. The method according to claim 1, wherein The step of determining the exposure value deviation according to the dynamic range of each of the M grids includes: Determine the exposure value deviation according to the dynamic range of each of the M grids and the position weight corresponding to each grid.

4. The method according to claim 3, wherein The method further includes: Divide the target image into multiple regions according to pre-configured information. Each region includes multiple grids. The distance of each region from the center point of the target image is different, and the corresponding position weight of each region is also different. The distance from the center point and the position weight are inversely proportional; Determine the position weight corresponding to each grid according to the region where each grid is located.

5. The method according to claim 3, wherein The method further includes: Based on the artificial intelligence analysis result of the target image and / or the depth information of the target image, divide the target image into multiple regions. Each region includes multiple grids. The degree of interest corresponding to each region is different, and the corresponding position weight of each region is also different. The size of the position weight is proportional to the degree of interest; Determine the position weight corresponding to each grid according to the region where each grid is located.

6. The method according to claim 3, wherein The step of determining the exposure value deviation according to the dynamic range of each of the M grids and the position weight corresponding to each grid includes: Determine the exposure value deviation according to the dynamic range of each of the M grids, the position weight corresponding to each grid, and one or more of the following parameters: Oversaturation ratio, zoom ratio, ambient brightness; Wherein, the oversaturation ratio is the proportion of grids among all grids of the target image whose dynamic range exceeds the second threshold; the zoom ratio is the zoom ratio used when obtaining the target image, and the target image is obtained by zooming and magnifying the original image using the zoom ratio; the ambient brightness is the brightness of the surrounding environment of the current shooting scene.

7. The method according to claim 6, wherein Determining the exposure value deviation according to the dynamic range of each of the M Grids, the position weight corresponding to each Grid, and one or more of the following parameters, includes: Determining a target weight according to one or more of a first weight, a second weight, and a third weight; wherein, the first weight is determined according to the over-saturation ratio, within a first preset range, the over-saturation ratio is directly proportional to the first weight; the second weight is determined according to the zoom ratio, within a second preset range, the zoom ratio is directly proportional to the second weight; the third weight is determined according to the ambient brightness, within a third preset range, the ambient brightness is inversely proportional to the third weight; Determining the exposure value deviation according to the target weight, the dynamic range of each of the M Grids, and the position weight corresponding to each Grid.

8. An electronic device, characterized in that, Comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method according to any one of claims 1-7.

9. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system includes one or more processors, and the one or more processors are configured to call computer instructions to cause the electronic device to execute the method according to any one of claims 1-7.

10. A computer program product, characterized in that, Comprising a computer program, when the computer program is run, the method according to any one of claims 1-7 is executed.

Citation Information

Patent Citations

  • Method for adjusting picture brightness, terminal and storage medium

    CN108200352A