Image exposure method and related equipment
By acquiring the target image in the electronic device and determining the exposure value deviation, adjusting the metering strategy to improve exposure accuracy, the problem of inaccurate exposure during automatic exposure is solved, and image quality and user experience are improved.
Patent Information
- Application Number
- CN202510061285.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2045-01-15
AI Technical Summary
Existing electronic devices are prone to inaccurate exposure during automatic exposure, resulting in overexposure or insufficient exposure of images, affecting the user experience.
By acquiring the target image, the exposure value deviation of the current shooting scene is determined, and the metering strategy is adjusted according to the deviation to obtain more accurate exposure parameters, and the exposure process is performed.
Improve the accuracy of image exposure and reduce inaccurate exposure, such as overexposure, improving user experience and imaging quality.
Smart Images

Figure CN119521007A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of camera technology, and in particular, relates to an image exposure method and related equipment. Background Art
[0002] Electronic devices are usually equipped with cameras, and users can use camera applications to call the cameras on electronic devices to shoot, such as taking photos or recording videos through camera applications. With the development of technology, more and more electronic devices have automatic exposure functions. After turning on the automatic exposure function, the electronic device can autonomously control the exposure parameters according to the brightness of the currently collected image, thereby adjusting the exposure to a suitable range, so that the brightness of the image collected according to the adjusted exposure parameters is suitable for human eyes to watch.
[0003] However, since the actual shooting scenes may be more complicated, when electronic devices use automatic exposure technology to shoot, inaccurate exposure may sometimes occur, such as overexposure of the image, which affects the user experience. Summary of the invention
[0004] The embodiments of the present application provide an image exposure method and related equipment, which can improve the accuracy of image exposure and reduce inaccurate exposure (such as overexposure).
[0005] In a first aspect, an image exposure method is provided, which is applied to an electronic device, and the method includes: acquiring a target image, and determining an exposure value deviation of a current shooting scene according to the target image, and then determining a photometry strategy according to the exposure value deviation, and processing the target image according to the photometry strategy to obtain photometry information, and then determining a target exposure parameter according to the photometry information. Finally, the target image is exposed according to the target exposure parameter. The above-mentioned 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 scheme, the exposure parameters are determined based on the exposure value deviation. The exposure refers to the light received by the photosensitive element of the camera, which is determined by exposure parameters such as exposure time, aperture size, gain, etc. The greater the exposure, the higher the brightness of the collected image; conversely, the smaller the exposure, the lower the brightness of the collected image. The standard exposure in this application refers to the exposure currently used, or the exposure determined based on the original image, or the exposure determined after analyzing and processing the original image using a preset algorithm. The target exposure in this application refers to the exposure determined based on the target image, or the exposure required to accurately expose the target image.
[0007] The exposure value deviation is used to measure the difference between the exposure required for accurate exposure of the target image and the current exposure. In other words, the above exposure value deviation is used to measure the difference between the exposure values when the target image is accurately exposed and inaccurately exposed. Therefore, 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. At this time, the metering strategy should be adjusted in time to obtain more accurate exposure parameters and improve the final image quality. If the exposure value deviation is small, it means that the possibility of inaccurate exposure (such as large-area overexposure) after exposure according to the current exposure is small. At this time, the original metering strategy can be used, that is, no exposure correction is required, thereby saving resources.
[0008] It can be understood that the current exposure refers to the exposure determined after measuring the target image according to the current metering strategy (or the preset metering strategy) (the exposure is calculated by 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, wherein the camera can be a built-in camera of the electronic device or a camera external to the electronic device, and the present application does not limit this.
[0010] Optionally, in a possible implementation, obtaining a target image may refer to processing an original image according to a target zoom ratio to obtain the target image. The target zoom ratio here is greater than 1, that is, the target image is an image obtained after the original image is magnified, that is, the present application scheme is applicable to the scene of image zooming. The present application does not limit the specific method of zooming. In a possible example, zooming can be performed by digital cropping.
[0011] It should be understood that the above-mentioned original image may be a RAW domain image, which is an image captured by an image sensor in a camera, and 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 environment brightness is lower than a preset threshold, that is, the present application solution is applicable to night scene shooting scenarios.
[0013] Optionally, in a possible implementation, the electronic device is currently in a night scene shooting mode. The night scene shooting mode refers to a mode on the electronic device specifically used for shooting images or videos in night scenes.
[0014] As an example, in some shooting scenes, there may be uneven brightness distribution or large differences in brightness between different areas (i.e., some areas are too bright and some areas are too dark). If the target image is exposed according to the existing strategy, inaccurate exposure may occur, such as overexposure or underexposure, which affects the user experience. By calculating the exposure value deviation, such scenes can be calibrated, so that the metering strategy can be adjusted in time. After the image is exposed using the metering information, an image with more appropriate brightness and better imaging quality can be obtained, reducing the situation of large-area overexposure.
[0015] In combination with the first aspect, in a certain implementation of the first aspect, the exposure value deviation is determined according to the target image, including: dividing the target image into M grids, where M is an integer greater than 1; and determining the exposure value deviation according to the dynamic range of each grid in the multiple grids.
[0016] In the above scheme, the target image is divided into multiple Grids, and the brightness and darkness of different positions of the target image can be determined by analyzing the dynamic range of each Grid. 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 large differences in brightness in different areas, so the brightness value cannot reflect the brightness comparison. The above scheme uses the dynamic range of the Grid to more clearly reflect whether the local area is too bright or too dark, thereby determining 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 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 the preset threshold), it means that this grid is a brighter or darker area compared to the entire image. The more grids whose dynamic range exceeds 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 of different areas of the target image varies greatly, and there are local overbrightness or local overdarkness. In this case, after exposing the target image in a preset manner, there is a high probability of inaccurate exposure.
[0018] The exposure value deviation can be used to measure the difference in exposure values when the target image is accurately exposed and inaccurately exposed. The dynamic range of different grids in the target image is related to 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 of determining the exposure value deviation according to the dynamic range. However, it should be understood that the more grids whose dynamic range exceeds 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 whose dynamic range exceeds 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 may be used as the exposure value deviation.
[0021] In combination with the first aspect, in a certain implementation of the first aspect, M is determined according to the hardware capability of the electronic device, and M is less than a 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. In other words, 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, but correspondingly, the power consumption of the device and the requirements for hardware capabilities are higher. Therefore, when determining the size of M, this application also needs to consider the balance between accuracy and power consumption, that is, control the value of M to be less than the first threshold value, if the hardware capabilities permit. In other words, M is the maximum value that the electronic device hardware can support when it is less than the first threshold value. In this way, a balance between accuracy and power consumption can be achieved.
[0023] In combination with the first aspect, in a certain implementation of the first aspect, the exposure value deviation is determined according to the dynamic range of each of the multiple Grids, including: determining the exposure value deviation according to the dynamic range of each of the multiple Grids and the position weight corresponding to each Grid.
[0024] For example, when a user previews an image, his or her sight is usually focused on a certain position in the image, rather than being scattered at various positions. Therefore, for the target image, the degree of influence of the Grids in different areas on the user experience is different, that is, the importance of the Grids in different areas is different. In view of this, the target image can be divided into multiple different areas, each area includes multiple Grids, and different position weights are assigned to each area. The position weight is used to indicate the degree of influence of the Grids in different areas on the exposure parameters. The larger the position weight corresponding to a region, the greater the influence of the Grid in the region on the final image exposure result. In this way, a relatively large position weight can be assigned to an area with high user attention, and a relatively small position weight can be assigned to an area with low user attention, so that the calculated exposure value deviation is more accurate, and the display effect of the image obtained after the target image is automatically exposed according to the exposure value deviation is better and more suitable for human eye viewing, thereby improving the user experience.
[0025] The present application does not limit the specific implementation method of determining the exposure value deviation according to the dynamic range and position deviation of the grid. In one example, the exposure value deviation can be determined using the following formula: ; Among them, evd represents the exposure value deviation, M is the number of Grids in the target image, and evd i Represents the exposure value deviation of the i-th Grid among M Grids, pos_wt i Indicates the position weight corresponding to the i-th Grid. In an example, the dynamic range of the i-th Grid can be used as the exposure value deviation of the i-th Grid.
[0026] In combination with the first aspect, in a certain implementation of the first aspect, the method also includes: dividing the target image into multiple areas according to pre-configuration information, each area includes multiple Grids, each area has a different distance from the center point of the target image, and the position weight corresponding to each area is also different, and is inversely proportional to the distance between the center point and the position weight; determine the position weight corresponding to each Grid according to the area where each Grid is located.
[0027] In the above scheme, the division method of the area and the allocation method of the weight can be pre-written in the pre-configuration information. After acquiring the target image, the target image is directly divided into multiple areas according to the pre-configuration information, and different position weights are assigned to each area according to the pre-configuration information. This method can improve the efficiency of the execution of this scheme, reduce the freeze of the shooting picture, and improve the user experience. The following is an exemplary description of an implementation method indicated by the configuration item information.
[0028] For example, in most cases, when a user observes an image, most of his attention will be focused on the center of the image. For example, when an 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. If the object at the center of the target image is accurately exposed, and the object at the edge of the image is overexposed, the impact of this situation on the user experience will be relatively small. Based on this analysis, a larger position weight can be assigned to the center area of the target image, and a smaller weight can be assigned to the edge area 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 the target image is automatically exposed according to the exposure value deviation is better and more suitable for human viewing, thereby improving the user experience.
[0029] In combination with the first aspect, in a certain implementation of the first aspect, the method further includes: based on the artificial intelligence analysis results for the target image and / or the depth information of the target image, the target image is divided into multiple regions, each region includes multiple Grids, each region corresponds to a different degree of interest, each region corresponds to a different position weight, and the size of the position weight is proportional to the degree of interest. Further, according to the region where each Grid is located, the position weight corresponding to each Grid is determined.
[0030] In the above scheme, 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 acquiring the target image, the image content in the target image is analyzed, and 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 effect of the execution of this scheme, that is, it can further improve the accuracy of the exposure value deviation obtained by subsequent calculation, and further improve the display effect of the image after exposure. The following is an exemplary description of a possible implementation method.
[0031] For example, due to the complexity and variety of shooting scenes, the content distribution of images captured in different scenes is unpredictable, so when users look at images at different points, the distribution of their sight lines is uncertain. For example, for a landscape image, the user may focus more on the center of the image, but if there is a person standing at the edge of an image, the user may focus more on the edge of the image where there are people. In other words, for different images, the user's area of interest is different, which may be in the center of the image or at the edge of the image. In this implementation, it is hoped that the target image will be divided into different areas according to the user's interest level, and the higher the user's interest level, the greater the position weight assigned to the area. In this way, the calculated exposure value deviation can be made more accurate and more in line with the user's visual experience. The image obtained after the target image is automatically exposed according to the exposure value deviation has a better display effect and is more suitable for human viewing, thereby improving the user experience.
[0032] In combination with the first aspect, in a certain implementation of the first aspect, the exposure value deviation is determined according to the dynamic range of each Grid in a plurality of Grids and the position weight corresponding to each Grid, including: determining the exposure value deviation according to the dynamic range of each Grid in a plurality of Grids, the position weight corresponding to each Grid and one or more of the following parameters: oversaturation ratio, zoom factor, ambient brightness; wherein the oversaturation ratio is the proportion of Grids whose dynamic range exceeds the second threshold among all Grids of the target image; the zoom factor is the zoom factor used when acquiring the target image, and the target image is obtained by zooming in on the original image using the zoom factor; and the ambient brightness is the brightness of the surrounding environment of the current shooting scene.
[0033] Exemplarily, the oversaturation ratio refers to the proportion of grids whose dynamic range exceeds a preset threshold in all grids of the target image. Assuming that the oversaturation ratio corresponds to the first weight, the first weight is used to determine the above target weight, and the value range of the first weight can be set to 0~1. As can be seen from the previous introduction, the more grids whose dynamic range exceeds the preset threshold, the greater the exposure value deviation; conversely, 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 proportional to the first weight; the zoom ratio refers to the zoom ratio used when the target image is obtained by zooming the original image. Assuming that the zoom ratio corresponds to the second weight, the second weight is used to determine the above target weight, and the value range of the second weight can be set to 0~1. Ambient brightness refers to the ambient brightness corresponding to the current shooting scene. Assuming that the ambient brightness corresponds to the third weight, the third weight is used to determine the above target weight, and the value range of the third weight can be set to 0~1. It should be understood that when shooting in bright light scenes (i.e., the ambient brightness is relatively high), it is generally not easy to have inaccurate exposure such as overexposure of the image, while in night scene shooting (i.e., the ambient brightness is relatively low), local bright light is more likely to be overexposed. By introducing the three parameters of oversaturation ratio, zoom ratio, and ambient brightness, the accuracy of exposure value deviation can be improved.
[0034] In combination with the first aspect, in a certain implementation of the first aspect, the exposure value deviation is determined according to the dynamic range of each Grid in a plurality of Grids, the position weight corresponding to each Grid, and one or more of the following parameters, including: determining the 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 oversaturation ratio, and within a first preset range, the oversaturation ratio is 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 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; the exposure value deviation is determined according to the target weight, the dynamic range of each Grid in a plurality of Grids, and the position weight corresponding to each Grid.
[0035] In a second aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the electronic device implements the steps of any method described in the first aspect above.
[0036] In a third aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0037] According to a fourth aspect, a computer program product is provided. When the computer program product is executed on an electronic device, the electronic device executes any one of the methods according to the first aspect.
[0038] In a fifth aspect, 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 any method described in the first aspect.
[0039] The chip system may be a single chip or a chip module composed of multiple chips.
[0040] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram showing an application scenario provided by an embodiment of the present application is shown; Figure 2 A schematic diagram showing another application scenario provided by an embodiment of the present application is shown; Figure 3 A schematic diagram showing another application scenario provided by an embodiment of the present application is shown; Figure 4 An exemplary flow chart of a method 200 provided in an embodiment of the present application is shown; Figure 5 A possible example diagram of a grid division method provided in an embodiment of the present application is shown; Figure 6 A possible example diagram of a grid division method provided in an embodiment of the present application is shown; Figure 7 A possible example diagram of a grid division method provided in an embodiment of the present application is shown; Figure 8 A schematic diagram of the relationship between each parameter and the corresponding weight is given as an example; Fig. 9 A schematic diagram showing an effect of the solution provided by an embodiment of the present application is shown; Fig.10 A schematic diagram showing an application scenario provided by an embodiment of the present application is shown; Fig.11 An architecture diagram of a software system provided by an embodiment of the present application is shown; Fig.12 The figure shows an architecture diagram of the hardware system provided in the embodiment of the present application. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0043] Electronic devices are usually equipped with cameras. Users can use camera applications to call the cameras on electronic devices to shoot, such as taking photos or recording videos through camera applications. The camera is composed of components such as lenses and photosensitive elements. When an electronic device calls the camera to collect images, light will pass through the lens and shine on the photosensitive element. The amount of light received by the photosensitive element can be called exposure. The exposure is determined by exposure parameters such as exposure time, aperture size, and gain. The greater the exposure, the higher the brightness of the collected image; conversely, the smaller the exposure, the lower the brightness of the collected image.
[0044] With the rapid development and widespread application of multimedia technology and network technology, people use a lot of image information in daily life and production activities. For different shooting scenes, such as shooting scenes with weak light intensity and dimness, or shooting scenes with strong light intensity and particularly bright, electronic devices can use 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) to prevent the image from being over- or under-exposed. 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 collected after automatic exposure more suitable for human eyes to watch, and the display effect is also better.
[0045] As can be seen from the above introduction, automatic exposure technology adjusts exposure parameters to avoid images being too bright or too dark. Exposure parameters refer to the parameters that affect the exposure effect, including but not limited to: exposure time (shutter speed), aperture size, sensitivity (International Standards Organization, ISO), exposure gain. The following will introduce them one by one.
[0046] Exposure time, also known as shutter speed, represents the time interval from the opening to the closing of the shutter, where the shutter is a device used in camera equipment to control the time that light shines on the photosensitive element. The longer the exposure time, the greater the luminous flux of the lens per unit time, and the brighter the image; the shorter the exposure time, the smaller the luminous flux of the lens per unit time, and the darker the image.
[0047] The aperture is a device in the lens that controls the size of the hole that allows light to enter the camera. The larger the aperture, the larger the aperture, the greater the luminous flux of the lens per unit time, and the higher the brightness of the picture. Correspondingly, the smaller the aperture, the smaller the aperture, the smaller the luminous flux of the lens per unit time, and the lower the brightness of the picture. It is understandable 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 exposure time and ISO.
[0048] ISO, also known as photosensitivity, refers to the intensity of incident light sensed by the camera's photosensitive device (such as charge-coupled device (CCD) or complementary metal-oxide-semiconductor (CMOS)) and related electronic circuits. ISO is achieved by adjusting the sensitivity of the photosensitive device or merging photosites, that is, by increasing the light sensitivity of the photosensitive device or merging several adjacent photosites 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 the photosensitive element needs a longer exposure time or more light to capture an image; a higher ISO is the opposite, the photosensitive element requires less light and a shorter exposure time.
[0049] Exposure gain (gain): Exposure gain can be referred to as gain for short, and its size is related to the sensitivity. High gain means high sensitivity, and the higher the gain, the more sensitive it is to low light. Since the noise signal will also be amplified during the process of amplifying the image signal, the amplifier gain is usually set to the minimum. When the ambient light is dim and the image signal is weak, but you do not want to increase the exposure time, you can increase the gain. Generally speaking, the gain range provided by digital cameras can be from 1000 to 128000.
[0050] It is understandable 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, wherein the camera can be a built-in camera of the electronic device, or a camera external to the electronic device, and the present application does not limit it. The electronic device in the present application can be, for example, a mobile phone (including a folding screen mobile phone and a straight-screen mobile phone), a digital camera, a tablet computer, a desktop computer (desktop computer), a handheld computer, a notebook 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 embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0051] The following uses a mobile phone as an example to exemplarily introduce a shooting scenario provided in an embodiment of the present application.
[0052] Figure 1(a) in FIG. 1 exemplarily shows an exemplary user interface 11 for displaying applications installed on the mobile phone 100 .
[0053] It is understood that the term "user interface" involved in the embodiments of the present application refers to the medium interface for interaction and information exchange between the application or operating system and the user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the graphical user interface (GUI), which refers to the user interface related to computer operation displayed in a graphical manner. It can be an interface element such as an icon, window, control, etc. displayed on the display screen of an electronic device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, and other visual interface elements.
[0054] like Figure 1 As shown in (a) in the figure, the user interface 11 displays a page with application icons, which 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 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, an address book application icon, a phone application icon, and a message application icon) below the page indicator. The application icons remain displayed when the page is switched.
[0055] It is understandable that the camera application icon 111 is an icon of a 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 smart phones and tablets, and this application does not limit the name of the application.
[0056] It should be noted that Figure 1 The user interface 11 shown in (a) is only an example provided by the present application and should not be regarded as a limitation to the present application. In other words, the user interface 11 can display more or less content, and the present application does not limit this.
[0057] The mobile phone 100 may detect a user operation (such as a touch / click operation) on the camera application icon 111, and in response to the operation, the mobile phone 100 may display Figure 1 The user interface 12 shown in (b) in FIG. 1 may be a shooting interface of the default shooting mode of the camera application, on which the user can preview the image and complete the shooting. That is, the user can open the user interface 12 of the camera application by clicking the camera application icon 111.
[0058] It can be understood that the user operations mentioned in this application may include but are not limited to touch, click, voice control, air gestures and other operations, and this application does not impose any restrictions on this.
[0059] like Figure 1 As shown in (b) in FIG. 1 , the user interface 12 may 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 , and the like.
[0060] The preview area 121 can be used to display a preview image. The 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 so that the user can preview the image currently captured by the camera.
[0061] The zoom control 122 can be used to control the zoom ratio of the preview image, that is, the user can zoom in or out the preview image through the zoom control 122. The number displayed in the zoom control 122 indicates the zoom ratio. For example, when "1×" is displayed in the zoom control 122, it means that the current zoom is 1x, or no zoom is performed; when "2×" is displayed in the zoom control 122, it means that the current zoom is 2x; when "0.6×" is displayed in the zoom control 122, it means that the current zoom is 0.6x.
[0062] A plurality of shooting parameter setting controls (referred to as parameter controls) may be displayed in the parameter adjustment area 123. A 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 may display parameter controls such as aperture, flash, smart mode controls, and filters. The aperture can be used to adjust the aperture size of the camera, thereby changing the brightness of the image captured by the camera; the flash can be used to turn the flash on or off, thereby changing the brightness of the image captured by the camera; the smart mode control can be used to turn on the artificial intelligence shooting mode, which can automatically select shooting parameters based on artificial intelligence; the filter can be used to select the filter style, thereby adjusting the image color. The parameter adjustment area 123 may also include a setting control. The setting control can be used to provide more controls for adjusting camera shooting parameters or image optimization parameters.
[0063] One or more shooting mode options may be displayed in the camera mode option 124. The one or more shooting mode options may include: a night scene mode option, a smart portrait mode option, a photo mode option, a video mode option, and more options. It is understandable that the one or more shooting mode options may be displayed as text information on the interface, such as "night scene", "portrait", "photo", "video", "more", or as icons or other forms of interactive elements (IE), which are not limited in this application.
[0064] The camera mode indicator control 125 is used to indicate the current shooting mode. For example, if the text information corresponding to the camera mode indicator control 125 is "photograph", it means that the current shooting mode is the default shooting mode.
[0065] 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) acting on the album quick control 127, the mobile phone 100 can open the album application.
[0066] The shutter control 126 can be used to monitor the user operation that triggers the photo taking. The mobile phone 100 can detect the user operation acting on the shutter control 126. In response to the operation, the mobile phone 100 can save the preview image in the preview area 121 as a picture in the album application after processing. In addition, the mobile phone 100 can also display the thumbnail of the saved image in the album shortcut control 127. In other words, the user can trigger the photo taking by operating 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.
[0067] The camera flip control 128 can be used to monitor the user operation that triggers the flipping of the camera. The mobile phone 100 can detect the user operation acting on the camera flip control 128, such as a touch operation, and in response to the operation, the mobile phone 100 can flip the camera used for shooting, such as switching the rear camera to the front camera, or switching the front camera to the rear camera.
[0068] The user interface 12 may also include more or fewer controls, which is not limited in the embodiment of the present application.
[0069] Figure 2 FIG. 1 shows an actual shooting scene in which the mobile phone 100 provided in the embodiment of the present application is located. Figure 2 As shown, the current scene is at night, the ambient brightness is relatively low, and the user opens the camera application in the mobile phone 100 and points the camera of the mobile phone 100 at the current scene. The mobile phone 100 can display the following Figure 3The user interface 13 shown in (a) in the figure shows a preview image in the preview area of the user interface 13. 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. Figure 2 It can be seen that the current shooting scene is relatively dark, so the automatic exposure technology will adjust the exposure parameters to improve the overall brightness of the preview image.
[0070] As can be seen from the previous introduction, automatic exposure technology is a technology that automatically adjusts image brightness by automatically determining exposure parameters. Automatic exposure technology adjusts the exposure to a suitable position, so that the image collected according to the adjusted exposure parameters is appropriately bright and suitable for human eyes to watch. 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 large difference in dynamic range in different areas, the exposure determined by automatic exposure technology may not be appropriate. The image collected according to the adjusted exposure parameters may appear partially too bright or partially too dark (such as overexposure of the luminous area), which is not suitable for human eyes to watch. At this time, it is called "inaccurate exposure" or "non-accurate exposure".
[0071] For example, Figure 3 The preview image shown in (a) includes a light sign 131, and the light sign 131 includes the luminous text "Happy Hotel". Since the brightness of the light sign 131 is much higher than that of the surrounding environment, when the entire image is uniformly exposed, the brightness of the surrounding environment is improved, but for the light sign 131, the exposure intensity may be a bit too high, which may cause the text on the light sign 131 to be overexposed, which will affect the display effect of the image, especially in the zoom scene, the impact of inaccurate exposure on image quality is particularly obvious. For example, the user can detect the user operation (such as a click / slide operation) acting on the zoom control 132, and in response to the operation, the mobile phone 100 can display Figure 3 The user interface 14 shown in (b) in FIG. 1 is a preview area of the user interface 14, which displays a preview image after zooming in, and the zoom control 142 displays the zoom ratio (the "5×" in the figure represents a zoom ratio of 5). The light sign 131 in the user interface 12 is zoomed in and becomes the light sign 141 in the user interface 14. As can be seen from the figure, the glowing text in the light sign 141 after zooming is obviously overexposed (the overexposure effect in the figure is only for illustration), and the image quality is poor, which affects the user experience.
[0072] Understandably, Figure 1~Figure 3 The applicable scenarios of the embodiments of the present application are described by taking a photo-taking scenario as an example, but the present application is not limited to this. For example, the present application can also be applied to a video recording scenario, which will not be described in detail here.
[0073] Based on the above content, the present application provides an image exposure method. In this method, the exposure value deviation of the current scene is used to re-determine the metering strategy that matches the current scene, so as to obtain more accurate metering information, so that after the image is exposed using the metering information, an image with more appropriate brightness and better imaging quality is obtained, and the situation of large-area overexposure of the image is reduced. Figure 4 The method 200 in the embodiment of the present application is described in detail for the specific implementation process of the image exposure method provided in the embodiment of the present application. It should be understood that the method 200 is executed by an electronic device, and the electronic device can provide shooting services for users through a camera.
[0074] S210: Acquire a target image.
[0075] Exemplarily, the target image in the embodiments of the present application refers to an image to be exposed and processed, which can be an original image captured by a camera or an image obtained by zooming in on the original image, and the present application does not limit this.
[0076] The following mainly takes the second scenario (ie, the target image is obtained by zooming in on the original image) as an example for explanation.
[0077] It should be understood that the above original image is, for example, a RAW domain image, which is an image captured by an image sensor in a camera, so 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 recorded as X*Y.
[0078] The electronic device can process the original image based on the target zoom ratio to obtain the target image. The target zoom ratio here can be the zoom ratio of the image selected by the user, can be obtained based on the user's zoom operation, or can be the target zoom ratio automatically set by the electronic device system.
[0079] In an exemplary scenario, the target zoom ratio is greater than 1, that is, the target image is an image obtained by zooming in on the original image, because the problem of image overexposure usually occurs in the scenario of image magnification.
[0080] This application does not limit the specific method of zooming. In one possible example, zooming can be performed by digital cropping. Assuming that the target zoom ratio is n, the zooming process can be regarded as cutting out a target image of size x*y from an original image of size X*Y, where x=X / n, y=Y / n.
[0081] S220: Determine an exposure value deviation of the current shooting scene according to the target image.
[0082] Exemplarily, after acquiring the target image, the electronic device determines an exposure value difference (EVD) of the current shooting scene according to the target image, where the exposure value difference indicates a difference between the target exposure and the standard exposure.
[0083] Among them, the exposure amount refers to the light received by the camera's photosensitive element, which is determined by exposure parameters such as exposure time, aperture size, and gain. The greater the exposure amount, the higher the brightness of the collected image; conversely, the smaller the exposure amount, the lower the brightness of the collected image.
[0084] The standard exposure in this application refers to the exposure currently used, or the exposure determined based on the original image, or the exposure determined after analyzing and processing the original image using a preset algorithm.
[0085] The target exposure in the present application refers to the exposure determined according to the target image, or the exposure required to accurately expose the target image.
[0086] Therefore, the above exposure value deviation can be used to measure the difference in exposure value when the target image is accurately exposed and inaccurately exposed. If the difference value is small, no exposure correction is required, that is, the target image can be exposed according to the standard exposure; if the difference value is large, it means that if no exposure correction is performed, the image obtained after the exposure processing may be overexposed. For the specific solution, please refer to the description of the subsequent step S240, which will not be repeated here.
[0087] It should be understood that the purpose of determining the exposure value deviation in the present application is to accurately expose the target image in the future, that is, to determine the target exposure amount. Therefore, it is not possible to use the definition of the exposure value deviation to determine the exposure value deviation. Therefore, the present application expects to infer the size of the exposure value deviation through the relevant parameters of the target image and / or the environmental parameters. A possible implementation method is exemplified below.
[0088] In a possible implementation (denoted as Scheme 1), the target image is divided into multiple grids, and the exposure value deviation is determined according to the dynamic range of each grid in the target image.
[0089] Exemplarily, the target image is divided into M grids, where M is an integer greater than 1. The purpose of dividing the grid is to analyze the brightness of different positions of the target image. If the pixels of the target image are analyzed directly, the amount of calculation is obviously very large, which will cause a surge in power consumption of electronic devices, and the hardware capabilities may not necessarily support it. Therefore, the target image can be divided into M grids, each grid includes multiple pixels, so the grid division process can also be regarded as a process of downsampling the target image.
[0090] 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. In other words, 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, but correspondingly, the power consumption of the device and the requirements for hardware capabilities are also higher. Therefore, when determining the size of M, this application also needs to consider the balance between accuracy and power consumption if the hardware capabilities permit, and the specific method is not limited here.
[0091] by Figure 5 Take the example to show how the Grid is divided: Figure 5 (a) in the figure shows the target image, which can be divided into a×b grids (such as Figure 5 As shown in (b) in the figure, after the division, the target image consists of a rows and b columns of Grids. It should be understood that A=a×b.
[0092] It should be noted that Figure 5 The grid division method shown in (b) is only an example and does not limit the present application. In one implementation, a is 60 and b is 48.
[0093] After the target image is divided into M grids, the exposure value deviation is further determined according to the dynamic range of each grid.
[0094] The dynamic range of a grid is used to indicate the deviation of the brightness of the 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 the grid and the average brightness of the target image.
[0095] 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 the preset threshold), it means that this grid is a brighter or darker area compared to the entire image. The more grids whose dynamic range exceeds 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 of different areas of the target image varies greatly, and there are local overbrightness or local overdarkness. In this case, after exposing the target image in a preset manner, there is a high probability of inaccurate exposure.
[0096] The exposure value deviation can be used to measure the difference in exposure values when the target image is accurately exposed and inaccurately exposed. The dynamic range of different grids in the target image is related to 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.
[0097] 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 whose dynamic range exceeds 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 whose dynamic range exceeds the preset threshold, or the smaller the dynamic range of all grids, the smaller the exposure value deviation.
[0098] In a possible example, the sum of all grids may be used as the exposure value deviation.
[0099] In another possible implementation (denoted as Scheme 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.
[0100] When a user previews an image, his or her sight is usually focused on a certain position in the image, rather than being scattered at various positions. Therefore, for the target image, the influence of grids in different areas on the user experience is different, that is, the importance of grids in different areas is different. In view of this, the target image can be divided into multiple different areas, each area includes multiple grids, and different position weights are assigned to each area. The position weight is used to indicate the influence of grids in different areas on the exposure parameters. The larger the position weight corresponding to a region, the greater the influence of the grid in the region on the final image exposure result. In this way, a relatively large position weight can be assigned to areas with high user attention, and a relatively small position weight can be assigned to areas with low user attention, so that the calculated exposure value deviation is more accurate, and the display effect of the image obtained after the target image is automatically exposed according to the exposure value deviation is better and more suitable for human eyes to watch, thereby improving the user experience.
[0101] The present application does not limit the specific implementation method of determining the exposure value deviation according to the dynamic range and position deviation of the grid. In one example, the exposure value deviation can be determined using the following formula: ; Among them, evd represents the exposure value deviation, M is the number of Grids in the target image, and evd i Represents the exposure value deviation of the i-th Grid among M Grids, pos_wt i Indicates the position weight corresponding to the i-th Grid. In an example, the dynamic range of the i-th Grid can be used as the exposure value deviation of the i-th Grid.
[0102] The following is an example to illustrate how to divide regions and how to assign weights.
[0103] Example 1: The area division method and weight allocation method can be pre-written in the pre-configuration information. After acquiring the target image, the target image is directly divided into multiple areas according to the pre-configuration information, and different position weights are assigned to each area according to the pre-configuration information. This method can improve the efficiency of the execution of this solution, reduce the freeze of the shooting picture, and improve the user experience. The following is an exemplary description of an implementation method indicated by the configuration item information.
[0104] In most cases, when users observe an image, most of their attention will be focused on the center of the image. For example, when an object 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. If the object at the center of the target image is accurately exposed, while the objects at the edge of the image are overexposed, the impact on the user experience will be relatively small. Based on this analysis, a larger position weight can be assigned to the center area of the target image, while a smaller weight can be assigned to the edge area of the target image.
[0105] As an example, we can start from the center point of the target image and expand it according to the 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, where P is a preset value.
[0106] Figure 6 (a) in FIG. 1 is an application diagram of Example 1, in which P is equal to 3. Figure 6 As shown in (a) in the figure, the original image is divided into a×b Grids. Starting from the center point of the target image, the first region is obtained by dividing according to the first preset ratio and the second preset ratio, wherein the first preset ratio corresponds to a and the second preset ratio corresponds to b. For example, a is 12, b is 8, the first preset ratio is 1 / 3, and the second preset ratio is 1 / 4. Therefore, the first region includes 4×2 Grids, and the center point of the first region coincides with the center point of the target image. Further, based on the first region, the second region is obtained by dividing according to the third preset ratio and the fourth preset ratio, wherein the third preset ratio corresponds to a and the fourth preset ratio corresponds to b. For example, the third preset ratio is 2 / 3, and the fourth preset ratio is 1 / 2. Therefore, the second region is the part of the 8×4 Grids excluding the first region with the center point of the target image as the center, so the second region includes 24 Grids. Finally, the other parts of the target image except the first and second regions are taken as the third region. The first area, the second area, and the third area are gradually away from the center point, so the first position weight corresponding to the first area should be greater than the second position weight corresponding to the second area, and the second position weight corresponding to the second area should be greater than the third position weight corresponding to the third area. 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.
[0107] It should be noted that in Figure 6 In the example given in (a), P is taken as 3, but the present application is not limited thereto. The target image can be divided into two areas according to actual needs, or the target image can be divided into 4 or more areas, which is not limited in the present application.
[0108] It should also be noted that the value of the above preset ratio and the value of the position weight corresponding to each area can be set according to needs. The above is just an example and is not limited here.
[0109] Example 2: The target image can be flexibly divided into multiple regions and position weights can be assigned based on the image content in the target image. After acquiring the target image, the image content in the target image is analyzed, and 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 effect of the execution of this solution, that is, it can further improve the accuracy of the exposure value deviation obtained by subsequent calculation, and further improve the display effect of the image after exposure. The following is an exemplary description of a possible implementation method.
[0110] Since shooting scenes are complex and changeable, the content distribution of images taken in different scenes is unpredictable. Therefore, when users look at images at different points, the distribution of their sight lines is uncertain. For example, for a landscape image, the user may focus more on the center of the image, but if there is a person standing at the edge of an image, the user may focus more on the edge of the image where there is a person. In other words, for different images, the user's area of interest is different, which may be in the center of the image or at the edge of the image. In this implementation, it is hoped that the target image will be divided into different areas according to the user's interest level, and the higher the user's interest level, the greater the position weight assigned to the area. Reference Figure 6 In the example shown in (b), the target image is divided into the first area, the second area and the third area according to the user's interest level. The interest level corresponding to the first area is higher than that of the second area, and the interest level of the second area is higher than that of the first area. Based on this, a first position weight is assigned to the first area, a second position weight is assigned to the second area, and a third position weight is assigned to the third area. The values of the first position weight, the second position weight and the third position weight become smaller 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.
[0111] This application does not limit the implementation method of determining the user's area of interest and area of no interest in the target image. As an example, the user's area of interest and area of no interest (or the degree of interest of different areas) can be determined based on the analysis results of the artificial intelligence model for the target image (AI Segmentation Map), or the user's area of interest and area of no interest (or the degree of interest of different areas) can be determined based on the depth information corresponding to the target image (PD Depth Map), and this application does not limit this.
[0112] 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.
[0113] 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.
[0114] 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.
[0115] 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 scene shown, local bright light appears during night scene shooting, and the image is even zoomed in. Figure 3 The local overexposure situation shown in (b) in the figure. Based on this, the present application can also introduce the concept of a target weight, which is related to the current shooting scene. The target weight is used to characterize the possibility of inaccurate exposure when the target image captured in the current shooting scene is automatically exposed according to standard exposure parameters. The value range of the target weight can be set to 0~1. The larger the target weight, the greater the possibility of inaccurate exposure, and therefore the greater the exposure value deviation; the smaller the target weight, the smaller the possibility of inaccurate exposure, and therefore the smaller the exposure value deviation.
[0116] In a possible implementation, the target weight is determined according to one or more of the following parameters: oversaturation ratio, zoom ratio, and ambient brightness.
[0117] Oversaturation ratio: refers to the proportion of grids whose dynamic range exceeds the preset threshold among all grids in the target image. Assuming that the oversaturation ratio corresponds to the first weight, the first weight is used to determine the above target weight, and 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 whose dynamic range exceeds the preset threshold, the greater the exposure value deviation; conversely, 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 proportional to the first weight. Figure 8 (a) shows the relationship between the supersaturation ratio and the first weight. Figure 8 As shown in (a), when the oversaturation ratio is between b1 and b2, the oversaturation ratio and the first weight are in positive proportion, 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 the first weight can be taken as 0. When the oversaturation ratio is greater than or equal to b2, it can be considered that the oversaturation ratio is too high, and the target image is likely to be overexposed in a large area. At this time, the first weight can be taken as 1.
[0118] Zoom ratio: The zoom ratio used when the target image is obtained by zooming the original image. Assuming that the zoom ratio corresponds to the second weight, the second weight is used to determine the above target weight, and the value range of the second weight can be set to 0~1. Figure 3 From the given example, it can be seen that the larger the zoom ratio is, the more likely the local bright light in the target image will be overexposed. Figure 8 (b) shows the relationship between the zoom factor and the second weight. Figure 8 As shown in (b), when the zoom ratio is between c1 and c2, the zoom ratio and the second weight are in direct proportion, that is, the larger the zoom ratio, the larger the second weight. c1 and c2 are preconfigured 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 the second weight can be taken as 0. When the zoom ratio is greater than or equal to c2, it can be considered that the zoom ratio is too high, and the target image is likely to be overexposed in a large area. At this time, the second weight can be taken as 1. That is to say, in the implementation method of using the zoom ratio as an influencing factor of the target weight, the present application scheme is only for scenes where zoom magnification occurs. If the image is not zoomed, it can be considered that overexposure that affects the user experience will not occur, and the second weight is reset to 0, resulting in a target weight of 0 and an exposure value deviation of 0. At this time, no exposure correction is required, that is, there is no need to execute the subsequent step S230.
[0119] Ambient brightness: refers to the ambient brightness corresponding to the current shooting scene. Assuming that the ambient brightness corresponds to the third weight, the third weight is used to determine the above target weight. The value range of the third weight can be set to 0~1. It should be understood that shooting in bright light scenes (i.e., high ambient brightness) is generally not prone to inaccurate exposure such as overexposure of the image. Figure 2 In the night scene shot shown (i.e. the ambient brightness is relatively low), local bright light is more likely to be overexposed. Figure 8 (c) shows the relationship between the ambient brightness and the third weight. Figure 8 As shown in (c), when the ambient brightness is between d1 and d2, the ambient brightness and the third weight are inversely proportional, that is, the greater 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 be taken as 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 of local bright light is very high. At this time, the third weight can be taken as 1. That is to say, in the implementation method of using ambient brightness as an influencing factor of the target weight, the present application scheme is only for dark light shooting scenes such as night scenes. If shooting is performed in a bright light scene, it can be considered that overexposure that affects the user experience will not occur, and the third weight is reset to 0, resulting in a target weight of 0 and an exposure value deviation of 0. At this time, no exposure correction is required, that is, there is no need to execute the subsequent step S230.
[0120] 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 based on 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.
[0121] When determining one or more of the oversaturation ratio, zoom ratio, and ambient brightness, the target weight can be determined based on one or more of these parameters. This application does not limit the specific implementation method of determining the target weight. Assuming that the target weight is determined based on the oversaturation ratio, zoom ratio, and ambient brightness in the current scene, it can be calculated according to the following formula: ; Among them, wt represents the target weight, over_sat_wt represents the first weight corresponding to the oversaturation ratio, zoom_factor_wt represents the second weight corresponding to the zoom ratio, and lv_wt represents the third weight corresponding to the ambient brightness.
[0122] In a 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: ; Among them, evd represents the exposure value deviation, wt represents the target weight, M is the number of Grids in the target image, and evd i Indicates the exposure value deviation of the i-th Grid among M Grids (which can be expressed by the dynamic range of the i-th Grid), pos_wt i Represents the position weight corresponding to the i-th Grid.
[0123] S230: Determine a light metering strategy according to the exposure value deviation.
[0124] S240: Process the target image according to the light metering strategy to obtain light metering information.
[0125] Exemplarily, after the exposure value deviation is determined, a light metering strategy is determined according to the exposure value deviation.
[0126] In an example, when the exposure value deviation is less than or equal to the first threshold, it indicates that the current scene is in a medium-low light metering scene, and a preset light metering method may be used to process the target image. The preset light metering strategy may be, for example, expose to the right (ETTR).
[0127] When the exposure value deviation is greater than or equal to the first threshold, it indicates that the current scene is a medium-high light metering scene. At this time, a corresponding light metering method may be used to process the target image, such as a spot light metering mode.
[0128] S250: Determine target exposure parameters according to the light metering information.
[0129] S260: performing exposure processing on the target image according to the target exposure parameters.
[0130] Exemplarily, after obtaining the photometric information, the corresponding target exposure parameter is determined according to the photometric information. It should be understood that the photometric 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.
[0131] After the electronic device processes the target image using the target exposure parameters, it may display the obtained image in the preview area, or it may save the image based on user instructions, which is not limited in the present application.
[0132] In summary, the embodiment of the present application provides an image exposure method, in which exposure parameters matching the current shooting scene can be determined based on the exposure value deviation of the current scene, thereby enabling accurate exposure of the target image, making the image obtained after exposure more suitable for human viewing and improving the user experience.
[0133] Specifically, in some shooting scenes, there may sometimes be an uneven brightness distribution, or large differences in brightness between different areas (that is, some areas are too bright, and some areas are too dark). If the target image is exposed according to existing strategies, inaccurate exposure may occur, such as overexposure or underexposure, which affects the user experience. The embodiment of the present application can comprehensively determine the exposure value deviation of the current shooting scene based on one or more of the dynamic range of different Grids in the target image, the position weights of different Grids, the oversaturation ratio, the zoom factor, the ambient brightness, etc., so that the exposure value deviation can more accurately characterize the deviation between the currently used exposure parameters and the target exposure parameters, so that the adjustment direction of the metering strategy can be determined according to the exposure value deviation, so that the metering strategy is more in line with the current shooting scene, the exposure accuracy of the target image is improved, and the imaging quality is guaranteed. For specific effects, please refer to Fig. 9 : Fig. 9 (a) shows the user interface 14, and the related description can be found in Figure 3 The corresponding content of (b) in . Fig. 9(a) in the figure is explained by taking the night scene superimposed zoom scene as an example. In this example, no exposure correction is performed, that is, the metering strategy is not adjusted based on the actual shooting scene. Therefore, the illuminated text in the light sign 141 in the middle position is overexposed, affecting the image quality. After re-adjusting the exposure parameters using the solution provided by the present application, the following can be obtained: Fig. 9 In the user interface 15 shown in (b), a light sign 151 is displayed in the preview area of the user interface 15. As can be seen from the figure, the luminous characters in the light sign 151 are not overexposed, thereby improving the user experience.
[0134] It is understandable that the technical solution provided by the present application can be integrated into an electronic device as a function, and the electronic device can turn on or off the function according to user instructions, or can decide to turn on or off the function independently, or can always turn on the function by default, and the present application does not limit this. Fig.10 Several examples are given. In this example, the electronic device is taken as a mobile phone.
[0135] In one example, the electronic device turns the function on or off according to a user instruction. Fig.10 (a) in FIG. 1 shows an exemplary user interface 21 for displaying applications installed on a mobile phone. Fig.10 As shown in (a) of FIG. 1 , the user interface 21 displays a page with application icons, which may include multiple application icons, including a setting application icon 210. The setting application icon 210 may be used to trigger the launch of a setting application. The camera application is an application used to set system functions or application functions on electronic devices such as smartphones and tablets. This application does not limit the name of the application.
[0136] In response to the user clicking the setting application icon 210, the electronic device displays the following Fig.10 The user interface 22 shown in (b) in FIG. The user interface 22 includes multiple function options, such as "wireless network", "Bluetooth", "camera", etc. Each function option corresponds to a jump control, and the user can control the electronic device to display detailed setting interfaces of different function options based on these jump controls.
[0137] In response to the user's click operation on the jump control 220, the electronic device displays the following Fig.10The user interface 23 shown in (c) in the figure includes a switch control 230, which is used to control the turning on and off of the "adaptive adjustment of night scene exposure" function. It should be understood that the "adaptive adjustment of night scene exposure" function is a function that integrates the solution of the present application, and the name is only used as an 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 adjustment of night scene exposure" function. After the function is turned on, when entering the shooting scene, the electronic device will determine whether the exposure parameters need to be corrected according to the solution provided in the embodiment of the present application.
[0138] In another example, when the electronic device switches to the night scene shooting mode, the "adaptive adjustment of night scene exposure" function is automatically turned on; when the electronic device switches to other modes other than the night scene shooting mode, the "adaptive adjustment of night scene exposure" function is automatically turned off. Fig.10 In (d), in response to the user selecting the "night scene" mode in the camera mode options, the electronic device switches to the night scene shooting mode and automatically turns on the "adaptive adjustment of night scene exposure" function.
[0139] In yet another example, after the electronic device is turned on, the "adaptive adjustment of night scene exposure" function is always turned on.
[0140] Corresponding to the method provided in the above embodiment, 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 micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system with a layered architecture as an example, and combines Fig.11 The software structure of the electronic device is exemplified.
[0141] like Fig.11 As shown, the layered architecture divides the software into several layers, each with 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 (Android runtime) and a system library, a hardware abstraction layer (HAL) and a kernel layer. It should be noted that the embodiment of the present application is illustrated by taking the Android system as an example. In other operating systems (such as IOS systems, etc.), as long as the functions implemented by each functional module are similar to those of the embodiment of the present application, the solution of the present application can also be implemented.
[0142] Among them, the application layer can include a series of application packages.
[0143] The application package can include applications such as camera, gallery, calendar, call, map, navigation, wireless local area networks (WLAN), Bluetooth, music, video, short message, lock screen application, setting application, etc.
[0144] Fig.11 Take the camera application related to the embodiment of the present application as an example. Among them, the camera application has the functions of shooting and recording. In response to the user's operation of opening the camera application, the electronic device can shoot or record. It is understandable that the shooting and 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 and perform face recognition or face unlocking based on the image captured.
[0145] The application framework layer provides an application programming interface (API) and a programming framework 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, etc., and the embodiments of the present application do not impose any restrictions on this.
[0146] Fig.11 Take the Camera Service related to the embodiment of the present application as an example. The Camera Service can be started when the electronic device is turned on, and can be used to transmit and save relevant information of the camera.
[0147] The HAL layer is an encapsulation of the Liux kernel driver, providing an interface to the upper layer and shielding the implementation details of the low-level hardware.
[0148] The HAL layer can include Wi-Fi HAL, audio HAL, and camera HAL.
[0149] Fig.11 Take the camera HAL related to the embodiment of the present application as an example. Among them, the camera HAL is the core software framework of the camera. In the embodiment of the present application, the HAL layer also includes an automatic exposure algorithm module for adjusting exposure parameters according to the target image.
[0150] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, sensor driver, etc.
[0151] Fig.11 Take the camera driver related to the embodiment of the present application as an example. The camera driver is the driver layer of the Camera device, which is mainly responsible for the interaction with the hardware.
[0152] In the embodiment of the present application, the camera driver may include a driver corresponding to the rear main camera, a driver corresponding to the wide-angle tweezer camera, a driver corresponding to the telephoto camera, and a driver corresponding to the front camera, etc. Among them, the driver corresponding to the front camera may include a driver corresponding to the front main camera and a driver corresponding to the TOF camera.
[0153] The hardware layer includes displays, cameras, various sensors, etc.
[0154] Fig.11 Take the camera and ambient light sensor related to the embodiment 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.
[0155] The following is an exemplary description of the interaction process between the modules.
[0156] like Fig.11 As shown, in response to the user opening the camera application or other applications calling the camera application, the camera application of the application layer can send a shooting request to the camera service of the application framework layer. The shooting request may include parameters such as the camera identification (identity, ID) and shooting mode corresponding to the current shooting scene. The camera service can directly send the shooting request to the camera HAL of the HAL layer. After receiving the shooting request, the camera HAL can trigger the camera driver to turn on the corresponding camera. For example, the camera driver can turn on the corresponding camera according to the camera ID corresponding to the current shooting scene. The turned-on camera can collect image data and report the image data to the camera HAL through the camera driver. The camera HAL can 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. The specific implementation method can refer to the description of step S220 in method 200; it should be understood that in 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 repeated here. The metering strategy decision module is used to determine the metering strategy suitable for the current shooting scene according to the exposure value deviation. 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. The specific implementation method can refer to step S240 in method 200; the exposure parameter decision module is used to determine the target exposure parameters based on the metering information. The specific implementation method can refer to step S250 in method 200.
[0157] It should be noted that the shooting scenes mentioned in the embodiments of the present application may include scenes of shooting (taking photos or recording videos) in different shooting modes after the electronic device turns on the camera application, and shooting scenes in which other applications call the camera application to shoot. Among them, the shooting scenes in different shooting modes after the electronic device turns on the camera application may include scenes of the electronic device in a multi-lens shooting mode and scenes of the electronic device in a single-lens shooting mode. Among them: Multi-lens shooting mode refers to a mode in which an electronic device shoots through multiple cameras. When the electronic device is in multi-lens shooting mode, the display screen simultaneously displays images taken by multiple cameras in the shooting preview interface. Images taken by different cameras can be displayed in a spliced manner or in a picture-in-picture manner. Among them, according to the type of camera used by the electronic device and the display method of images taken by different cameras, multi-lens shooting may include front-to-back shooting mode, rear-to-rear shooting mode, picture-in-picture shooting mode, single front shooting mode (referred to as single front mode), single rear shooting mode and other sub-modes. In an embodiment of the present application, multi-lens shooting may include multi-lens video recording and multi-lens photo taking.
[0158] Front and rear shooting mode refers to a mode in which an electronic device can shoot with the front camera and the rear camera at the same time. When the electronic device is in the front and rear shooting mode, the images taken by the front camera and the rear camera (for example, the first image and the second image) can be displayed simultaneously in the shooting preview interface, and the first image and the second image are spliced and displayed. Specifically, when the electronic device is placed vertically, the first image and the second image can be spliced up and down; when the electronic device is placed horizontally, the first image and the second image can be spliced left and right. By default, the display area of the first image is the same as the display area of the second image.
[0159] Rear-to-rear shooting mode refers to a mode in which an electronic device can shoot simultaneously through two rear cameras (if there are multiple rear cameras). When the electronic device is in rear-to-rear shooting mode, the electronic device can simultaneously display the images (for example, the first image and the second image) taken by the two rear cameras in the shooting preview interface, and the first image and the second image are spliced and displayed. Among them, when the electronic device is placed vertically, the first image and the second image can be spliced up and down; when the electronic device is placed horizontally, the first image and the second image can be spliced left and right.
[0160] Picture-in-picture shooting mode refers to a mode in which an electronic device can shoot through two cameras at the same time. When the electronic device is in picture-in-picture shooting mode, the images taken by the two cameras (for example, the first image and the second image) can be displayed simultaneously in the shooting preview interface. 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 the display area 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.
[0161] The single front shooting mode refers to the mode in which the electronic device shoots through the front camera. The single rear shooting mode refers to the mode in which the electronic device shoots through the rear camera. Unlike the ordinary front shooting mode and rear shooting mode, in the single front shooting and single rear shooting sub-modes in the multi-lens shooting mode, the user can use the air-changing lens function in the multi-lens shooting mode, that is, the camera can be switched through air gestures. For example, you can switch from the single front shooting mode to the single rear shooting mode, or from the single rear shooting mode to the front and rear shooting modes, etc., without limitation here.
[0162] Single-lens shooting mode refers to a mode in which an electronic device uses only one camera to shoot. In single-lens shooting mode, the electronic device only displays images shot by one camera in the shooting preview interface. Among them, single-lens shooting can include front-facing shooting mode, rear-facing shooting mode, etc.
[0163] The front-facing shooting mode refers to a mode in which the electronic device shoots images through the front-facing camera. When the electronic device is in the front-facing shooting mode, the image shot by the front-facing camera can be displayed in real time on the shooting preview interface.
[0164] Optionally, the front-facing shooting mode may include face recognition, face unlocking, portrait, photo (normal photo), video, short video, watermark, time-lapse photography, dynamic photo and other shooting sub-modes.
[0165] The rear-camera shooting mode refers to a mode in which an electronic device shoots images through a rear-camera. When the electronic device is in the rear-camera shooting mode, the image shot by the rear-camera can be displayed in real time on the shooting preview interface.
[0166] Optionally, the rear-camera shooting modes may include photo (normal photo), high-pixel photo, video (normal video) 60fps video, short video, watermark, dynamic photo, slow-motion shooting, portrait mode, large aperture, time-lapse photography (timelapse), professional, super macro and other shooting sub-modes.
[0167] Both the rear-camera shooting mode and the front-camera shooting mode can include shooting sub-modes such as photo taking, video recording, short video, watermark, dynamic photo, time-lapse photography, etc. However, due to the different cameras activated, the camera modes (sensormode) corresponding to the shooting sub-modes such as photo taking, video recording, short video, watermark, dynamic photo, time-lapse photography, etc. in the rear-camera shooting mode and the shooting sub-modes such as photo taking, video recording, short video, watermark, dynamic photo, time-lapse photography, etc. in the front-camera shooting mode may be different. In other words, the shooting scenes corresponding to the shooting sub-modes such as photo taking, video recording, short video, watermark, dynamic photo, time-lapse photography, etc. in the rear-camera shooting mode and the shooting scenes corresponding to the shooting sub-modes such as photo taking, video recording, short video, watermark, dynamic photo, time-lapse photography, etc. in the front-camera shooting mode can be regarded as different shooting scenes.
[0168] It should be noted that the above-mentioned “multi-lens shooting mode”, “front and rear shooting mode”, “picture-in-picture shooting mode”, “rear-to-rear shooting mode”, “single-lens shooting mode”, “front shooting mode” and “rear shooting mode” are just some names used in the embodiments of the present application. The meanings they represent have been recorded in the embodiments of the present application, and the names cannot constitute any limitation to the embodiments.
[0169] Scenarios in which other applications call the camera application for shooting may include face recognition scenarios, face unlocking scenarios, face payment scenarios, and photo / video recording function call scenarios.
[0170] Among them, the face unlocking scenario may refer to a scenario in which the lock screen application calls the shooting function of the camera application and performs face unlocking based on the captured image.
[0171] The face recognition scenario may refer to a scenario in which an application such as a banking application or a financial management application calls the shooting function of a camera application when performing identity authentication and performs face recognition based on the captured image.
[0172] The face payment scenario may refer to a scenario in which applications such as banking applications and financial management applications call the shooting function of the camera application when performing face payment, and perform face recognition and payment based on the captured images.
[0173] The photo / video recording function calling scenario may refer to a scenario in which other applications call the shooting function of the camera application to take pictures or videos.
[0174] Corresponding to the method and software architecture diagram given in the above embodiment, the present application also provides a hardware structure of an electronic device, such as Fig.12 shown.
[0175] See also Fig.12The 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 .
[0176] The structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In some embodiments of the present application, the electronic device may include more components than those shown in the figure.
[0177] For example, mobile communication module, wireless communication module, audio module, speaker, receiver, microphone, headphone jack, subscriber identity module (SIM) card slot, button, universal serial bus (USB) interface, charging management module, power management module, battery, motor, indicator, etc.
[0178] In some embodiments of the present application, the electronic device may include fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware. The interface connection relationship between the modules shown in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device.
[0179] The processor may include one or more processing units, for example, the processor may include an application processor (AP), a modem processor, a graphics processor (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 (codec) 411 can be used to transform a signal or a data stream. A memory can also be set in the processor for storing instructions and data.
[0180] The electronic device can realize the display function through GPU, display screen, and application processor. GPU is a microprocessor for image processing, connecting the display screen and the application processor. 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.
[0181] 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 and an image sensor. The image sensor is a photosensitive element. Light is transmitted to the image sensor through the lens, and the light signal is converted into an electrical signal. The image sensor then transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye.
[0182] It is understandable that the image sensor mentioned in the present application may be a semiconductor chip, including but not limited to a charge coupled device (CCD) and a complementary metal-oxide-semiconductor (CMOS).
[0183] It is understandable that the electronic device may include one or more cameras. In some embodiments of the present application, the electronic device may include a main camera (i.e., main camera) and a secondary camera. In simple terms, the main camera refers to the camera that is mainly responsible for shooting, which is generally used to capture the subject (i.e., the subject of shooting) for daily shooting. The main camera has a wide range of applications and can be used in most shooting scenes. The secondary camera is generally used to assist in shooting, and the secondary camera can be used to supplement the image brightness and details, as well as special shooting scenes such as long-distance shooting and wide-angle shooting. In a possible implementation, the main camera may be a wide-angle camera (wide camera), and the secondary camera may be a telephoto camera (tele camera) or an ultra-wide camera. A wide camera usually refers to a wide-angle lens, which refers to a lens with a larger field of view. Shooting with a wide camera can capture a wide picture. A tele camera usually refers to a telephoto lens, which refers to a lens with a smaller 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-angle camera, and an ultra-wide camera is usually used to shoot scenes within a wider field of view.
[0184] 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 executable programs (e.g., machine instructions) of the operating system or 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 loaded into the random access memory in advance for direct reading and writing by the processor.
[0185] In the embodiment of the present application, the code for implementing the image exposure method described in the embodiment of the present application may be stored in a non-volatile memory. When running the camera application, the electronic device may load the executable code stored in the non-volatile memory into the random access memory.
[0186] In some embodiments of the present application, the electronic device may be provided with a light metering system. The light metering system may be used to determine the ambient brightness and the ambient dynamic range. The light metering system may be used to measure the brightness of light reflected by the subject, i.e., reflective light metering. The light metering system may include a light metering element, and the electronic device may automatically measure the amount of light entering through the light metering element, thereby obtaining the measured light brightness.
[0187] The sensor 450 may include an ambient light sensor for collecting the brightness of the surrounding environment. Optionally, the sensor 450 may also include other types of sensors, such as a pressure sensor, a gyroscope sensor, an air 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.
[0188] This is the end of the introduction to the hardware structure of electronic equipment. It is understandable that Fig.12 The components included in the hardware structure shown 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.
[0189] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0190] An embodiment of the present application provides a computer program product. When the computer program product runs on a device, the device can implement the steps in the above-mentioned method embodiments when the device is executed.
[0191] The embodiment of the present application provides a chip, the chip is used to execute instructions, when the chip is running, the technical solution in the above embodiment is executed. The implementation principle and technical effect are similar, and will not be repeated here.
[0192] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by 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 process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber1ine, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DWD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0193] 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, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0194] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0195] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0196] In the several embodiments provided in the present 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 only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0197] It should be understood that the "embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the various embodiments in the entire specification do not necessarily refer to the same embodiment. 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 various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0198] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
[0199] In addition, it should be noted that the various numerical numbers involved in this application (such as the terms "first", "second", "third", "fourth" and other various terminology labels (if any) in the specification and claims and the above-mentioned drawings) are only distinguished for the convenience of description and are not used to limit the scope of this application. The size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic.
[0200] The terms "including" and "having" and any variations thereof mean "including but not limited to" unless specifically emphasized otherwise. For example, a process, method, system, product or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed but may include other steps or units not explicitly listed or inherent to such process, method, product or apparatus.
[0201] In the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0202] In the various embodiments of the present application, if there is no special explanation and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships. The specific operating methods in the method embodiments of the present application can also be applied to device embodiments or system embodiments.
Claims
1. An image exposure method, applied to electronic equipment, characterized in that: The method comprises: Get the target image; Determine an exposure value deviation of the current shooting scene according to the target image, wherein 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; determining a light metering strategy according to the exposure value deviation; Processing the target image according to the photometry strategy to obtain photometry information; determining a target exposure parameter according to the light metering information; The target image is exposed according to the target exposure parameter.
2. The method according to claim 1, characterized in that The step of determining the exposure value deviation according to the target image comprises: Divide the target image into M grids, where M is an integer greater than 1; The exposure value deviation is determined according to the dynamic range of each of the M Grids.
3. The method according to claim 2, characterized in that The M is determined according to the hardware capability of the electronic device, and the M is less than a first threshold.
4. The method according to claim 2, characterized in that: The determining the exposure value deviation according to the dynamic range of each Grid in the plurality of Grids includes: The exposure value deviation is determined according to the dynamic range of each Grid in the multiple Grids and the position weight corresponding to each Grid.
5. The method according to claim 4, characterized in that The method further comprises: Divide the target image into multiple regions according to preconfigured information, each region includes multiple Grids, each region has a different distance from the center point of the target image, and each region has a different corresponding position weight, and the distance from the center point is inversely proportional to the position weight; According to the area where each Grid is located, the position weight corresponding to each Grid is determined.
6. The method according to claim 4, characterized in that The method further comprises: Based on the artificial intelligence analysis result of the target image and / or the depth information of the target image, the target image is divided into multiple regions, each region includes multiple grids, each region corresponds to a different degree of interest, each region corresponds to a different position weight, and the size of the position weight is proportional to the degree of interest; According to the area where each Grid is located, the position weight corresponding to each Grid is determined.
7. The method according to claim 4, characterized in that Determining the exposure value deviation according to the dynamic range of each Grid in the plurality of Grids and the position weight corresponding to each Grid includes: The exposure value deviation is determined according to the dynamic range of each Grid in the plurality of Grids, the position weight corresponding to each Grid, and one or more of the following parameters: Oversaturation ratio, zoom ratio, ambient brightness; Among them, the oversaturation ratio is the proportion of grids whose dynamic range exceeds the second threshold among all grids of the target image; the zoom ratio is the zoom ratio used when acquiring the target image, and the target image is obtained by zooming in on the original image using the zoom ratio; the ambient brightness is the brightness of the surrounding environment of the current shooting scene.
8. The method according to claim 7, characterized in that The determining the exposure value deviation according to the dynamic range of each Grid in the plurality of Grids, the position weight corresponding to each Grid, and one or more of the following parameters includes: Determine the 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 oversaturation ratio, and within a first preset range, the oversaturation ratio is 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 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; The exposure value deviation is determined according to the target weight, the dynamic range of each Grid in the multiple Grids, and the position weight corresponding to each Grid.
9. An electronic device, characterized in that: The electronic device comprises 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 as claimed in any one of claims 1 to 8.
10. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1-8.
11. A computer program product, characterized in that The invention comprises a computer program, which, when being executed, enables the method according to any one of claims 1 to 8 to be performed.
Citation Information
Patent Citations
Exposure compensation method, exposure compensation device and terminal equipment
CN107249105A
Method for adjusting picture brightness, terminal and storage medium
CN108200352A
Infrared image brightness evaluation method and device, exposure control method and device and medium
CN114765666A
Cited By
Automatic exposure parameter linkage control method for photographic equipment
CN121815086A