Image processing method, device, electronic device and storage medium

By determining the reflection index and ambient brightness of the image in flash mode, and using a multi-objective optimization model to adjust the flash intensity and exposure parameters, the problems of poor image quality and difficulty in brightness optimization in the existing technology are solved, and higher-quality images are achieved. collection.

CN114418923BActive Publication Date: 2025-01-21BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011168512.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-28
Publication Date
2025-01-21
Estimated Expiration
2040-10-28

AI Technical Summary

Technical Problem

The prior art is difficult to obtain better image quality in flash mode, and it is impossible to achieve different target brightness values ​​for different target objects.

Method used

By determining the reflection index and ambient brightness of the current image, based on the multi-objective optimization model, the flash intensity and exposure parameters that meet the optimization conditions are obtained, and the second image is collected.

Benefits of technology

It improves the image quality of image acquisition, ensures that the image reaches the target brightness value, and enhances the ability to optimize the brightness of different target objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114418923B_ABST
    Figure CN114418923B_ABST
Patent Text Reader

Abstract

The disclosed embodiments disclose an image processing method, device, electronic device and storage medium, wherein the image processing method comprises: determining the reflectivity index and ambient brightness of a first image currently being acquired; obtaining a flash intensity and exposure parameter that meet the optimization conditions based on the ambient brightness, the reflectivity index and a multi-objective optimization model; and acquiring a second image based on the flash intensity and exposure parameter that meet the optimization conditions. The image processing method disclosed in the disclosed embodiments can provide an optimization solution, and acquiring an image based on the optimized flash intensity and exposure parameters can improve the image quality of the acquired image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to, but is not limited to, the field of camera automatic exposure technology, and in particular to an image processing method, device, electronic device and storage medium. Background Art

[0002] At present, in photographic technology, usually only the foreground and background are identified, and the flash intensity and exposure parameters are derived based on the brightness of the foreground image. However, in flash mode, it is impossible to obtain an image with good image quality; and there are different target objects in the image, some are far away and some are near, and it is currently impossible to meet the demand for different target brightness values ​​for different target objects. Summary of the invention

[0003] The present disclosure provides an image processing method, an apparatus, an electronic device and a storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, the method comprising:

[0005] Determine the reflectance index and ambient brightness of the first image currently acquired;

[0006] Based on the ambient brightness, the reflectance index and the multi-objective optimization model, obtaining the flash intensity and exposure parameters that meet the optimization conditions;

[0007] Based on the flash intensity and the exposure parameters that meet the optimization conditions, a second image is captured.

[0008] In the above scheme, the flash intensity that meets the optimization condition is less than or equal to the upper limit of the flash intensity threshold and greater than or equal to the lower limit of the flash intensity threshold;

[0009] and / or,

[0010] The exposure parameter that meets the optimization condition is less than or equal to the upper limit of the exposure parameter threshold range and greater than or equal to the lower limit of the exposure parameter threshold.

[0011] In the above scheme, the method further comprises:

[0012] Determine k target areas of the first image; k is an integer greater than 1;

[0013] The determining of the reflectance index and the ambient brightness of the currently acquired first image includes:

[0014] Determine the reflection index and the ambient brightness of the 1st to kth target areas currently capturing the first image; wherein at least a portion of the reflection index and the ambient brightness of the 1st to kth target areas are used to determine the flash intensity and exposure parameters that meet the optimization conditions.

[0015] In the above solution, the step of determining k target areas of the first image includes one of the following:

[0016] Based on the k target objects included in the first image, determining k target areas in the first image corresponding to the k target objects;

[0017] The first image is divided into k target areas.

[0018] In the above scheme, the method further comprises:

[0019] Based on the reflection index distribution of the first image, k target objects included in the first image are determined; wherein the reflection indexes corresponding to different target objects are different.

[0020] In the above scheme, the flash intensity and exposure parameters that meet the optimization conditions are obtained based on the ambient brightness, the reflection index and the multi-objective optimization model, including:

[0021] The ambient brightness, the reflection index and the target brightness value of any at least two of the target areas from the 1st to the kth target areas are correspondingly input into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameters that meet the optimization conditions.

[0022] In the above scheme, the objective function includes a nonlinear optimal problem function;

[0023] The step of inputting the ambient brightness, the reflectance index, and the target brightness value of any at least two of the target areas from the first to the kth target areas into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter that meet the optimization condition includes:

[0024] The ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li input, and the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the nonlinear optimal problem function middle;

[0025] Analysis of the Obtaining the flash intensity and the exposure parameters that meet the optimization condition;

[0026] Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

[0027] In the above scheme, the objective function includes a linear function;

[0028] The step of inputting the ambient brightness, the reflectance index, and the target brightness value of any at least two of the target areas from the first to the kth target areas into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter that meet the optimization condition includes:

[0029] The ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li is input to the linear function (I i +R i ×C)×E=L i middle;

[0030] And the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the linear function (I j +R j ×C)×E=L j middle;

[0031] Analyze the above (I i +R i ×C)×E=L i And the said (I j +R j ×C)×E=L j , obtaining the flash intensity C and the exposure parameter E that meet the optimization conditions;

[0032] Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

[0033] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing device, characterized in that the device comprises:

[0034] A determination module, used to determine the reflectance index and ambient brightness of the currently acquired first image;

[0035] A processing module, used for obtaining a flash intensity and an exposure parameter that meet optimization conditions based on the ambient brightness, the reflection index and a multi-objective optimization model;

