Image processing method and device, electronic equipment and computer readable storage medium

By collecting and analyzing image brightness information, determining the reference and target exposure amounts, and performing exposure compensation, the problem of exposure compensation deviation in the prior art is solved and the image shooting effect is improved.

CN120186472APending Publication Date: 2025-06-20GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510400007.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

In the prior art, there is a compensation deviation in the exposure compensation function, which leads to a decrease in image shooting effect.

Method used

The camera collects the first frame image and the second frame image respectively, acquires the first brightness information of the first frame image, determines the first exposure amount as the reference exposure amount, and determines the target exposure amount based on the configured exposure amount adjustment value and the reference exposure amount, and performs exposure compensation.

Benefits of technology

The accuracy of exposure compensation is improved, the shooting effect of the image is enhanced, and the exposure compensation deviation is avoided due to inaccurate metering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120186472A_ABST
    Figure CN120186472A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of image processing, and discloses an image processing method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: collecting a first frame image and a second frame image through a camera; obtaining first brightness information of the first frame image, and determining a first exposure quantity as a reference exposure quantity according to the first brightness information; according to the configured exposure amount adjustment value and the reference exposure amount, determining a target exposure amount; and performing exposure compensation on the second frame image according to the target exposure quantity to obtain a first preview image. By implementing the embodiment of the invention, the accuracy of exposure compensation can be improved, and the shooting effect of the image is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and particularly to an image processing method, an apparatus, an electronic device, and a computer-readable storage medium. Background Art

[0002] The exposure compensation (or exposure value adjustment) function is widely used in digital cameras and smartphone cameras. However, in practice, it is found that the current exposure compensation function has a deviation in compensation, which reduces the shooting effect of images. Summary of the Invention

[0003] Embodiments of this application disclose an image processing method, an apparatus, an electronic device, and a computer-readable storage medium, which can improve the accuracy of exposure compensation and thus improve the shooting effect of images.

[0004] In a first aspect, an embodiment of this application discloses an image processing method, which includes:

[0005] Acquiring a first frame image and a second frame image respectively through a camera;

[0006] Obtaining first brightness information of the first frame image, and determining a first exposure amount as a reference exposure amount according to the first brightness information;

[0007] Determining a target exposure amount according to a configured exposure amount adjustment value and the reference exposure amount;

[0008] Performing exposure compensation on the second frame image according to the target exposure amount to obtain a first preview image.

[0009] In a second aspect, an embodiment of this application discloses an image processing apparatus, which includes:

[0010] A first acquisition unit, configured to acquire a first frame image and a second frame image respectively through a camera;

[0011] A first determination unit, configured to obtain first brightness information of the first frame image, and determine a first exposure amount as a reference exposure amount according to the first brightness information;

[0012] A second determination unit, configured to determine a target exposure amount according to a configured exposure amount adjustment value and the reference exposure amount;

[0013] A compensation unit, configured to perform exposure compensation on the second frame image according to the target exposure amount to obtain a first preview image.

[0014] In a third aspect, an embodiment of this application discloses an electronic device, including:

[0015] A memory storing executable program code;

[0016] A processor coupled to the memory;

[0017] The processor invokes the executable program code stored in the memory and executes the image processing method disclosed in the first aspect of the embodiments of the present application.

[0018] The fourth aspect of the embodiments of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the image processing method disclosed in the first aspect of the embodiments of the present application.

[0019] The fifth aspect of the embodiments of the present application discloses a computer program product, which, when running on a computer, causes the computer to execute some or all of the steps of any one of the methods in the first aspect of the embodiments of the present application.

[0020] The sixth aspect of the embodiments of the present application discloses an application publishing platform for publishing a computer program product, wherein, when the computer program product runs on a computer, it causes the computer to execute some or all of the steps of any one of the methods in the first aspect of the embodiments of the present application.

[0021] Compared with the related art, the embodiments of the present application have the following beneficial effects:

[0022] In the embodiments of the present application, the first frame image and the second frame image can be respectively collected by a camera; and then the first brightness information of the first frame image is obtained. Since the first frame image is an image without exposure adjustment and there is no situation where the brightness exceeds the saturation threshold of the image sensor due to overexposure, the measured first brightness information is accurate; and then the first exposure amount determined subsequently based on the first brightness information does not deviate either. Therefore, the first exposure amount can be used as the reference exposure amount.

[0023] Furthermore, the target exposure amount corresponding to the exposure adjustment value can be determined according to the exposure adjustment value and the reference exposure amount; it should be noted that during the process of determining the target exposure amount through the exposure adjustment value and the reference exposure amount, there is no need for a light measurement process anymore, and there is no problem of inaccurate light measurement, avoiding the deviation due to inaccurate light measurement. Therefore, the determined target exposure amount satisfies the normal linear relationship with the reference exposure amount, which can improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improve the shooting effect of the image. Description of the Drawings

[0024] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0025] Figure 1 It is a schematic diagram of an exposure compensation function interface disclosed in an embodiment of the present application;

[0026] Figure 2 It is a schematic diagram of an exposure compensation effect disclosed in an embodiment of the present application;

[0027] Figure 3 It is a schematic flowchart of an image processing method disclosed in an embodiment of the present application;

[0028] Figure 4 It is a schematic flowchart of an image processing method disclosed in an embodiment of the present application;

[0029] Figure 5 It is a schematic flowchart of another image processing method disclosed in an embodiment of the present application;

[0030] Figure 6 It is a schematic diagram of a shooting preview interface disclosed in an embodiment of the present application;

[0031] Figure 7 It is a schematic diagram of another shooting preview interface disclosed in an embodiment of the present application;

[0032] Figure 8 It is a schematic flowchart of yet another image processing method disclosed in an embodiment of the present application;

[0033] Figure 9 It is a schematic diagram of the structure of an image processing device disclosed in an embodiment of the present application;