[0036] The acquisition module is used to acquire a second image based on the flash intensity and the exposure parameters that meet the optimization conditions.

[0037] In the above scheme, the flash intensity that meets the optimization condition is less than or equal to the upper limit of the flash intensity threshold and greater than or equal to the lower limit of the flash intensity threshold;

[0038] and / or,

[0039] The exposure parameter that meets the optimization condition is less than or equal to the upper limit of the exposure parameter threshold range and greater than or equal to the lower limit of the exposure parameter threshold.

[0040] In the above solution, the determination module is used to determine k target areas of the first image; k is an integer greater than 1;

[0041] The determination module is used to determine the reflection index and the ambient brightness of the 1st to kth target areas currently capturing the first image; wherein, at least part of the reflection index and the ambient brightness of the 1st to kth target areas are used to determine the flash intensity and exposure parameters that meet the optimization conditions.

[0042] In the above solution, the determination module is used to determine k target areas in the first image corresponding to the k target objects based on the k target objects included in the first image;

[0043] or,

[0044] The determination module is used to divide the first image into k target areas.

[0045] In the above solution, the determination module is used to determine k target objects included in the first image based on the reflection index distribution of the first image; wherein different target objects correspond to different reflection indices.

[0046] In the above scheme, the processing module is used to input the ambient brightness, the reflection index and the target brightness value of any at least two of the target areas from the 1st to the kth target areas into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameters that meet the optimization conditions.

[0047] In the above scheme, the objective function includes a nonlinear optimal problem function;

[0048] The step of inputting the ambient brightness, the reflectance index, and the target brightness value of any at least two of the target areas from the first to the kth target areas into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter that meet the optimization condition includes:

[0049] The ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li input, and the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the nonlinear optimal problem function middle;

[0050] Analysis of the Obtaining the flash intensity and the exposure parameters that meet the optimization condition;

[0051] Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

[0052] In the above scheme, the objective function includes a linear function;

[0053] The step of inputting the ambient brightness, the reflectance index, and the target brightness value of any at least two of the target areas from the first to the kth target areas into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter that meet the optimization condition includes:

[0054] The ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li is input to the linear function (I i +R i ×C)×E=L i middle;

[0055] And the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the linear function (I j +R j ×C)×E=L j middle;

[0056] Analyze the above (I i +R i ×C)×E=L i And the said (I j +R j ×C)×E=Lj , obtaining the flash intensity C and the exposure parameter E that meet the optimization conditions;

[0057] Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

[0058] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0059] processor;

[0060] a memory for storing processor-executable instructions;

[0061] Wherein, the processor is configured to: implement the image processing method described in any embodiment of the present disclosure when running the executable instructions.

[0062] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores an executable program, wherein the executable program, when executed by a processor, implements the image processing method described in any embodiment of the present disclosure.

[0063] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0064] In the embodiment of the present disclosure, the reflection index and the ambient brightness of the currently captured first image can be obtained, and based on the reflection index, the ambient brightness and the target optimization model, the flash intensity and exposure parameters that meet the optimization conditions can be obtained, that is, the optimized flash intensity and exposure parameters can be obtained. In this way, when the embodiment of the present disclosure captures the second image based on the flash intensity and exposure parameters that meet the optimization conditions, that is, the second image is captured using the optimized flash intensity and exposure parameters, the image quality of the second image can be improved compared to the image captured in the current environment directly using the flash intensity and exposure parameters before optimization, for example, including but not limited to: obtaining the second image that meets the target brightness value.

[0065] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0067] Figure 1 is a schematic diagram of an image processing method according to an exemplary embodiment.

[0068] Figure 2 The figure is a flowchart of an image processing method according to an exemplary embodiment.

[0069] Figure 3 is a schematic diagram showing various regions of a first image according to an exemplary embodiment.

[0070] Figure 4 The figure is a schematic diagram showing the reflection index of each area and the ambient brightness according to an exemplary embodiment.

[0071] Figure 5 The figure is a flowchart of an image processing method according to an exemplary embodiment.

[0072] Figure 6 is a block diagram of an image processing apparatus according to an exemplary embodiment.

[0073] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0074] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0075] like Figure 1 As shown, the present disclosure provides a flowchart of an image processing method, as shown in Figure 1 As shown, the method comprises the following steps:

[0076] Step S11: determining the reflection index and ambient brightness of the first image currently captured;

[0077] Step S12: based on the ambient brightness, the reflection index and the multi-objective optimization model, obtaining the flash intensity and exposure parameters that meet the optimization conditions;

[0078] Step S13: Capturing a second image based on the flash intensity and the exposure parameters that meet the optimization conditions.

[0079] The image processing method described in the embodiments of the present disclosure is applied to electronic devices; the electronic devices may be various types of mobile devices or fixed devices. For example, the electronic devices may be electronic devices such as mobile phones, computers, servers, tablet computers, televisions, multimedia devices, wearable bracelets or watches, etc. The electronic devices herein may also include devices such as camera modules or components; the electronic devices may be used for taking photos or recording videos, etc.

[0080] The reflectance index herein is used to indicate the ratio of incident light or reflected light of a target object in the image when the image is collected.

[0081] The ambient brightness here is used to represent the brightness of the environment in which the electronic device is located. For example, the ambient brightness may refer to the luminous flux incident on a unit area in the environment in which the electronic device is located when capturing the image, such as 1 lux or a value between 0 and 255 in RGB.