[0034] Figure 10 It is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. Detailed implementation manners

[0035] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.

[0036] It should be noted that the terms "first", "second", "third", "fourth", etc. in the description and claims of this application are used to distinguish different objects, rather than to describe a specific order. The terms "include" and "have" in the embodiments of this application and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or devices.

[0037] The embodiments of this application disclose an image processing method, apparatus, electronic device, and computer-readable storage medium, which can improve the accuracy of exposure compensation for images and thus improve the shooting effect of images.

[0038] The technical solution of this application will be described in detail below in conjunction with specific embodiments.

[0039] To introduce the method disclosed in the embodiments of this application more clearly, the exposure compensation method in the related art will be introduced first.

[0040] The exposure compensation (or exposure value adjustment) function is widely used in digital cameras and smartphone cameras. This function refers to adjusting the brightness of an image by manually increasing or decreasing the exposure amount on the basis of automatic exposure calculation to achieve a more ideal exposure effect. The exposure compensation function interface in a mobile phone is as Figure 1 shown, Figure 1 which is a schematic diagram of an exposure compensation function interface disclosed in the embodiments of this application. Among them, Figure 1 (a) is the interface without adjusting the exposure value; Figure 1 (b) is the interface for manually decreasing the exposure value; Figure 1 (c) is the interface for manually increasing the exposure value.

[0041] In the related art, automatic exposure calculation refers to the calculation process of determining exposure compensation based on the brightness information of the captured image through the Auto Exposure Control (AEC) algorithm. Among them, when the brightness of the captured image is low, positive exposure compensation can be performed to increase the brightness of the image; when the brightness of the captured image is high, negative exposure compensation is performed to reduce the brightness of the image and avoid overexposure of the image.

[0042] Adjusting the brightness of an image by manually increasing or decreasing the exposure amount refers to manual exposure compensation. Manual exposure compensation requires the user to configure the EV adjustment value according to the requirements, and then the camera can adjust the exposure amount of the camera according to the configured EV adjustment value to achieve the effect of adjusting the brightness of the image. Among them, EV refers to the exposure value (Exposure Value, EV).

[0043] Manual exposure compensation satisfies the following relational expression (1): Change in picture brightness = 2 ^ EV adjustment value;

[0044] It has been found in practice that when the captured picture undergoes manual exposure compensation, if the captured picture is overexposed, the captured picture is easily affected by the saturation threshold of the image sensor, which in turn leads to a situation where the brightness information obtained by the AEC algorithm is smaller than the actual situation. When the metering result is inaccurate, automatic exposure compensation through the AEC algorithm will deviate, resulting in a poor exposure compensation effect.