[0082] The flash light intensity here may be the current intensity or power intensity of the flash light, for example, the flash light intensity may be 120 mA or 500 W, etc. For example, the first flash light intensity is 120 mA, and the second flash light intensity is 130 mA.

[0083] The exposure parameters here can be used to indicate the exposure time and / or the exposure aperture value; for example, the first exposure parameter is 0.02 seconds, and the second exposure parameter is 0.03 seconds. Of course, in other embodiments, the exposure parameters can also be used to identify parameters such as the exposure sensitivity or aperture value.

[0084] The target optimization model here can be a model including various algorithms, such as various objective functions included in the target optimization model; the objective function here can also be called an optimization formula. For example, the objective function is a nonlinear optimal problem function or a linear function, etc.; it is only necessary to input different combinations of reflection index and ambient brightness according to the multi-objective optimization model to obtain the optimized flash intensity and exposure parameters.

[0085] For example, in some application scenarios, if different reflection indices, ambient brightness, and preset target brightness values ​​are input into the multi-objective optimization model, the optimized flash intensity and exposure parameters are obtained; and when the second image is captured based on the optimized flash intensity and exposure parameters, the second image of the target brightness value can be obtained. In this way, the image quality of image capture can be improved.

[0086] The image brightness here is used to indicate the brightness of the image; for example, if the image brightness is expressed in the color space RGB, the image brightness may be RGB=(255, 254, 200), etc. The target brightness value of the image is the brightness that the image needs to achieve.

[0087] In the disclosed embodiment, the reflection index and the ambient brightness of the currently captured first image can be obtained, and based on the reflection index, the ambient brightness and the target optimization model, the flash intensity and exposure parameters that meet the optimization conditions can be obtained, that is, the optimized flash intensity and exposure parameters can be obtained; in this way, when the second image is captured based on the flash intensity and exposure parameters that meet the optimization conditions, that is, the second image is captured using the optimized flash intensity and exposure parameters, compared with directly using the flash intensity and exposure parameters before optimization to capture the second image in the current environment, the image quality of the second image can be improved, for example including but not limited to: obtaining the second image that meets the target brightness value.

[0088] In some embodiments, the method further includes: acquiring at least one first image.

[0089] Here, one implementation method of acquiring at least one first image is:

[0090] After the camera of the electronic device is started, at least one of the first images is captured.

[0091] Thus, in this example, each time the camera is started, the flash intensity and exposure parameters of the camera's captured image can be optimized based on the reflection index of the first image and the ambient brightness.

[0092] Another implementation of acquiring at least one first image is as follows:

[0093] At least one first image is acquired within a predetermined time period before each acquisition of the second image.

[0094] Thus, in this example, the flash intensity and exposure parameters of the camera of the electronic device can be optimized at the beginning of each acquisition.

[0095] Here, another implementation of acquiring at least two first images is:

[0096] At least two of the first images are acquired based on a preset time interval.

[0097] Thus, in this example, the flash intensity and exposure parameters of the camera of the electronic device can be corrected at preset time intervals, that is, periodically.

[0098] In other embodiments, an image processing method may also include: determining the ambient brightness and reflection index based on multiple first images captured under different flash intensities and exposure parameters; determining the flash intensity and exposure parameters that meet the optimization conditions based on the ambient brightness and reflection index; and capturing the second image using the flash intensity and exposure parameters that meet the optimization conditions.

[0099] Here, one implementation method for determining the ambient brightness of the multiple first images captured under different flash intensities and exposure parameters is as follows:

[0100] The electronic device collects two first images under different flash intensities, obtains a first flash intensity and a first exposure parameter based on the first first image, and obtains a second flash intensity and a second exposure parameter based on the second first image; wherein at least the first flash intensity is different from the second flash intensity;

[0101] Acquire the image brightness of the first first image to obtain a first statistical brightness value, and acquire the image brightness of the second first image to obtain a second statistical brightness value of the second image;

[0102] Acquire the reflection index when the first image is captured according to the first statistical brightness value, the second statistical brightness value, the first flash intensity, the second flash intensity, the second flash intensity, the first exposure parameter, and the second exposure parameter;

[0103] The ambient brightness when the first image is captured is acquired according to the first statistical brightness value, the first flash intensity, the first exposure parameter, and the reflectance index.

[0104] The first flash intensity is different from the second flash intensity. The first exposure parameter is the same as or different from the second exposure parameter.

[0105] Here, based on the first statistical brightness value, the second statistical brightness value, the first flash intensity, the second flash intensity, the second flash intensity, the first exposure parameter and the second exposure parameter, an implementation method for obtaining the reflection index when the first image is collected is:

[0106] Wherein, L1 is the first statistical brightness value, L2 is the second statistical brightness value; E1 is the first exposure parameter, E2 is the second exposure parameter; C1 is the first flash intensity, C2 is the second flash intensity; and R is the reflection index.

[0107] Here, one implementation method of acquiring the ambient brightness when the first image is captured based on the first statistical brightness value, the first flash intensity, the first exposure parameter, and the reflectance index is:

[0108] Wherein, L1 is the first statistical brightness value; E1 is the first exposure parameter; C1 is the first flash intensity; and I is the ambient brightness.

[0109] In the embodiments of the present disclosure, the ambient brightness and the reflection index can be acquired based on multiple first images captured under different flash intensities and exposure parameters, for example, multiple first images captured continuously. This simplifies the operation of acquiring the ambient brightness and the reflection index on the one hand, and is applicable to application scenarios where the flash intensity changes, such as flashlight mode or video recording mode.

[0110] Furthermore, based on the ambient brightness and reflection index, the flash intensity and exposure parameters that meet the optimization conditions are obtained, and based on the optimized flash intensity and exposure parameters, a second image with better acquisition effect is obtained, for example, a second image that meets the target brightness value is acquired.

[0111] In some embodiments, the flash intensity that satisfies the optimization condition is less than or equal to an upper limit of a flash intensity threshold and greater than or equal to a lower limit of the flash intensity threshold;

[0112] and / or,

[0113] The exposure parameter that meets the optimization condition is less than or equal to the upper limit of the exposure parameter threshold range and greater than or equal to the lower limit of the exposure parameter threshold.

[0114] The flash intensity here is within the flash intensity threshold range; the exposure parameter here is within the exposure parameter threshold range.

[0115] For example, the exposure parameter is the exposure time, and the exposure time is between 0.03 seconds and 0.21 seconds; that is, the exposure parameter is greater than or equal to 0.03 seconds and less than or equal to 0.21 seconds.

[0116] For example, the flash intensity is a flash current, and the flash current is between 0 and 900 mA; that is, the flash intensity is greater than or equal to 0 mA and less than or equal to 900 mA.

[0117] In the disclosed embodiment, by setting the flash intensity that meets the optimization conditions and / or the exposure parameter value range that meets the optimization conditions, the optimization performance of the flash intensity and the exposure parameter can be further improved, thereby improving the image quality of the captured second image. In other embodiments, the flash intensity that meets the optimization conditions and / or the exposure parameter that meets the optimization conditions can also be other values; for example, the flash intensity can be between 100W and 1000, etc.; it is only necessary to improve the image quality of the second image such as the image brightness based on the flash intensity and exposure parameters that meet the optimization conditions.

[0118] In other embodiments, the flash intensity that satisfies the optimization condition and / or the exposure parameter that satisfies the optimization condition may also be determined based on the hardware of the electronic device; for example, the flash intensity may be between 100 W and 1000 W, but the maximum power of the flash of the electronic device is 800 W, and the flash intensity may be determined to be between 100 W and 800 W. In this way, the embodiment of the present disclosure may take into account both improving the image quality of the image captured by the electronic device and the hardware capability of the electronic device itself.

[0119] like Figure 2 As shown, in some embodiments, the method further includes:

[0120] Step S10: determining k target areas of the first image; k is an integer greater than 1;

[0121] The step S11 comprises:

[0122] Step S111: Determine the reflection index and the ambient brightness of the 1st to kth target areas currently capturing the first image; wherein, at least part of the reflection index and the ambient brightness of the 1st to kth target areas are used to determine the flash intensity and exposure parameters that meet the optimization conditions.

[0123] In some embodiments, all of the reflection indices of the 1st to kth target areas of the first image and the ambient brightness are used to determine the flash intensity and exposure parameters that meet the optimization conditions.

[0124] In other embodiments, the reflection indication and ambient brightness of any i target areas from the 1st to the kth target areas of the first image are used to determine the flash intensity and exposure parameters that meet the optimization conditions; wherein i is an integer less than k.

[0125] One way to implement step S10 is:

[0126] Based on the k target objects included in the first image, k target areas corresponding to the k target objects in the first image are determined.

[0127] For example, the first image includes at least two target objects, and at least two target areas corresponding to the at least two target objects are determined based on the at least two target objects.

[0128] like Figure 3As shown, a schematic diagram of a first image including two target objects is disclosed. One target object is the face of a small animal, and the other target object is the background. In this way, based on the two target objects in the first image, the electronic device can divide the first image into two target areas: Q1 and Q2; wherein the target area Q1 corresponds to the face of the small animal, and the target area Q2 corresponds to the background.

[0129] Here, if the reflection index of each target object is different, k target object regions in the first image may also be determined according to the distribution of the reflection index in the first image; wherein one target object corresponds to one target region.

[0130] For example, an image processing method includes:

[0131] Based on the reflection index distribution of the first image, k target objects included in the first image are determined; wherein the reflection indexes corresponding to different target objects are different.

[0132] For example, in an application scenario, if an image of a soccer ball is taken, the soccer ball is one target object, and the background surrounding the soccer ball is another target object; the electronic device can determine the corresponding two target areas based on the soccer ball and the background in the image.

[0133] For example, in another application scenario, if an image of a cup on a table is taken, the table is a target object, the cup is a target object, and the background is a target object; the electronic device can determine the corresponding three target areas based on the cup, the table, and the background in the image. Of course, in other examples, the table or the cup can be split into multiple target objects.

[0134] Another way to implement step S10 is:

[0135] The first image is divided into k target areas.

[0136] For example, the electronic device directly divides the first image into M×N=k target areas.

[0137] In the disclosed embodiment, the first area can be divided into a plurality of target areas, so as to determine the optimized flash intensity and exposure parameters based on each target object, thereby facilitating the optimization of the image of each target area. Furthermore, if the target area is associated with each target object in the first image, that is, one target area corresponds to one target object, it can be beneficial to optimize the image of each target object.

[0138] In some embodiments, the method further comprises:

[0139] Acquire the i-th reflection index and the i-th ambient brightness of the i-th target area in the first image; wherein the i is an integer less than or equal to the k.