[0045] It should be noted that the saturation threshold of the image sensor is "0 (black) - 255 (white)". If the brightness of the captured picture is between "0 (black) - 255 (white)", for example, the brightness is "200", the picture will have texture. If the brightness exceeds "225", the picture will be "clipped" to pure white (#FFFFFF). That is, assuming that the brightness after manual exposure compensation should be greater than "225", for example: 300, 320; but in fact, the maximum brightness information that can be collected is only "225", resulting in a situation where the brightness information obtained by the AEC algorithm is smaller than the actual situation, and in turn leading to a deviation in the exposure compensation of the AEC algorithm.

[0046] Exemplarily, please refer to Figure 2 , Figure 2 is a schematic diagram of the exposure compensation effect disclosed in an embodiment of the present application. Among them, the abscissa represents the "EV adjustment value", and the ordinate represents the "change value of brightness (Luma)". The Luma value is the encoded representation of brightness information in image processing.

[0047] Taking the EV adjustment value of "+3" as an example, according to the relational expression (1) introduced above, under normal circumstances, the picture brightness at this time should be 8 times that before exposure compensation (as shown by the solid line in Figure 2 ).

[0048] However, if the picture is overexposed when the EV adjustment value is "+3", that is, the brightness after compensation should be greater than "225", but in fact, the maximum brightness information that can be collected is only "225", and the brightness information obtained by the AEC algorithm is smaller than the actual situation. In this regard, the AEC algorithm will superimpose more positive exposure compensation than normal, resulting in a deviation in the exposure compensation of the AEC algorithm (as shown by the dashed line in Figure 2 ).

[0049] Embodiments of the present application disclose an image processing method, which can be applied to various electronic devices with image processing functions, including: portable electronic devices such as mobile phones and tablets, wearable devices such as smart watches and smart bracelets, or imaging devices such as cameras and surveillance cameras, which are not limited here.

[0050] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of an image processing method disclosed in embodiments of the present application. Among them: The image sensor (camera) 302 can respectively collect a first frame of image and a second frame of image;

[0051] Furthermore, the image sensor 302 sends the first frame of image to the statistics module 304 of the Image Signal Processing (ISP) to obtain the first brightness information of the first frame of image through the statistics module 304;

[0052] Furthermore, the statistics module 304 can send the first brightness information of the first frame of image to the processor, and the processor determines the first exposure amount as the reference exposure amount through the AEC algorithm;

[0053] Obtain the configured exposure amount adjustment value, and determine the target exposure amount according to the exposure amount adjustment value and the reference exposure amount;

[0054] Furthermore, the processor can send the reference exposure amount and the target exposure amount to the image sensor 302;

[0055] Furthermore, the image sensor 302 can send the second frame of image and the target exposure amount to the image processing module 306 of the image signal processor. Furthermore, the image processing module 306 can perform exposure compensation on the second frame of image according to the target exposure amount to obtain the first preview image;

[0056] Furthermore, the first preview image can be output and displayed.

[0057] Implementing the above method, since the first frame of image is an image without exposure amount adjustment and there is no situation where overexposure causes the brightness to exceed the saturation threshold of the image sensor, the measured first brightness information is accurate; furthermore, the first exposure amount determined according to the first brightness information subsequently does not deviate, and thus the first exposure amount can be used as the reference exposure amount.

[0058] Further, if the exposure adjustment value configured by the user in the shooting preview interface, the target exposure corresponding to the exposure adjustment value can be determined according to the exposure adjustment value and the reference exposure. It should be noted that during the process of determining the target exposure by the exposure adjustment value and the reference exposure, there is no need for a metering process, and there is no problem of inaccurate metering, avoiding the deviation due to inaccurate metering. Therefore, the determined target exposure satisfies the normal linear relationship with the reference exposure, thereby improving the accuracy of subsequent exposure compensation for the second image frame according to the target exposure, and further improving the shooting effect of the image.

[0059] Based on this, the following introduces an image processing method, device, electronic device, and computer-readable storage medium disclosed in the embodiments of the present application.

[0060] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of an image processing method disclosed in the embodiments of the present application. Optionally, this method can be applied to the electronic device introduced above, or other execution entities, which are not limited herein. Optionally, this method may include the following steps:

[0061] 402. Collect the first frame image and the second frame image through the camera respectively.

[0062] In the embodiments of the present application, the similarity between the first frame image and the second frame image can be greater than the similarity threshold. That is, in the embodiments of the present application, the similarity between the first frame image and the second frame image collected by the camera is very high and almost the same.

[0063] Optionally, the camera can collect the first frame image and the second frame image respectively for the same scene, according to the same shooting parameters, and the collection interval is less than the duration threshold, so that the similarity between the first frame image and the second frame image is greater than the similarity threshold.

[0064] Among them, the duration threshold and the similarity can be set by developers according to a large amount of development experience. Typical values of the duration threshold can include: 0.1 second, 0.2 second, etc., and typical values of the similarity threshold can include: 95%, 98%, etc., which are not limited herein.

[0065] Please refer to again Figure 3 , and subsequently, the electronic device can send the first frame image among them into the "metering link" to obtain the reference exposure and the target exposure; while the second frame image can be sent into the "display link" to perform exposure compensation on the second frame image according to the target exposure, obtain the first preview image, and then display the first preview image for the user to refer to.

[0066] It should be noted that under normal circumstances, the first frame of the image is only used for photometry and is not displayed on the shooting preview interface. Usually, the user cannot see the first frame of the image, so that the image processing method disclosed in the embodiments of the present application can be implemented without the user's perception, improving the user experience.

[0067] 404. Obtain the first brightness information of the first frame of the image, and determine the first exposure amount as the reference exposure amount according to the first brightness information.

[0068] In the embodiments of the present application, the electronic device may send the first frame of the image to the statistical module of the Image Signal Processor (ISP) to determine the first brightness information of the first frame of the image through the statistical module. Among them, the Image Signal Processor (ISP) is a device used to process the image signals output by the front-end image sensor. Image signal processing may include, but is not limited to: statistical brightness information, superimposed exposure compensation, etc.

[0069] Optionally, the electronic device may determine the first brightness information of the first frame of the image by methods such as brightness histogram, brightness mean and standard deviation. The embodiments of the present application do not limit the statistical method of brightness information.

[0070] Further, the electronic device may input the first brightness information into the AEC algorithm, and then the AEC algorithm may calculate the first exposure amount corresponding to the first brightness information.

[0071] Optionally, the manner in which the AEC algorithm determines the first exposure amount may include: the AEC algorithm determines the ideal brightness. Optionally, the ideal brightness may be determined according to the current shooting scene. Then, the target difference between the ideal brightness and the first brightness information may be determined, and then the exposure compensation amount may be determined according to the target difference; the first exposure amount corresponding to the first brightness information may be determined according to the exposure compensation amount.

[0072] The AEC algorithm is already a mature algorithm in the art and will not be elaborated here.

[0073] As introduced above, since the first frame of the image is an image without exposure amount adjustment and there is no situation where overexposure causes the brightness to exceed the saturation threshold of the image sensor, the photometry to obtain the first brightness information is accurate; furthermore, the first exposure amount determined according to the first brightness information subsequently does not deviate. Therefore, the first exposure amount may be used as the reference exposure amount.

[0074] 406. Determine the target exposure amount according to the configured exposure amount adjustment value and the reference exposure amount.

[0075] In the embodiments of the present application, the configured exposure amount adjustment value may include: the exposure amount adjustment value configured by the user. Exemplarily, Figure 1As shown, the configured exposure adjustment values may include: "-3.0", "+3.0", etc., which are not limited herein.

[0076] As introduced above, manual exposure compensation satisfies the following relationship (1): change in picture brightness = 2 ^ EV adjustment value, that is, there is a certain linear relationship between the picture brightness before and after manual exposure compensation. And since there is a positive correlation between picture brightness and exposure amount, the exposure amounts before and after manual exposure compensation also satisfy the above linear relationship.

[0077] In an alternative embodiment, the electronic device may determine the target exposure amount based on the corresponding target relationship between the exposure adjustment value and the amount of change in image brightness, and the configured exposure adjustment value and the reference exposure amount.

[0078] Optionally, the corresponding target relationship between the exposure adjustment value and the amount of change in image brightness may include: taking the target value as the base number and the exposure adjustment value as the exponent for power operation to obtain the amount of change in image brightness.

[0079] Optionally, the electronic device may take the target value as the base number and the configured exposure adjustment value as the exponent for power operation to obtain the target amount of change in image brightness; and then calculate the product of the target amount of change in image brightness and the reference exposure amount to obtain the target exposure amount. Among them, the target value may be set by developers based on a large amount of development experience, and typical values may include 2, 3, etc., which are not limited herein.

[0080] Exemplarily, assuming the target value is 2, then the target exposure amount = reference exposure amount * 2 ^ configured exposure adjustment value.

[0081] Implementing the above method, the electronic device can determine the target exposure amount after manual exposure compensation based on the linear relationship between the exposure amounts before and after manual exposure compensation and the reference exposure amount. During this calculation process, there is no need to perform photometry again and no need to introduce brightness information, thereby avoiding the situation where exposure compensation deviates due to inaccurate photometry, and thus improving the accuracy of subsequent exposure compensation for the second image frame according to the target exposure amount, and further improving the shooting effect of the image.

[0082] In another alternative embodiment, the corresponding target relationship between the exposure adjustment value and the amount of change in image brightness may include: calculating the product of the exposure adjustment value and the target coefficient to obtain the amount of change in image brightness; where the target coefficient may be set by developers based on a large amount of development experience and is not limited herein.

[0083] 408. Perform exposure compensation on the second frame of image according to the target exposure amount to obtain the first preview image.

[0084] In an embodiment of the present application, an electronic device may perform exposure compensation on a second frame of image according to a target exposure amount through an Image Signal Processor (ISP), so that the exposure amount corresponding to the compensated first preview image is the target exposure amount.

[0085] It should be noted that exposure compensation may include: positive exposure compensation and negative exposure compensation. Among them, if the exposure amount of the second frame of image is lower than the target exposure amount, the electronic device may perform positive exposure compensation on the second frame of image according to the target exposure amount to increase the screen brightness;

[0086] If the exposure amount of the second frame of image is higher than the target exposure amount, the electronic device may perform negative exposure compensation on the second frame of image according to the target exposure amount to reduce the screen brightness and avoid overexposure of the image.

[0087] In an embodiment of the present application, the obtained first preview image may be output for the user's reference.

[0088] By implementing the methods disclosed in the above embodiments, the first frame of image and the second frame of image may be respectively captured by a camera; furthermore, the first brightness information of the first frame of image may be obtained. Since the first frame of image is an image without exposure amount adjustment and there is no situation where the brightness exceeds the saturation threshold of the image sensor due to overexposure, the measured first brightness information is accurate; furthermore, the first exposure amount determined subsequently based on the first brightness information does not deviate, and thus the first exposure amount may be used as the reference exposure amount. Further, the target exposure amount corresponding to the exposure amount adjustment value may be determined according to the exposure amount adjustment value and the reference exposure amount; it should be noted that during the process of determining the target exposure amount through the exposure amount adjustment value and the reference exposure amount, there is no need to perform a photometry process, and there is no problem of inaccurate photometry, avoiding the deviation due to inaccurate photometry. Therefore, the determined target exposure amount satisfies the normal linear relationship with the reference exposure amount, thereby being able to improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improving the shooting effect of the image;

[0089] In addition, the electronic device may determine the target exposure amount after manual exposure compensation based on the linear relationship between the exposure amounts before and after manual exposure compensation and the reference exposure amount. There is no need to perform photometry again in this calculation process, and there is no need to introduce brightness information. Therefore, the situation of exposure compensation deviation due to inaccurate photometry can be avoided, thereby being able to improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improving the shooting effect of the image.

[0090] Please refer to Figure 5 , Figure 5It is a schematic flowchart of another image processing method disclosed in an embodiment of the present application. Optionally, this method can be applied to the electronic device introduced above, or other execution entities, which are not limited herein. Optionally, this method may include the following steps:

[0091] 502. Respectively collect a first frame image and a second frame image through a camera.

[0092] As an optional implementation manner, before the electronic device respectively collects the first frame image and the second frame image through the camera, it may display a shooting preview interface. Please refer to Figure 6 , Figure 6 It is a schematic diagram of a shooting preview interface disclosed in an embodiment of the present application. Optionally, the shooting preview interface may include a display area 502, a function area 504, etc. Among them, the display area 502 may be used to display a preview image, and the function area 504 may be used to display a shooting button, an exposure adjustment value, etc., which are not limited herein.

[0093] It should be noted that Figure 6 is only an optional example and should not limit the embodiments of the present application.

[0094] Optionally, the electronic device may obtain the configured exposure adjustment value in response to an exposure adjustment operation. As Figure 6 shown, the obtained exposure adjustment value may be "+3".

[0095] Please refer to Figure 2 again. If the exposure adjustment value is a positive number, that is, the exposure adjustment value corresponds to positive exposure compensation, it is very easy for the subsequent superimposed automatic exposure compensation to deviate; while if the exposure is adjusted to a negative number, that is, the exposure adjustment value corresponds to negative exposure compensation, the subsequent superimposed automatic exposure compensation is basically similar to the ideal brightness change situation in formula (1) and will not deviate seriously.

[0096] Optionally, in this regard, the electronic device may, when determining that the configured exposure adjustment value is greater than a first threshold, that is, when the exposure adjustment value corresponds to positive exposure compensation, respectively collect the first frame image and the second frame image through the camera;

[0097] while if the electronic device can determine that the configured exposure adjustment value is not greater than the first threshold, that is, the exposure adjustment value corresponds to negative exposure compensation, it may collect one frame of image through the camera and execute according to the normal exposure compensation process.

[0098] Among them, the first threshold can be set by developers based on a large amount of development experience, and typical values may include 0, 1, 3, etc., which are not limited herein. Optionally, when the configured exposure adjustment value is greater than the first threshold, it corresponds to positive exposure compensation.

[0099] When implementing the above method, when the electronic device determines that the configured exposure adjustment value is greater than the first threshold, that is, the exposure adjustment value corresponds to positive exposure compensation and it is easy to have compensation deviation, the electronic device can collect the first frame image and the second frame image through the camera respectively, and perform exposure compensation through the method disclosed in the embodiments of the present application to avoid the situation of exposure compensation deviation caused by inaccurate photometry. In addition, if the configured exposure adjustment value is not greater than the first threshold, only one frame of image can be collected and the normal exposure compensation process can be executed, thereby saving the power consumption of the electronic device.

[0100] 504. Obtain the first brightness information of the first frame image, and determine the first exposure amount as the reference exposure amount according to the first brightness information.

[0101] As introduced above, if the captured image is overexposed, the captured image is easily affected by the saturation threshold of the image sensor, resulting in inaccurate photometry results, and then the brightness information obtained by the AEC algorithm is smaller than the actual situation, and then the AEC algorithm deviates when performing automatic exposure compensation, and then the exposure compensation effect is poor.

[0102] In this regard, in the embodiments of the present application, ensuring the accuracy of the first brightness information of the first frame image is one of the key prerequisites. Optionally, when the electronic device obtains the first brightness information of the first frame image, it can determine whether the first brightness information is less than the first brightness threshold;

[0103] If so, it means that the first brightness information is accurate, and the electronic device can determine the first exposure amount as the reference exposure amount according to the first brightness information;

[0104] If not, it means that the first brightness information may be inaccurate, and the electronic device can re-collect a frame of image as the new first frame image and re-execute the step of obtaining the first brightness information of the first frame image.

[0105] Optionally, the first brightness threshold can be set by developers according to a large amount of development experience and is not limited herein. In an alternative embodiment, the first brightness threshold can be determined according to the saturation threshold of the image sensor. Optionally, the first brightness threshold can be less than or equal to the saturation threshold of the image sensor and is not limited herein.

[0106] Exemplarily, assume that the first brightness threshold is equal to the saturation threshold of the image sensor. If the first brightness information is less than the first brightness threshold, it indicates that the first brightness information does not exceed the saturation threshold of the image sensor, which is accurate. However, if the first brightness information is equal to the saturation threshold of the image sensor, the actual brightness of the first frame image may be greater than the saturation threshold of the image sensor. Due to the limitation of the saturation threshold of the image sensor, the collected first brightness information is only equal to the saturation threshold of the image sensor. Therefore, the collected first brightness information is inaccurate.

[0107] By implementing the above method, the electronic device can determine whether the first brightness information is accurate by judging whether the first brightness information of the first frame image is less than the first brightness threshold, whether it is overexposed, and whether it exceeds the saturation threshold of the image sensor. Only when the first brightness information is determined to be accurate, the subsequent step of determining the first exposure amount as the reference exposure amount based on the first brightness information is executed to avoid the situation of exposure compensation deviation due to inaccurate photometry, thereby improving the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improving the shooting effect of the image.

[0108] 506. Determine the target exposure amount according to the configured exposure amount adjustment value and the reference exposure amount.

[0109] 508. Perform exposure compensation on the second frame image according to the target exposure amount to obtain the first preview image.

[0110] 510. Display the shooting preview interface.

[0111] 512. Display the first preview image on the shooting preview interface; or, display the first preview image and the second preview image on the shooting preview interface, where the second preview image is an image obtained by performing exposure compensation on the first frame image according to the reference exposure amount.

[0112] Optionally, the electronic device can display the first preview image in the display area 502 of the shooting preview interface to feedback the picture brightness and picture quality effect after exposure compensation to the user, improving the user experience.

[0113] Please refer to Figure 7 , Figure 7 which is a schematic diagram of another shooting preview interface disclosed in the embodiments of the present application. Optionally, the electronic device can display the first preview image 506 and the second preview image 508 on the shooting preview interface. Optionally, the first preview image 506 and the second preview image 508 can be arranged side by side, one above the other, or one to the left of the other, etc. Figure 7 This is only an optional example and should not limit the embodiments of the present application.

[0114] Among them, the first preview image 506 is obtained by performing exposure compensation on the second frame image according to the target exposure amount, and represents the effect after the user's manual exposure compensation; the second preview image 508 may be an image obtained by performing exposure compensation on the first frame image according to the reference exposure amount, and represents the effect after the exposure compensation by the automatic exposure control algorithm.

[0115] By implementing the above method, the electronic device can respectively output the screen effects after manual exposure compensation and automatic exposure compensation for the user to refer to, so as to provide more exposure compensation effects for the user to choose from, enabling the user to make a flexible choice according to the actual usage requirements, thereby improving the user experience.

[0116] By implementing the methods disclosed in the above embodiments, the target exposure amount corresponding to the exposure amount adjustment value can be determined according to the exposure amount adjustment value and the reference exposure amount; it should be noted that during the process of determining the target exposure amount through the exposure amount adjustment value and the reference exposure amount, there is no need for a photometry process, and there is no problem of inaccurate photometry, avoiding the deviation due to inaccurate photometry. The determined target exposure amount satisfies the normal linear relationship with the reference exposure amount, thereby being able to improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improving the shooting effect of the image;

[0117] In addition, when it is determined that the configured exposure amount adjustment value is greater than the first threshold, that is, the exposure amount adjustment value corresponds to positive exposure compensation and it is easy to have compensation deviation, the first frame image and the second frame image are respectively collected through the camera, and exposure compensation is performed through the method disclosed in the embodiments of the present application to avoid the situation of exposure compensation deviation due to inaccurate photometry; furthermore, if the configured exposure amount adjustment value is not greater than the first threshold, only one frame of image can be collected and the normal exposure compensation process can be executed, thereby saving the power consumption of the electronic device; and, it can be determined whether the first brightness information of the first frame image is accurate by judging whether the first brightness information of the first frame image is less than the first brightness threshold, whether it is overexposed, and whether it exceeds the saturation threshold of the image sensor. When it is determined that the first brightness information is accurate, the subsequent step of determining the first exposure amount as the reference exposure amount according to the first brightness information is executed to avoid the situation of exposure compensation deviation due to inaccurate photometry, thereby being able to improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improving the shooting effect of the image; and, the screen effects after manual exposure compensation and automatic exposure compensation can be respectively output for the user to refer to, so as to provide more exposure compensation effects for the user to choose from, enabling the user to make a flexible choice according to the actual usage requirements, thereby improving the user experience.

[0118] Please refer to Figure 8 , Figure 8It is a schematic flowchart of another image processing method disclosed in an embodiment of the present application. Optionally, this method can be applied to the electronic device introduced above, or other execution entities, which is not limited herein. Optionally, this method may include the following steps:

[0119] 802. Respectively collect a first frame of image and a second frame of image through the camera with the exposure adjustment value being 0.

[0120] In an embodiment of the present application, in order to avoid the situation where the first frame of image is overexposed and the brightness exceeds the saturation threshold of the image sensor, which may lead to inaccurate photometric measurement results of the first frame of image. The electronic device can respectively collect the first frame of image and the second frame of image with the exposure adjustment value being 0. It can be understood that the exposure adjustment value being 0 means that the collection is performed without manual exposure compensation.

[0121] Optionally, when it is detected that the exposure adjustment value has been configured, the electronic device can respectively collect the first frame of image and the second frame of image through the camera with the exposure adjustment value being 0. In an embodiment of the present application, even if the user configures the exposure adjustment value, the electronic device can still collect images with the exposure adjustment value being 0.

[0122] By implementing the above method, the electronic device can collect images with the exposure adjustment value being 0 to avoid the situation where the first frame of image is overexposed and the brightness exceeds the saturation threshold of the image sensor, which may lead to inaccurate photometric measurement results of the first frame of image, and further avoid the situation where the exposure compensation deviates due to inaccurate photometric measurement, so as to improve the accuracy of subsequent exposure compensation corresponding to the second image frame according to the target exposure amount, and further improve the shooting effect of the image.

[0123] 804. Obtain the first brightness information of the first frame of image, and determine the first exposure amount as the reference exposure amount according to the first brightness information.

[0124] In an optional embodiment, when the electronic device determines the first exposure amount as the reference exposure amount according to the first brightness information, it can collect a third frame of image through the camera and obtain the second brightness information corresponding to the third frame of image;

[0125] If the second brightness information does not match the first brightness information corresponding to the reference exposure amount, the second exposure amount can be determined according to the second brightness information, and the reference exposure amount can be replaced from the first exposure amount with the second exposure amount.

[0126] Please refer to again Figure 3After calculating the reference exposure and the target exposure through the AEC algorithm, the processor will send both the reference exposure and the target exposure back to the image sensor. Optionally, the image sensor can use the reference exposure as the reference anchor for the initial state of the picture, so that the subsequent image sensor can determine whether the shooting scene has changed based on the reference exposure.

[0127] Optionally, if the second brightness information of the third frame image does not match the first brightness information corresponding to the reference exposure, it indicates that the current shooting scene has changed, and the previous reference exposure is no longer applicable to the current shooting scene. In this case, the electronic device can recalculate the reference exposure based on the second brightness information corresponding to the third frame image to ensure that there is always a reference exposure representing the initial state of the picture, which is convenient for subsequent calculation of the target exposure, thereby improving the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure, and further improving the shooting effect of the image.

[0128] In another optional embodiment, after calculating the target exposure through the AEC algorithm, the processor can also only send the target exposure back to the image sensor to perform exposure compensation on the second frame image according to the target exposure to obtain the first preview image, thereby saving data transmission resources and the storage space of the image sensor.

[0129] 806. Determine the target exposure according to the configured exposure adjustment value and the reference exposure.

[0130] 808. Perform exposure compensation on the second frame image according to the target exposure to obtain the first preview image.

[0131] By implementing the methods disclosed in the above embodiments, the first frame image and the second frame image can be collected separately by the camera; then, the first brightness information of the first frame image can be obtained. Since the first frame image is an image without exposure adjustment and there is no overexposure situation where the brightness exceeds the saturation threshold of the image sensor, the measured first brightness information is accurate; further, the first exposure determined based on the first brightness information does not deviate. In this case, the first exposure can be used as the reference exposure. Further, the target exposure corresponding to the exposure adjustment value can be determined according to the exposure adjustment value and the reference exposure; it should be noted that during the process of determining the target exposure based on the exposure adjustment value and the reference exposure, there is no need for a light measurement process, and there is no problem of inaccurate light measurement, avoiding the deviation situation due to inaccurate light measurement. In this case, the determined target exposure satisfies the normal linear relationship with the reference exposure, thereby improving the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure, and further improving the shooting effect of the image.

[0132] In addition, images can be captured with the exposure adjustment value being 0 to avoid overexposure in the first captured image, where the brightness exceeds the saturation threshold of the image sensor, which may lead to inaccurate photometric results for the first image frame, and further avoid the situation of exposure compensation deviation due to inaccurate photometry, thereby improving the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improving the shooting effect of the image. In addition, if the second brightness information of the third image frame does not match the first brightness information corresponding to the reference exposure amount, it indicates that the current shooting scene has changed, and the previous reference exposure amount is no longer applicable to the current shooting scene. In this case, the electronic device can recalculate the reference exposure amount according to the second brightness information corresponding to the third image frame to ensure that there is always a reference exposure amount representing the initial state of the picture, which is convenient for subsequent calculation of the target exposure amount, thereby improving the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improving the shooting effect of the image.

[0133] Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of an image processing device disclosed in an embodiment of the present application. Optionally, the device can be applied to the electronic device introduced above, or other execution entities, which are not limited herein. Optionally, the device may include a first acquisition unit 902, a first determination unit 904, a second determination unit 906, and a compensation unit 908, where:

[0134] The first acquisition unit 902 is configured to respectively acquire a first image frame and a second image frame through a camera;

[0135] The first determination unit 904 is configured to obtain the first brightness information of the first image frame, and determine a first exposure amount as the reference exposure amount according to the first brightness information;

[0136] The second determination unit 906 is configured to determine a target exposure amount according to the configured exposure adjustment value and the reference exposure amount;

[0137] The compensation unit 908 is configured to perform exposure compensation on the second image frame according to the target exposure amount to obtain a first preview image.

[0138] By implementing the above device, a first image frame and a second image frame can be respectively acquired through a camera; then, the first brightness information of the first image frame is obtained. Since the first image frame is an image without exposure adjustment and there is no overexposure situation where the brightness exceeds the saturation threshold of the image sensor, the photometric result of the first brightness information is accurate; then, there is no deviation in the first exposure amount determined according to the first brightness information subsequently. Therefore, the first exposure amount can be used as the reference exposure amount.

[0139] Further, the target exposure amount corresponding to the exposure amount adjustment value can be determined based on the exposure amount adjustment value and the reference exposure amount; it should be noted that during the process of determining the target exposure amount through the exposure amount adjustment value and the reference exposure amount, there is no need to perform a metering process anymore, and there is no problem of inaccurate metering, avoiding the situation of deviation due to inaccurate metering. The determined target exposure amount satisfies the normal linear relationship with the reference exposure amount, so as to improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improve the shooting effect of the image.

[0140] As an optional implementation manner, the second determination unit 906 is further configured to determine the target exposure amount based on the corresponding target relationship between the exposure amount adjustment value and the image brightness change amount, the configured exposure amount adjustment value, and the reference exposure amount.

[0141] Implementing the above device, the target exposure amount after manual exposure compensation can be determined based on the linear relationship between the exposure amounts before and after manual exposure compensation and the reference exposure amount. There is no need to perform metering during this calculation process, and there is no need to introduce brightness information. Therefore, the situation of exposure compensation deviation caused by inaccurate metering can be avoided, so as to improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improve the shooting effect of the image.

[0142] As an optional implementation manner, the corresponding target relationship between the exposure amount adjustment value and the image brightness change amount includes: taking the target value as the base and the exposure amount adjustment value as the exponent for power operation to obtain the image brightness change amount; the second determination unit 906 is further configured to take the target value as the base and the configured exposure amount adjustment value as the exponent for power operation to obtain the target image brightness change amount; and calculate the product of the target image brightness change amount and the reference exposure amount to obtain the target exposure amount.

[0143] Implementing the above device, the target exposure amount after manual exposure compensation can be determined based on the linear relationship between the exposure amounts before and after manual exposure compensation and the reference exposure amount. There is no need to perform metering during this calculation process, and there is no need to introduce brightness information. Therefore, the situation of exposure compensation deviation caused by inaccurate metering can be avoided, so as to improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improve the shooting effect of the image.

[0144] As an optional implementation manner, the first acquisition unit 902 is further configured to respectively acquire the first image frame and the second image frame through the camera with the exposure amount adjustment value being 0.

[0145] The above-mentioned device can be implemented to collect an image with an exposure amount adjustment value of 0, so as to avoid overexposure in the first captured image, where the brightness exceeds the saturation threshold of the image sensor, which may lead to inaccurate photometric results of the first image, and further avoid the situation of exposure compensation deviation due to inaccurate photometry. Thus, it is possible to improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improve the shooting effect of the image.

[0146] As an alternative implementation, Figure 9 the device shown may further include a second acquisition unit and a replacement unit not shown in the figure, where:

[0147] The second acquisition unit is configured to, after determining the first exposure amount as the reference exposure amount according to the first brightness information, acquire a third image frame through the camera and obtain the second brightness information corresponding to the third image frame;

[0148] The replacement unit is configured to, if the second brightness information does not match the first brightness information corresponding to the reference exposure amount, determine a second exposure amount according to the second brightness information, and replace the reference exposure amount from the first exposure amount with the second exposure amount.

[0149] Implementing the above-mentioned device, if the second brightness information of the third image frame does not match the first brightness information corresponding to the reference exposure amount, it indicates that the current shooting scene has changed, and the previous reference exposure amount is no longer applicable to the current shooting scene. In this case, the electronic device can recalculate the reference exposure amount according to the second brightness information corresponding to the third image frame to ensure that there is always a reference exposure amount used to represent the initial state of the picture, which is convenient for subsequent calculation of the target exposure amount. Thus, it is possible to improve the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improve the shooting effect of the image.

[0150] As an alternative implementation, Figure 9 the device shown may further include a display unit not shown in the figure, where:

[0151] The display unit is configured to, after performing exposure compensation on the second image frame according to the target exposure amount to obtain a first preview image, display a shooting preview interface; and display the first preview image on the shooting preview interface; or display the first preview image and a second preview image on the shooting preview interface, where the second preview image is an image obtained by performing exposure compensation on the first image frame according to the reference exposure amount.

[0152] Implementing the above-mentioned device, the electronic device can output the picture effects after manual exposure compensation and automatic exposure compensation respectively for the user's reference, so as to provide more exposure compensation effects for the user to choose from, enabling the user to make a flexible choice according to the actual usage requirements, thereby improving the user experience.

[0153] As an alternative implementation, Figure 9 the illustrated device may further include an acquisition unit (not shown), where:

[0154] The acquisition unit is configured to display a shooting preview interface before respectively acquiring a first frame image and a second frame image through a camera; and, in response to an exposure adjustment operation, acquire a configured exposure amount adjustment value;

[0155] As an alternative implementation, the first acquisition unit 902 is further configured to, when the exposure amount adjustment value is greater than a first threshold, acquire the first frame image and the second frame image through the camera respectively.

[0156] Implementing the above device, the electronic device may, when determining that the configured exposure amount adjustment value is greater than the first threshold, that is, when the exposure amount adjustment value corresponds to positive exposure compensation and compensation deviation is likely to occur, acquire the first frame image and the second frame image through the camera respectively, and perform exposure compensation through the method disclosed in the embodiments of the present application, so as to avoid the situation of exposure compensation deviation caused by inaccurate photometry.

[0157] As an alternative implementation, the first determination unit 904 is further configured to, when the first brightness information is less than a first brightness threshold, determine a first exposure amount as a reference exposure amount according to the first brightness information.

[0158] Implementing the above device, the electronic device may determine whether the first brightness information is accurate by determining whether the first brightness information of the first frame image is less than the first brightness threshold, whether it is overexposed, and whether it exceeds the saturation threshold of the image sensor. And when it is determined that the first brightness information is accurate, the subsequent operation of determining a first exposure amount as a reference exposure amount according to the first brightness information is performed, so as to avoid the situation of exposure compensation deviation caused by inaccurate photometry, thereby improving the accuracy of subsequent exposure compensation for the second image frame corresponding to the target exposure amount, and further improving the shooting effect of the image.

[0159] Please refer to Figure 10 , Figure 10 which is a schematic structural diagram of an electronic device disclosed in the embodiments of the present application. As Figure 10 shown, the electronic device may include:

[0160] A memory 1001 storing executable program code;

[0161] A processor 1002 coupled to the memory 1001;

[0162] Wherein, the processor 1002 calls the executable program code stored in the memory 1001 and executes the image processing method disclosed in the above embodiments.

[0163] An embodiment of the present application discloses a computer-readable storage medium that stores a computer program, wherein the computer program causes a computer to execute the image processing method disclosed in each of the above embodiments.

[0164] An embodiment of the present application also discloses an application publishing platform, wherein the application publishing platform is used to publish a computer program product. When the computer program product runs on a computer, it causes the computer to execute some or all of the steps of the methods in the above method embodiments.

[0165] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the "in one embodiment" or "in an embodiment" that appears throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0166] In various embodiments of the present application, it should be understood that the magnitudes of the sequence numbers of the above processes do not necessarily mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0167] The units described as separate components above may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0168] In addition, in each embodiment of the present application, each functional unit can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0169] When the above 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-accessible memory. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several requests for causing a computer device (which can be a personal computer, a server, or a network device, etc., specifically, the processor in the computer device) to execute some or all of the steps of the above methods in various embodiments of this application.