[0140] In some other implementations, the method further includes:

[0141] The reflectance indexes of the first to k-th target areas of the first image and the ambient brightness of the first to k-th target areas are obtained.

[0142] For example, one implementation method for obtaining the ambient brightness of the 1st to kth target areas is:

[0143] The I is the ambient brightness of the 1st to kth target areas, and the I i is the ambient brightness of the i-th target area, and i is an integer greater than or equal to 1 and less than or equal to k.

[0144] Of course, the ambient brightness of the above-mentioned first to kth target areas may also be realized as follows:

[0145] (x i ,y i )∈Q i ; wherein said (x i ,y i )∈Q i It is used to identify the position of the i-th target area in the first image. i ,y i )∈[(x1,y1),(x k ,y k )] is used to identify the positions of the 1st to kth target areas in the first image; the Ith is the ambient brightness of the 1st to kth target areas.

[0146] For example, one implementation method for obtaining the reflection indexes of the 1st to kth target areas is:

[0147] I is the reflection index of the 1st to kth target areas, and R i is the i-th reflection index, and i is an integer greater than or equal to 1 and less than or equal to k.

[0148] Of course, the reflection indexes of the first to kth target areas may also be realized as follows:

[0149] (x i ,y i )∈Q i ; wherein said (x i ,y i )∈Qi It is used to identify the position of the i-th target area in the first image. i ,y i )∈[(x1,y1),(x k ,y k )] is used to identify the positions of the 1st to kth target areas in the first image; the Ith is the reflection index of the 1st to kth target areas.

[0150] For example, Figure 4 As shown, the first image is divided into 5×5 target areas; two first images with different flash intensities and exposure parameters are continuously collected, and the first statistical brightness value, the first flash intensity, and the first exposure parameter of the 5×5 target areas are determined based on the first first image, and the second statistical brightness value, the second flash intensity, and the second exposure parameter of the 5×5 target areas are determined based on the second first image. According to the first statistical brightness value, the second statistical brightness value, the first flash intensity, the second flash intensity, the first exposure parameter, and the second exposure parameter of the 5×5 target areas, the reflectance index of the 5×5 target areas is calculated as follows: R 00 ,……,R 04 , R 10 ,……,R 14 , R 20 ,……,R 24 , R 30 ,……,R 34 , R 40 ,……,R 44 The first statistical brightness values ​​of the 5×5 target areas, the first flash intensity, the first exposure parameter and the reflection index of the 5×5 target areas are calculated to obtain the reflection indexes of the 5×5 target areas: I 00 ,……,I 04 ,I 10 ,……,I 14 ,I 20 ,……,I 24 ,I 30 ,……,I 34 ,I 40 ,……,I 44 .

[0151] In the embodiment of the present disclosure, the reflection index and / or the ambient brightness corresponding to each target area may be determined based on the determined target areas.

[0152] Please see again Figure 2 , the step S12 comprises:

[0153] Step S121: Input the ambient brightness, the reflection index and the target brightness value of any at least two of the target areas from the 1st to the kth target areas into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameters that meet the optimization conditions.

[0154] Any at least two of the target areas from the 1st to the kth target areas herein may be: any at least two of the target areas from the 1st to the kth target areas, or any multiple target areas greater than 2.

[0155] In some embodiments, the method further comprises:

[0156] Obtain a preset target brightness value of an i-th target area in a first image; wherein i is an integer less than or equal to k.

[0157] The objective function here can be a linear function. For example, the linear function can be: i +R i ×C)×E=L i Wherein, the I i is the ambient brightness of the i-th target area in the first image, and the R i is the reflection index of the i-th target area in the first image, and the L i is the target brightness value of the i-th target area in the first image.

[0158] One way to implement step S121 is:

[0159] The ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li is input to the linear function (I i +R i ×C)×E=L i middle;

[0160] And the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the linear function (I j +R j ×C)×E=L j middle;

[0161] Analyze the above (I i +R i ×C)×E=L i And the said (I j +R j ×C)×E=L j, obtaining the flash intensity C and the exposure parameter E that meet the optimization conditions;

[0162] Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

[0163] For example, in an application scenario, the ambient brightness I1 of the first target area of ​​the first image and the ambient brightness I2 of the second target area are obtained; the reflectance index R1 of the first target area of ​​the first image and the reflectance index R2 of the second target area are obtained; and the preset target brightness value L1 of the first target area of ​​the first image and the target brightness value L2 of the second target area are also obtained. The I1, R1 and L1 are substituted into the above linear function to form a first objective function (I1+R1×C)×E=L1; and the I2, R2 and L2 are substituted into the above linear function to form a second objective function (I2+R2×C)×E=L2. The first objective function and the second objective function are solved to obtain the flash intensity C and the exposure parameter E. In this way, when the second image is subsequently acquired based on the flash intensity C and the exposure parameter E, at least the first target area and the second target area that meet the target brightness value can be obtained, and the image quality of the image acquisition of the first target area and the second target area can be at least improved.

[0164] In the above example, after obtaining the flash intensity C and the exposure parameter E, it can also be determined whether the flash intensity C meets the flash intensity of the optimization condition and whether the exposure parameter E meets the exposure parameter of the optimization condition; if they do, the second image can be captured based on the flash intensity C and the exposure parameter E. In this way, this example can further improve the image quality of the captured first image.

[0165] In the above example, if the obtained flash intensity C does not meet the optimization condition of the flash intensity or the exposure parameter E does not meet the optimization condition of the exposure parameter, the flash intensity and the exposure parameter can be recalculated based on the ambient brightness, reflection index and pre-set target brightness value of at least two target areas other than the first target area and the second target area among the first to kth target areas.

[0166] The objective function here may be a nonlinear optimization problem function (Nonlinear Optimization). For example, the nonlinear optimization problem function may be: Wherein, a≤E≤b, c≤C≤d; wherein I is the ambient brightness of the first image, R is the reflection index of the first image, and L is the target brightness value of the first image; wherein a is the lower limit value of the exposure parameter threshold, and b is the upper limit value of the exposure parameter threshold; c is the lower limit value of the flash intensity threshold, and d is the upper limit value of the flash intensity threshold.

[0167] Another way to implement step S121 is:

[0168] The ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li input, and the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the nonlinear optimal problem function middle;

[0169] Analysis of the Obtaining the flash intensity and the exposure parameters that meet the optimization condition;

[0170] Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

[0171] For example, in an application scenario, the ambient brightness I1 of the first target area of ​​the first image and the ambient brightness I2 of the second target area are obtained; the reflectance index R1 of the first target area of ​​the first image and the reflectance index R2 of the second target area are obtained; and the preset target brightness value L1 of the first target area of ​​the first image and the target brightness value L2 of the second target area are also obtained. Substitute the I1, R1 and L1, and the I2, R2 and L2 into the above nonlinear optimal problem function to form a third objective function Solve the third objective function, a≤E≤b and c≤C≤d, and obtain the flash intensity C and the exposure parameter E. In this way, the image quality of the image acquisition of at least the first target area and the second target area can be improved.

[0172] In the above example, if the first image can be k target areas, the ambient brightness, reflection index and target brightness value of the k target areas can also be obtained; the ambient brightness, reflection index and target brightness value of any m target areas among the k target areas are brought into the above nonlinear optimal problem function to form a fourth objective function; and based on the fourth objective function, a≤E≤b and c≤C≤d, the flash intensity C and exposure parameter E are obtained. Here, m is an integer greater than 2. In this way, in this embodiment, the image quality of the image acquisition of the m target areas can be at least improved.

[0173] In the above example, if the parameters input to the nonlinear optimal problem function are the ambient brightness, reflectance index and target brightness value of any three or more target areas; the nonlinear optimal problem function can also be And the Said and the Based on these formulas, the flash intensity C and the exposure parameter E are determined. Here, i, j and n are all integers greater than 0 and less than or equal to k, and the i, j and n are all different.

[0174] In the disclosed embodiment, the ambient brightness, reflection index and target brightness value of at least two target areas in each target area can be input into the objective function of the target optimization model to determine the flash intensity and exposure parameters that meet the optimization conditions. In this way, when the second image is captured based on the flash intensity and exposure parameters that meet the optimization conditions, at least the image brightness of the corresponding at least two target areas can be optimized, thereby improving the image quality of the captured second image. For example, if the at least two target areas are foreground and background areas, the capture quality of the foreground and background images of the second image can be optimized, and the forest scenery effect can be enhanced. For another example, if the at least two target areas are areas corresponding to at least two target objects, such as Figure 3 As shown, the image quality of the captured images of the at least two target objects can be optimized.

[0175] A specific example is provided below in combination with any of the above embodiments:

[0176] Figure 5 A method for image processing is provided, the method comprising the following steps:

[0177] Step S21: Obtaining the reflection index and ambient brightness of k target areas of the first image currently captured;

[0178] In an optional embodiment, the electronic device divides the first image currently collected into k target areas, and obtains the reflection index and the ambient brightness of the 1st to kth target areas.

[0179] In another optional embodiment, the electronic device takes at least two of the first images under different flash intensities; based on the flash intensities, exposure parameters and statistical brightness values ​​of any two of the at least two first images, determines the reflection index and ambient brightness of the first images.

[0180] Step S22: obtaining target brightness values ​​of k target areas;

[0181] In an optional embodiment, the electronic device obtains preset target brightness values ​​of k target areas, where the target brightness values ​​are brightness values ​​that meet optimization requirements.

[0182] In another optional embodiment, the above-mentioned steps S21 and S22 may also be: obtaining the reflection index, environmental index and target brightness value of i target areas among the k target areas in the first image; wherein i is less than or equal to k, and the i target areas are the target areas required to be used in the objective function of the multi-objective optimization model.

[0183] Step S23: inputting the reflection index, ambient brightness and target brightness value of i target areas among the k target areas into the multi-objective optimization model to obtain the flash intensity and exposure parameters that meet the optimization conditions.

[0184] In an optional embodiment, the electronic device inputs the reflection index of i target areas among k target areas, the ambient brightness and the target brightness value into the objective function of the multi-objective optimization model. a≤E≤b and c≤C≤d to obtain the flash intensity and exposure parameters that meet the optimization conditions.

[0185] For example, in the above example, Said and the Among them, I1 and I2 are the ambient brightness of the first area and the second area of ​​the first image respectively; R1 and R2 are the reflection index of the first area and the second area of ​​the first image respectively; L1 and L2 are the target brightness values ​​of the first area and the second area of ​​the first image respectively; a is the lower limit value of the exposure parameter threshold, and b is the upper limit value of the exposure parameter threshold; c is the lower limit value of the flash intensity threshold, and d is the upper limit value of the flash intensity threshold.