[0170] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable storage medium, and the storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other computer-readable medium that can be used to carry or store data.

[0171] The above has introduced in detail the image processing method and apparatus, electronic device, and computer-readable storage medium disclosed in the embodiments of this application. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to this application.

Claims

1. An image processing method, characterized in that: The method comprises: respectively collecting a first frame image and a second frame image through a camera; Acquire first brightness information of the first frame image, and determine a first exposure amount as a reference exposure amount according to the first brightness information; Determining a target exposure according to the configured exposure adjustment value and the reference exposure; Exposure compensation is performed on the second frame image according to the target exposure to obtain a first preview image.

2. The method according to claim 1, characterized in that The step of determining a target exposure according to the configured exposure adjustment value and the reference exposure includes: A target exposure is determined based on a corresponding target relationship between the exposure adjustment value and the image brightness change amount, the configured exposure adjustment value, and the reference exposure.

3. The method according to claim 2, characterized in that The target relationship includes: using the target value as the base and the exposure adjustment value as the exponent to perform a power operation to obtain the image brightness change; The determining of the target exposure based on the corresponding target relationship between the exposure adjustment value and the image brightness change, the configured exposure adjustment value and the reference exposure includes: Taking the target value as the base, the configured exposure adjustment value is used as the exponent to perform power operation to obtain the brightness change of the target image; The product of the target image brightness change and the reference exposure is calculated to obtain a target exposure.