[0186] In the disclosed embodiment, the reflectance index and the ambient brightness of the currently captured first image can be obtained, and based on the reflectance index, the ambient brightness and the target optimization model, the flash intensity and exposure parameters that meet the optimization conditions can be obtained. In this way, when the second image is captured based on the flash intensity and exposure parameters that meet the optimization conditions, the image quality of the second image can be improved, for example, including but not limited to: obtaining the second image that meets the target brightness value.

[0187] Furthermore, the ambient brightness, reflection index and target brightness value of at least two target areas in each target area can be input into the objective function of the target optimization model to determine the flash intensity and exposure parameters that meet the optimization conditions. In this way, when the second image is captured based on the flash intensity and exposure parameters that meet the optimization conditions, at least the image brightness of the corresponding at least two target areas can be optimized, for example, the acquisition quality of the foreground and background area images can be optimized, the forest effect can be enhanced, or the image quality of the at least two target object images can be optimized.

[0188] Figure 6 An exemplary embodiment is provided showing an image processing device, such as Figure 6 As shown, the device comprises:

[0189] A determination module 41 is used to determine the reflection index and ambient brightness of the currently acquired first image;

[0190] A processing module 42, configured to obtain a flash intensity and an exposure parameter that meet optimization conditions based on the ambient brightness, the reflection index and a multi-objective optimization model;

[0191] The acquisition module 43 is used to acquire a second image based on the flash intensity and the exposure parameters that meet the optimization conditions.

[0192] In some embodiments, the flash intensity that satisfies the optimization condition is less than or equal to an upper limit of a flash intensity threshold and greater than or equal to a lower limit of the flash intensity threshold;

[0193] and / or,

[0194] The exposure parameter that meets the optimization condition is less than or equal to the upper limit of the exposure parameter threshold range and greater than or equal to the lower limit of the exposure parameter threshold.

[0195] In some embodiments, the determination module 41 is used to determine k target areas of the first image; k is an integer greater than 1;

[0196] The determination module 41 is used to determine the reflection index and the ambient brightness of the 1st to kth target areas currently capturing the first image; wherein, at least part of the reflection index and the ambient brightness of the 1st to kth target areas are used to determine the flash intensity and exposure parameters that meet the optimization conditions.

[0197] In some embodiments, the determination module 41 is used to determine, based on the k target objects included in the first image, k target regions in the first image corresponding to the k target objects;

[0198] or,

[0199] The determination module 41 is used to divide the first image into k target areas.

[0200] In some embodiments, the determination module 41 is used to determine k target objects included in the first image based on the reflection index distribution of the first image; wherein the reflection indexes corresponding to different target objects are different.

[0201] In some embodiments, the processing module 42 is used to input the ambient brightness, the reflection index and the target brightness value of any at least two of the target areas from the 1st to the kth target areas into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameters that meet the optimization conditions.

[0202] In some embodiments, the objective function comprises a nonlinear optimal problem function;

[0203] The processing module 42 is used to convert the ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li input, and the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the nonlinear optimal problem function middle;

[0204] The processing module 42 is also used to analyze the Obtaining the flash intensity and the exposure parameters that meet the optimization condition;

[0205] Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

[0206] In some embodiments, the objective function comprises a linear function;

[0207] The processing module 42 is used to convert the ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li is input to the linear function (I i +R i ×C)×E=L i and the ambient brightness I of the j-th target area j , the reflection index R j , and the target brightness value Lj is input into the linear function (I j +R j ×C)×E=L j middle;

[0208] The processing module 42 is also used to analyze the (I i +R i ×C)×E=L i And the said (I j +R j ×C)×E=L j , obtaining the flash intensity C and the exposure parameter E that meet the optimization conditions;

[0209] Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

[0210] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0211] An embodiment of the present disclosure further provides a server, characterized in that it includes:

[0212] processor;

[0213] a memory for storing processor-executable instructions;

[0214] Wherein, the processor is configured to: implement the image processing method described in any embodiment of the present disclosure when running the executable instructions.

[0215] The memory may include various types of storage media, which are non-transitory computer storage media that can continue to memorize information stored thereon after the communication device loses power.

[0216] The processor may be connected to the memory through a bus or the like, and is used to read the executable program stored in the memory, for example, to implement the following Figures 1 to 2 , Figure 5 At least one of the methods shown.

[0217] The embodiments of the present disclosure further provide a computer-readable storage medium, wherein the computer-readable storage medium stores an executable program, wherein the executable program, when executed by a processor, implements the image processing method described in any embodiment of the present disclosure. Figures 1 to 2 , Figure 5 At least one of the methods shown.

[0218] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0219] Figure 7 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0220] Reference Figure 7 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0221] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0222] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0223] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0224] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0225] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0226] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0227] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0228] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0229] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0230] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0231] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0232] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. An image processing method, characterized in that: The method comprises: Determine k target areas of the first image currently acquired; k is an integer greater than 1; Determine the reflection index and the ambient brightness of the first image; wherein, the determining the reflection index and the ambient brightness of the first image comprises: determining the reflection index and the ambient brightness of the first to k-th target areas of the currently captured first image; wherein, at least part of the reflection index and the ambient brightness of the first to k-th target areas are used to determine the flash intensity and exposure parameters that meet the optimization conditions; Based on the ambient brightness, the reflection index and the multi-objective optimization model, the flash intensity and exposure parameters that meet the optimization conditions are obtained; wherein, based on the ambient brightness, the reflection index and the multi-objective optimization model, the flash intensity and exposure parameters that meet the optimization conditions are obtained, including: inputting the ambient brightness, the reflection index and the target brightness value of any at least two of the target areas from the 1st to the kth target areas into the objective function of the multi-objective optimization model, and obtaining the flash intensity and exposure parameters that meet the optimization conditions; Based on the flash intensity and the exposure parameters that meet the optimization conditions, a second image is captured.