4. The method according to any one of claims 1 to 3, characterized in that: The method of collecting the first frame image and the second frame image respectively by using a camera comprises: The camera adjusts the exposure value to 0 and collects the first frame image and the second frame image respectively.

5. The method according to any one of claims 1 to 3, characterized in that: After determining the first exposure as a reference exposure according to the first brightness information, the method further includes: Capturing a third frame of image through the camera, and obtaining second brightness information corresponding to the third frame of image; If the second brightness information does not match the first brightness information corresponding to the reference exposure, a second exposure is determined according to the second brightness information, and the reference exposure is replaced from the first exposure to the second exposure.

6. The method according to claim 1, characterized in that After performing exposure compensation on the second frame image according to the target exposure to obtain a first preview image, the method further includes: Display the shooting preview interface; The first preview image is displayed on the shooting preview interface; or the first preview image and the second preview image are displayed on the shooting preview interface, wherein the second preview image is an image obtained by performing exposure compensation on the first frame image according to the reference exposure amount.

7. The method according to claim 1, characterized in that Before respectively capturing the first frame image and the second frame image through the camera, the method further includes: Display the shooting preview interface; In response to the exposure adjustment operation, a configured exposure adjustment value is acquired.

8. The method according to claim 7, characterized in that The method of collecting the first frame image and the second frame image respectively by using a camera comprises: When the exposure adjustment value is greater than a first threshold, the first frame image and the second frame image are respectively captured by the camera.

9. The method according to claim 1, characterized in that: The step of determining a first exposure amount as a reference exposure amount according to the first brightness information includes: If the first brightness information is less than a first brightness threshold, a first exposure amount is determined according to the first brightness information as a reference exposure amount.

10. An image processing device, characterized in that: The device comprises: A first acquisition unit, used to respectively acquire a first frame image and a second frame image through a camera; A first determining unit, configured to obtain first brightness information of the first frame image, and determine a first exposure as a reference exposure according to the first brightness information; A second determining unit, configured to determine a target exposure according to a configured exposure adjustment value and the reference exposure; The compensation unit is used to perform exposure compensation on the second frame image according to the target exposure to obtain a first preview image.

11. An electronic device, characterized in that: It comprises a memory storing executable program code and a processor coupled to the memory; wherein the processor calls the executable program code stored in the memory to execute the method according to any one of claims 1 to 9.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.