2. The method according to claim 1, characterized in that The flash intensity that satisfies the optimization condition is less than or equal to the upper limit of the flash intensity threshold and greater than or equal to the lower limit of the flash intensity threshold; and / or, The exposure parameter that meets the optimization condition is less than or equal to the upper limit of the exposure parameter threshold range and greater than or equal to the lower limit of the exposure parameter threshold.

3. The method according to claim 1, characterized in that The step of determining k target regions of the first image includes one of the following: Based on the k target objects included in the first image, determining k target areas in the first image corresponding to the k target objects; The first image is divided into k target areas.

4. The method according to claim 3, characterized in that The method further comprises: Based on the reflection index distribution of the first image, k target objects included in the first image are determined; wherein the reflection indexes corresponding to different target objects are different.

5. The method according to claim 1, characterized in that The objective function includes a nonlinear optimal problem function; The step of inputting the ambient brightness, the reflectance index, and the target brightness value of any at least two of the target areas from the first to the kth target areas into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter that meet the optimization condition includes: The ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li input, and the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the nonlinear optimal problem function wherein C is the flash intensity and E is the exposure parameter; Analysis of the Obtaining the flash intensity and the exposure parameters that meet the optimization condition; Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

6. The method according to claim 1, characterized in that The objective function comprises a linear function; The step of inputting the ambient brightness, the reflectance index, and the target brightness value of any at least two of the target areas from the first to the kth target areas into the objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter that meet the optimization condition includes: The ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li is input to the linear function (I i +R i ×C)×E=L i middle; And the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the linear function (I j +R j ×C)×E=L j middle; Analyze the above (I i +R i ×C)×E=L i And the said (I j +R j ×C)×E=L j , obtaining the flash intensity C and the exposure parameter E that meet the optimization conditions; Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

7. An image processing device, characterized in that: The device comprises: A determination module, used to determine k target areas of the currently acquired first image; wherein k is an integer greater than 1; The determination module is used to determine the reflection index and the ambient brightness of the first image; wherein the determination module is specifically used to determine the reflection index and the ambient brightness of the first to k-th target areas currently capturing the first image; wherein at least part of the reflection index and the ambient brightness of the first to k-th target areas are used to determine the flash intensity and exposure parameters that meet the optimization conditions; A processing module, used for obtaining the flash intensity and exposure parameters that meet the optimization conditions based on the ambient brightness, the reflection index and the multi-objective optimization model; wherein the processing module is specifically used for inputting the ambient brightness, the reflection index and the target brightness value of any at least two of the target areas from the 1st to the kth target areas into the objective function of the multi-objective optimization model, and obtaining the flash intensity and the exposure parameters that meet the optimization conditions; The acquisition module is used to acquire a second image based on the flash intensity and the exposure parameters that meet the optimization conditions.

8. The device according to claim 7, characterized in that The flash intensity that satisfies the optimization condition is less than or equal to the upper limit of the flash intensity threshold and greater than or equal to the lower limit of the flash intensity threshold; and / or, The exposure parameter that meets the optimization condition is less than or equal to the upper limit of the exposure parameter threshold range and greater than or equal to the lower limit of the exposure parameter threshold.

9. The device according to claim 7, characterized in that The determining module is used to determine, based on the k target objects included in the first image, k target areas in the first image corresponding to the k target objects; or, The determination module is used to divide the first image into k target areas.

10. The device according to claim 9, characterized in that The determination module is used to determine k target objects included in the first image based on the reflection index distribution of the first image; wherein the reflection indexes corresponding to different target objects are different.

11. The device according to claim 7, characterized in that The objective function includes a nonlinear optimal problem function; The processing module is used to convert the ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li input, and the ambient brightness I of the jth target area j , the reflection index R j , and the target brightness value Lj is input into the nonlinear optimal problem function middle; The processing module is also used to parse the Obtaining the flash intensity and the exposure parameter that meet the optimization condition; wherein C is the flash intensity and E is the exposure parameter; Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

12. The device according to claim 7, characterized in that The objective function comprises a linear function; The processing module is used to convert the ambient brightness I of the i-th target area i , the reflection index R i , and the target brightness value Li is input to the linear function (I i +R i ×C)×E=L i middle; And the environment brightness Ij, the reflection index Rj, and the target brightness value Lj of the jth target area are input into the linear function (I j +R j ×C)×E=L j middle; The processing module is also used to analyze the (I i +R i ×C)×E=L i And the said (I j +R j ×C)×E=L j , obtaining the flash intensity C and the exposure parameter E that meet the optimization conditions; Wherein, the i and the j are both integers greater than 0 and less than or equal to k, and the i is different from the j.

13. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: implement the image processing method according to any one of claims 1 to 6 when running the executable instructions.

14. A computer-readable storage medium, characterized in that: The readable storage medium stores an executable program, wherein the executable program, when executed by a processor, implements the image processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for adjusting picture brightness, terminal and storage medium

    CN108200352A

  • Image photographing method and device, storage medium and electronic equipment

    CN109547701A