CN114418923A - Image processing method, image processing device, electronic equipment and storage medium - Google Patents

Image processing method, image processing device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114418923A
CN114418923A CN202011168512.0A CN202011168512A CN114418923A CN 114418923 A CN114418923 A CN 114418923A CN 202011168512 A CN202011168512 A CN 202011168512A CN 114418923 A CN114418923 A CN 114418923A
Authority
CN
China
Prior art keywords
target
image
intensity
ambient brightness
exposure parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011168512.0A
Other languages
Chinese (zh)
Inventor
杨升龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202011168512.0A priority Critical patent/CN114418923A/en
Publication of CN114418923A publication Critical patent/CN114418923A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/06Multi-objective optimisation, e.g. Pareto optimisation using simulated annealing [SA], ant colony algorithms or genetic algorithms [GA]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10141Special mode during image acquisition
    • G06T2207/10152Varying illumination

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the disclosure discloses an image processing method, an image processing device, an electronic device and a storage medium, wherein the image processing method comprises the following steps: determining the reflection index and the ambient brightness of a first image which is acquired currently; based on the ambient brightness, the reflection index and a multi-objective optimization model, obtaining the intensity of a flash lamp and exposure parameters meeting optimization conditions; and acquiring a second image based on the flash lamp intensity and the exposure parameter which meet the optimization condition. The image processing method disclosed by the embodiment of the disclosure can provide an optimization scheme, and the image quality of the acquired image can be improved by acquiring the image based on the optimized flash lamp intensity and exposure parameters.

Description

Image processing method, image processing device, electronic equipment and storage medium
Technical Field
The present disclosure relates to, but not limited to, the field of camera automatic exposure technologies, and in particular, to an image processing method and apparatus, an electronic device, and a storage medium.
Background
Currently, in the photographic technology, only the foreground and the background are usually recognized, and the flash intensity and the exposure parameters are derived according to the image brightness of the foreground. However, in the flash mode, an image of good image quality cannot be obtained; different target objects are in the image, and the different target objects are far or near, so that the requirement of having different target brightness values for different target objects cannot be met at present.
Disclosure of Invention
The disclosure provides an image processing method, an image processing apparatus, an electronic device and a storage medium.
According to a first aspect of embodiments of the present disclosure, there is provided an image processing method, the method including:
determining the reflection index and the ambient brightness of a first image which is acquired currently;
based on the ambient brightness, the reflection index and a multi-objective optimization model, obtaining the intensity of a flash lamp and exposure parameters meeting optimization conditions;
and acquiring a second image based on the flash lamp intensity and the exposure parameter which meet the optimization condition.
In the above scheme, the flash lamp intensity meeting the optimization condition is less than or equal to the upper limit value of the flash lamp intensity threshold and greater than or equal to the lower limit value of the flash lamp intensity threshold;
and/or the presence of a gas in the gas,
the exposure parameter meeting the optimization condition is smaller than or equal to the upper limit value of the exposure parameter threshold range and larger than or equal to the lower limit value of the exposure parameter threshold.
In the above scheme, the method further comprises:
determining k target regions of the first image; k is an integer greater than 1;
the determining the reflection index and the ambient brightness of the currently acquired first image includes:
determining the reflection index and the ambient brightness of the 1 st to kth target areas of the first image which is acquired currently; wherein the reflectance index and at least part of the ambient brightness of the 1 st to kth target areas are used to determine flash intensity and exposure parameters that satisfy optimization conditions.
In the above solution, the determining k target regions of the first image includes one of:
determining k target regions corresponding to k target objects in the first image based on k target objects included in the first image;
dividing the first image into k of the target regions.
In the above scheme, the method further comprises:
determining k target objects included in the first image based on a distribution of reflectance indexes of the first image; wherein the reflection indexes corresponding to different target objects are different.
In the above scheme, the obtaining the intensity of the flash lamp and the exposure parameter satisfying the optimization condition based on the ambient brightness, the reflection index and the multi-objective optimization model includes:
correspondingly inputting the ambient brightness, the reflection index and the target brightness value of any at least two target areas from 1 st to kth target areas into an objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter meeting the optimization conditions.
In the above scheme, the objective function includes a nonlinear optimal problem function;
correspondingly inputting the ambient brightness, the reflection index and the target brightness value of any at least two target areas from 1 st to kth target areas into an objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter meeting the optimization condition, including:
the ambient brightness I of the ith target areaiThe reflection index RiThe target luminance value Li input, and the ambient luminance I of the jth target regionjThe reflection index RjAnd inputting the target brightness value Lj into a nonlinear optimal problem function
Figure BDA0002746550960000021
Performing the following steps;
analyzing the above
Figure BDA0002746550960000022
Obtaining the flash lamp intensity and the exposure parameter which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
In the above scheme, the objective function includes a linear function;
correspondingly inputting the ambient brightness, the reflection index and the target brightness value of any at least two target areas from 1 st to kth target areas into an objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter meeting the optimization condition, including:
the ambient brightness I of the ith target areaiThe reflection index RiAnd the target luminance value Li is input to a linear function (I)i+Ri×C)×E=LiPerforming the following steps;
and comparing the ambient brightness I of the jth target regionjThe reflection index RjAnd the target luminance value Lj is input to a linear function (I)j+Rj×C)×E=LjPerforming the following steps;
analysis of the (I)i+Ri×C)×E=LiAnd the (I)j+Rj×C)×E=LjObtaining the flash lamp intensity C and the exposure parameter E which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
According to a second aspect of the embodiments of the present disclosure, there is provided an image processing apparatus, characterized in that the apparatus includes:
the determining module is used for determining the reflection index and the ambient brightness of the currently acquired first image;
the processing module is used for obtaining the intensity of the flash lamp and exposure parameters meeting optimization conditions based on the environment brightness, the reflection index and the multi-objective optimization model;
and the acquisition module is used for acquiring a second image based on the flash lamp intensity and the exposure parameter which meet the optimization condition.
In the above scheme, the flash lamp intensity meeting the optimization condition is less than or equal to the upper limit value of the flash lamp intensity threshold and greater than or equal to the lower limit value of the flash lamp intensity threshold;
and/or the presence of a gas in the gas,
the exposure parameter meeting the optimization condition is smaller than or equal to the upper limit value of the exposure parameter threshold range and larger than or equal to the lower limit value of the exposure parameter threshold.
In the foregoing solution, the determining module is configured to determine k target regions of the first image; k is an integer greater than 1;
the determining module is used for determining the reflection index and the ambient brightness of the 1 st to kth target areas of the first image which is acquired currently; wherein the reflectance index and at least part of the ambient brightness of the 1 st to kth target areas are used to determine flash intensity and exposure parameters that satisfy optimization conditions.
In the foregoing solution, the determining module is configured to determine, based on k target objects included in the first image, k target regions corresponding to k target objects in the first image;
or,
the determining module is configured to divide the first image into k target regions.
In the foregoing solution, the determining module is configured to determine k target objects included in the first image based on a distribution of reflection indexes of the first image; wherein the reflection indexes corresponding to different target objects are different.
In the foregoing solution, the processing module is configured to correspondingly input the ambient brightness, the reflection index, and the target brightness values of at least any two of the 1 st to kth target areas into an objective function of the multi-objective optimization model, so as to obtain the flash intensity and the exposure parameter that satisfy the optimization condition.
In the above scheme, the objective function includes a nonlinear optimal problem function;
correspondingly inputting the ambient brightness, the reflection index and the target brightness value of any at least two target areas from 1 st to kth target areas into an objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter meeting the optimization condition, including:
the ambient brightness I of the ith target areaiThe reflection index RiThe target luminance value Li input, and the ambient luminance I of the jth target regionjThe reflection index RjAnd inputting the target brightness value Lj into a nonlinear optimal problem function
Figure BDA0002746550960000041
Performing the following steps;
analyzing the above
Figure BDA0002746550960000042
Obtaining the flash lamp intensity and the exposure parameter which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
In the above scheme, the objective function includes a linear function;
correspondingly inputting the ambient brightness, the reflection index and the target brightness value of any at least two target areas from 1 st to kth target areas into an objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter meeting the optimization condition, including:
the ambient brightness I of the ith target areaiThe reflection index RiAnd the target luminance value Li is input to a linear function (I)i+Ri×C)×E=LiPerforming the following steps;
and comparing the ambient brightness I of the jth target regionjThe reflection index RjAnd the target luminance value Lj is input to a linear function (I)j+Rj×C)×E=LjPerforming the following steps;
analysis of the (I)i+Ri×C)×E=LiAnd the (I)j+Rj×C)×E=LjObtaining the flash lamp intensity C and the exposure parameter E which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: when the executable instructions are executed, the image processing method according to any embodiment of the disclosure is realized.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium storing an executable program, wherein the executable program, when executed by a processor, implements the image processing method according to any embodiment of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, the reflection index and the ambient brightness of the currently acquired first image may be acquired, and the flash lamp intensity and the exposure parameter that satisfy the optimization condition are acquired based on the reflection index, the ambient brightness and the target optimization model, that is, the optimized flash lamp intensity and the optimized exposure parameter may be acquired. Thus, when the second image is acquired based on the flash intensity and the exposure parameter that satisfy the optimization condition, that is, the second image is acquired by using the optimized flash intensity and the optimized exposure parameter, the image quality of the second image can be improved compared to an image acquired in the current environment by directly using the flash intensity and the exposure parameter before optimization, for example, the image quality includes but is not limited to: and acquiring the second image meeting the target brightness value.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
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.
FIG. 1 is a schematic diagram illustrating an image processing method according to an exemplary embodiment.
FIG. 2 is a flow diagram illustrating an image processing method according to an exemplary embodiment.
FIG. 3 is a schematic illustration of regions of a first image shown in accordance with an exemplary embodiment.
FIG. 4 is a graphical illustration of the reflectance index and ambient brightness of various regions, according to an exemplary embodiment.
FIG. 5 is a flow diagram illustrating an image processing method according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating an image processing apparatus according to an exemplary embodiment.
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like 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. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
As shown in fig. 1, an embodiment of the present disclosure provides a flowchart of an image processing method, as shown in fig. 1, the method includes the following steps:
step S11: determining the reflection index and the ambient brightness of a first image which is acquired currently;
step S12: based on the ambient brightness, the reflection index and a multi-objective optimization model, obtaining the intensity of a flash lamp and exposure parameters meeting optimization conditions;
step S13: and acquiring a second image based on the flash lamp intensity and the exposure parameter which meet the optimization condition.
The image processing method disclosed by the embodiment of the disclosure is applied to electronic equipment; the electronic device may be various types of mobile devices or stationary devices. For example, the electronic device may be an electronic device such as a mobile phone, a computer, a server, a tablet computer, a television, a multimedia device, a wearable bracelet or watch, and the like. The electronic device herein may also include devices such as camera modules or components; the electronic equipment can be used for taking pictures or recording videos and the like.
The reflection index here is: for indicating the ratio of incident or reflected light of a target object in the image at the time the image was acquired.
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 amount of light incident on a unit area within the environment in which the electronic device captures the image, such as 1 lux or a value within 0 to 255 in RGB.
The flash lamp intensity here may be the current intensity or power intensity of the flash lamp, etc.; for example, the flash intensity may be 120mA or 500W, etc. For example, the first flash intensity is 120mA, and the second flash intensity is 130 mA.
The exposure parameters herein may be used to indicate the time of exposure and/or the aperture value of the exposure; 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 may also be used to identify parameters such as sensitivity or aperture value of the exposure.
The objective optimization model herein may be a model comprising various algorithms, such as various objective functions comprised by the objective optimization model; the objective function may also be referred to herein as an optimization formula. For example, the objective function is a nonlinear optimal problem function or a linear function, etc.; the reflection indexes and the ambient brightness of different combinations can be input according to the multi-objective optimization model to obtain the optimized flash lamp intensity and exposure parameters.
For example, in some application scenarios, if different reflection indexes, ambient brightness and preset target brightness values are input into the multi-objective optimization model, optimized flash lamp intensity and exposure parameters are obtained; and acquiring a second image based on the optimized flash lamp intensity and the optimized exposure parameters, so as to obtain a second image of the target brightness value. Thus, the image quality of image acquisition can be improved.
The image brightness here is used to represent the brightness degree of the image; for example, if the image luminance is represented by the color space RGB, the image luminance may be (255, 254, 200) RGB or the like. The target brightness value of the image is the brightness level that the image needs to achieve.
In the embodiment of the disclosure, the reflection index and the ambient brightness of the currently acquired first image can be acquired, and the flash lamp intensity and the exposure parameter meeting the optimization condition are acquired based on the reflection index, the ambient brightness and the target optimization model, that is, the optimized flash lamp intensity and the optimized exposure parameter can be acquired; thus, when acquiring the second image based on the flash intensity and the exposure parameter meeting the optimization condition, the second image is acquired by using the optimized flash intensity and the optimized exposure parameter, and compared with the case of acquiring the second image in the current environment by directly using the flash intensity and the exposure parameter before optimization, the image quality of the second image can be improved, for example, but not limited to: and acquiring the second image meeting the target brightness value.
In some embodiments, the method further comprises: at least one first image is acquired.
One implementation of acquiring at least one first image here is:
at least one of the first images is acquired after a camera of the electronic device is started.
In this way, in this example, the flash intensity and exposure parameters of the image captured by the camera may be optimized based on the reflectance index and ambient brightness of the first image each time the camera is activated.
Another implementation of acquiring at least one first image here is:
at least one of the first images is acquired a predetermined length of time before each acquisition of the second image.
As such, in this example, the flash intensity and exposure parameters of the camera of the electronic device may be optimized at the beginning of each acquisition.
Yet another implementation of acquiring at least two first images herein is:
at least two first images are acquired based on a preset time interval.
As such, in the present example, the flash intensity and exposure parameters of the camera of the electronic device may be periodically corrected at preset time intervals, i.e., periodically.
In other embodiments, an image processing method may also include: determining ambient brightness and a reflection index according to a plurality of first images acquired under different flash lamp intensities and exposure parameters; according to the ambient brightness and the reflection index, determining the intensity of a flash lamp and exposure parameters meeting optimization conditions; and acquiring a second image by using the intensity of the flash lamp and the exposure parameters meeting the optimization conditions.
One way to determine the ambient brightness of the plurality of first images acquired at different flash intensities and exposure parameters is as follows:
the electronic equipment acquires two first images under different flash lamp intensities, obtains a first flash lamp intensity and a first exposure parameter based on the first image, and obtains a second flash lamp intensity and a second exposure parameter based on the second first image; wherein at least the first flash lamp intensity is different from the second flash lamp intensity;
acquiring the image brightness of a first image to obtain a first statistical brightness value, and acquiring the image brightness of a second first image to obtain a second statistical brightness value of a second image;
acquiring the reflection index when the first image is acquired according to the first statistical brightness value, the second statistical brightness value, the first flash lamp intensity, the second flash lamp intensity, the first exposure parameter and the second exposure parameter;
and acquiring the environment brightness when the first image is acquired according to the first statistical brightness value, the first flash lamp intensity, the first exposure parameter and the reflection index.
The first flash intensity here is different from the second flash intensity. The first exposure parameter here is the same as or different from the second exposure parameter.
Here, one implementation manner of obtaining the reflectance index when the first image is acquired based on 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 is as follows:
Figure BDA0002746550960000081
wherein the L1 is a first statistical brightness value, and the L2 is a second statistical brightness value; the E1 is a first exposure parameter, the E2 is a second exposure parameter; the C1 is a first flash intensity and the C2 is a second flash intensity; and R is a reflection index.
Here, one implementation manner of obtaining the ambient brightness when the first image is acquired based on the first statistical brightness value, the first flash intensity, the first exposure parameter, and the reflection index is as follows:
Figure BDA0002746550960000082
wherein L1 is a first statistical brightness value; the E1 is a first exposure parameter; c1 is a first flash intensity; and I is ambient brightness.
In the embodiment of the present disclosure, the ambient brightness and the reflection index may be obtained based on a plurality of first images acquired under different flash lamp intensities and exposure parameters, for example, a plurality of first images continuously acquired, so that on one hand, the operation of obtaining the ambient brightness and the reflection index is simplified; on the other hand, the method can be applied to application scenes with changed flash light intensity, such as scenes of a flashlight mode or a video recording mode.
Furthermore, based on the obtained ambient brightness and the reflection index, the flash lamp intensity and the exposure parameter which meet the optimization condition are obtained, and based on the optimized flash lamp intensity and the optimized exposure parameter, a second image with a better acquisition effect, for example, a second image meeting the target brightness value is acquired.
In some embodiments, the flash intensity that satisfies the optimization condition is less than or equal to an upper value of a flash intensity threshold and greater than or equal to a lower value of the flash intensity threshold;
and/or the presence of a gas in the gas,
the exposure parameter meeting the optimization condition is smaller than or equal to the upper limit value of the exposure parameter threshold range and larger than or equal to the lower limit value of the exposure parameter threshold.
The flash intensity here is within the flash intensity threshold range; the exposure parameter here is within the exposure parameter threshold range.
For example, the exposure parameter is an exposure time, and the exposure time is between 0.03 second and 0.21 second; i.e. the exposure parameter is greater than or equal to 0.03 seconds and less than or equal to 0.21 seconds.
For example, the flash intensity is a flash lamp current, and the flash lamp current is between 0 and 900 mA; i.e., flash lamp intensity greater than or equal to 0mA and less than or equal to 900 mA.
In the embodiment of the disclosure, the optimization performance of the intensity of the flash lamp and the exposure parameter can be further improved by setting the flash lamp intensity meeting the optimization condition and/or the exposure parameter value range meeting the optimization condition, so as to improve the image quality of the acquired second image. In other embodiments, the flash intensity satisfying the optimization condition and/or the exposure parameter satisfying the optimization condition may be other values; for example, the flash intensity may be between 100W to 1000W, etc.; only the image quality such as the image brightness of the second image can be improved based on the flash intensity and the exposure parameter which satisfy the optimization condition.
In other embodiments, the flash intensity satisfying the optimization condition and/or the exposure parameter satisfying the optimization condition may also be determined based on hardware devices of the electronic device; for example, the flash intensity may be between 100W and 1000W, but the maximum power of the flash of the electronic device is 800W, and the flash intensity may be between 100W and 800W. Therefore, the image quality of the image collected by the electronic equipment and the hardware capability of the electronic equipment can be improved.
As shown in fig. 2, in some embodiments, the method further comprises:
step S10: determining k target regions of the first image; k is an integer greater than 1;
the step S11 includes:
step S111: determining the reflection index and the ambient brightness of the 1 st to kth target areas of the first image which is acquired currently; wherein the reflectance index and at least part of the ambient brightness of the 1 st to kth target areas are used to determine flash intensity and exposure parameters that satisfy optimization conditions.
In some embodiments, all of the reflectance and the ambient brightness of the 1 st to kth target regions of the first image are used to determine flash intensity and exposure parameters that satisfy optimization conditions.
In other embodiments, the reflection indication and the ambient brightness of any i target areas from 1 st to k target areas of the first image are used for determining the flash intensity and the exposure parameters meeting the optimization condition; wherein i is an integer less than k.
One way to implement step S10 is:
determining k target regions corresponding to k target objects in the first image based on k target objects included in the first image.
For example, the first image includes at least two target objects, and at least two target regions corresponding to the at least two target objects are determined based on the at least two target objects.
As shown in FIG. 3, it is disclosed that the first image includes twoA schematic diagram of a target object. One of the target objects is a face of a small animal, and the other target object is a background. As such, the electronic device may divide the first image into two target regions based on two target objects in the first image: q1And Q2(ii) a Wherein the target region Q1Corresponding to the face of the small animal, target region Q2Corresponding to the background.
Here, if the reflection indexes of the target objects are different, k target object regions in the first image may be determined according to the distribution of the reflection indexes in the first image; wherein one target object corresponds to one target area.
For example, an image processing method includes:
determining k target objects included in the first image based on a distribution of reflectance indexes of the first image; wherein the reflection indexes corresponding to different target objects are different.
For example, in an application scenario, if an image of a football is captured, the football is a target object, and a background around the football is another target object; the electronic device may determine the corresponding two target regions based on the football and the background in the image.
For another example, in another application scenario, if an image of a cup on a table is captured, the table is a target object, the cup is a target object, and the background is a target object; the electronic device may determine the corresponding three target areas based on the cup, the table, and the background in the image. Of course in other examples, a table or cup, etc. may be split into multiple target objects, respectively.
Another way to implement step S10 is:
dividing the first image into k of the target regions.
For example, the electronic device directly divides the first image into M × N ═ k target regions.
In the embodiment of the present disclosure, the first area may be divided into a plurality of target areas, so that the optimized flash off light intensity and exposure parameters are determined 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 may be beneficial to achieve optimization of the image of each target object.
In some embodiments, the method further comprises:
acquiring an ith reflection index and an ith environment brightness of an ith target area in a first image; wherein i is an integer less than or equal to k.
In other implementations, the method further comprises:
the reflection indexes of the 1 st to kth target areas of the first image and the ambient brightness of the 1 st to kth target areas are acquired.
For example, one implementation of obtaining the ambient brightness of the 1 st to kth target regions is:
Figure BDA0002746550960000111
the I is the ambient brightness of the 1 st to the kth target areas, and the IiI is an integer of 1 or more and k or less, which is the ambient brightness of the ith target region.
Of course, the realization of the ambient brightness of the 1 st to kth target regions may also be:
Figure BDA0002746550960000112
(xi,yi)∈Qi(ii) a Wherein, the (x)i,yi)∈QiFor identifying the position of the ith target region in the first image, the (x)i,yi)∈[(x1,y1),(xk,yk)]Identifying a location in the first image of the 1 st to kth target regions; the I is the ambient brightness of the 1 st to the k-th target areas.
For example, one way to obtain the reflection indices of the 1 st to kth target areas is to:
Figure BDA0002746550960000113
i is the index of reflection of the 1 st to kth target areas, RiI is an integer of 1 or more and k or less.
Of course, the implementation of the reflection indexes of the 1 st to kth target areas may also be:
Figure BDA0002746550960000114
(xi,yi)∈Qi(ii) a Wherein, the (x)i,yi)∈QiFor identifying the position of the ith target region in the first image, the (x)i,yi)∈[(x1,y1),(xk,yk)]Identifying a location in the first image of the 1 st to kth target regions; the I is the reflection index of the 1 st to the k target area.
For example, as shown in fig. 4, the first image is divided into 5 × 5 target areas; the method comprises the steps of continuously acquiring two first images with different flash lamp intensities and exposure parameters, determining a first statistical brightness value, a first flash lamp intensity and a first exposure parameter of the 5 x 5 target areas based on the first image, and determining a second statistical brightness value, a second flash lamp intensity and a second exposure parameter of the 5 x 5 target areas based on the second first image. Calculating the reflection indexes of the 5 × 5 target areas 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, respectively: r00、……、R04、R10、……、R14、R20、……、R24、R30、……、R34、R40、……、R44. Calculating a first statistical brightness value, a first flash intensity, a first exposure parameter and a reflectance index of the 5 × 5 target areas passing through the 5 × 5 target areas,the 5 × 5 target areas were calculated to have respective reflection indices: i is00、……、I04、I10、……、I14、I20、……、I24、I30、……、I34、I40、……、I44
In the disclosed embodiments, based on each determined target area, a reflectance index and/or an ambient brightness corresponding to each target area may be determined.
Referring to fig. 2 again, the step S12 includes:
step S121: correspondingly inputting the ambient brightness, the reflection index and the target brightness value of any at least two target areas from 1 st to kth target areas into an objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter meeting the optimization conditions.
Any at least two of the 1 st to kth target regions herein may be: any at least two of the 1 st to kth target regions, or any multiple of target regions greater than 2.
In some embodiments, the method further comprises:
acquiring a preset target brightness value of an ith target area in a first image; wherein i is an integer less than or equal to k.
The objective function here may be a linear function. For example, the linear function may be: (I)i+Ri×C)×E=Li(ii) a Wherein, the IiIs the ambient brightness of the ith target region of the first image, RiIs the index of reflection of the ith target area of the first image, LiIs the target brightness value of the ith target area of the first image.
One way to implement step S121 is:
the ambient brightness I of the ith target areaiThe reflection index RiAnd the target luminance value Li is input to a linear function (I)i+Ri×C)×E=LiPerforming the following steps;
and comparing the ambient brightness I of the jth target regionjThe reflection index RjAnd the target luminance value Lj is input to a linear function (I)j+Rj×C)×E=LjPerforming the following steps;
analysis of the (I)i+Ri×C)×E=LiAnd the (I)j+Rj×C)×E=LjObtaining the flash lamp intensity C and the exposure parameter E which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
For example, in an application scenario, the ambient brightness I of the 1 st target region of the first image is acquired1And the ambient brightness I of the 2 nd target area2(ii) a Obtaining the reflection index R of the 1 st target area of the first image1And the reflection index R of the 2 nd target area2(ii) a And also acquiring a target brightness value L of a 1 st target area of a preset first image1And a target brightness value L of the 2 nd target region2. Subjecting the said I1The R is1And said L1Substituting into the linear function to form a first objective function (I)1+R1×C)×E=L1(ii) a And subjecting the I to2The R is2And said L2Substituting into the linear function to form a second objective function (I)2+R2×C)×E=L2. And solving the first objective function and the second objective function to obtain the flash lamp intensity C and the exposure parameter E. In this way, when the second image is acquired based on the flash intensity C and the exposure parameter E, at least the 1 st target area and the 2 nd target area satisfying the target brightness value can be obtained, and the image quality of image acquisition of at least the 1 st target area and the 2 nd target area can be improved.
In the above example, after the flash intensity C and the exposure parameter E are obtained; 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 can also be determined; if so, a second image may be acquired based on the flash intensity C and the exposure parameters E. As such, the present example may further improve the image quality of acquiring the first image.
In the above example, if the obtained flash intensity C does not satisfy the flash intensity of the optimization condition or the obtained exposure parameter E does not satisfy the exposure parameter of the optimization condition, the flash intensity and the exposure parameter may be recalculated based on the ambient brightness, the reflectance index, the preset target brightness value, and the like of at least two other target regions of the 1 st to kth target regions except for the 1 st target region and the 2 nd target region.
The objective function here may be a Nonlinear Optimization problem function (Nonlinear Optimization). For example, the non-linear optimal problem function may be:
Figure BDA0002746550960000131
wherein a is more than or equal to E and less than or equal to b, C is more than or equal to C and less than or equal to d; wherein, the I is the ambient brightness of the first image, the R is the reflection index of the first image, and the 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 lamp intensity threshold value, and d is the upper limit value of the flash lamp intensity threshold value.
Another way to implement step S121 is:
the ambient brightness I of the ith target areaiThe reflection index RiThe target luminance value Li input, and the ambient luminance I of the jth target regionjThe reflection index RjAnd inputting the target brightness value Lj into a nonlinear optimal problem function
Figure BDA0002746550960000132
Performing the following steps;
analyzing the above
Figure BDA0002746550960000133
Obtaining the flash lamp intensity satisfying the optimization condition and the intensityThe exposure parameters;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
For example, in an application scenario, the ambient brightness I of the 1 st target region of the first image is acquired1And the ambient brightness I of the 2 nd target area2(ii) a Obtaining the reflection index R of the 1 st target area of the first image1And the reflection index R of the 2 nd target area2(ii) a And also acquiring a target brightness value L of a 1 st target area of a preset first image1And a target brightness value L of the 2 nd target region2. Subjecting the said I1The R is1And said L1And applying said I2The R is2And said L2Substituting into the nonlinear optimization problem function to form a third objective function
Figure BDA0002746550960000134
And solving the third objective function, wherein a is more than or equal to E and less than or equal to b, and C is more than or equal to C and less than or equal to d, and obtaining the intensity C of the flash lamp and the exposure parameter E. In this way, it is possible to obtain an image quality that improves the image acquisition of at least the 1 st target region and the 2 nd target region.
In the above example, if the first image may be k target areas, the ambient brightness, the reflection index, and the target brightness values of the k target areas may also be obtained; the ambient brightness, the reflection index and the target brightness value of any m target areas in the k target areas are substituted into the nonlinear optimal session problem function to form a fourth target function; and acquiring the intensity C of the flash lamp and the exposure parameter E based on the fourth objective function, a is more than or equal to E and less than or equal to b, C is more than or equal to C and less than or equal to d. Where m is an integer greater than 2. In this way, the image quality of the image acquisition of at least m target regions can be improved in this embodiment.
In the above example, if the parameters input to the nonlinear optimization problem function are the ambient brightness, the reflection index, and the target brightness value of any 3 or more target areas; the non-linear optimal problem function may also be
Figure BDA0002746550960000141
And said
Figure BDA0002746550960000142
The above-mentioned
Figure BDA0002746550960000143
And the above-mentioned
Figure BDA0002746550960000144
Flash intensity C and exposure parameter E are determined based on these formulas. Here, i, j and n are integers greater than 0 and less than or equal to k, and the i, the j and the n are all different.
In the embodiment of the present disclosure, the ambient brightness, the reflection index, and the target brightness value of at least two target areas in each target area may be input into the objective function of the target optimization model, so as to determine the flash intensity and the exposure parameter that satisfy the optimization condition. In this way, when the second image is acquired based on the flash intensity and the exposure parameter which satisfy the optimization condition, the image brightness of at least the corresponding at least two target areas can be optimized, so that the image quality of acquiring the second image can be improved. For example, if the at least two target regions are foreground and background regions, the acquisition quality of the foreground and background images of the second image can be optimized, and the scene effect can be enhanced. For another example, if the at least two target regions are regions corresponding to at least two target objects, for example, as shown in fig. 3, the image quality of the captured images of the at least two target objects can be optimized.
One specific example is provided below in connection with any of the embodiments described above:
fig. 5 provides an image processing method, comprising the steps of:
step S21: acquiring the reflection indexes and the ambient brightness of k target areas of a currently acquired first image;
in an optional embodiment, the electronic device divides the first image currently acquired into k target areas, and obtains the reflection index and the ambient brightness of the 1 st to k-th target areas.
In another alternative embodiment, the electronic device is configured to generate at least two of the first images at different flash intensities; and determining the reflection index and the ambient brightness of the first image based on the flash intensity, the exposure parameter and the statistical brightness value of any two images in at least two first images.
Step S22: acquiring target brightness values of k target areas;
in an optional embodiment, the electronic device obtains preset target brightness values of k target areas. The target luminance value here is a luminance value that satisfies optimization requirements.
In another alternative embodiment, the steps S21 and S22 may be: acquiring reflection indexes, environment indexes and target brightness values of i target areas in k target areas in a first image; and i is less than or equal to k, and the i target areas are target areas required by the objective function of the multi-objective optimization model.
Step S23: and inputting the reflection indexes, the environment brightness and the target brightness values of i target areas in the k target areas into a multi-target optimization model to obtain the flash lamp intensity and the exposure parameters meeting the optimization conditions.
In an alternative embodiment, the electronic device inputs the reflectance index, the ambient brightness, and the target brightness values of i of the k target regions into an objective function of the multi-objective optimization model
Figure BDA0002746550960000151
a is less than or equal to E and less than or equal to b and C is less than or equal to C and less than or equal to d, so as to obtain the flash lamp intensity and the exposure parameters meeting the optimized conditions.
For example, in the above examples, the
Figure BDA0002746550960000152
The above-mentioned
Figure BDA0002746550960000153
And the above-mentioned
Figure BDA0002746550960000154
Wherein, the I1And said I2Respectively representing the ambient brightness of the 1 st area and the 2 nd area of the first image; the R is1And said R2The reflection indexes of a 1 st area and a 2 nd area of the first image are respectively; said L1And said L2Target brightness values of a 1 st region and a 2 nd region of the first image respectively; the a is the lower limit value of the exposure parameter threshold, and the b is the upper limit value of the exposure parameter threshold; c is the lower limit value of the flash lamp intensity threshold value, and d is the upper limit value of the flash lamp intensity threshold value.
In the embodiment of the disclosure, the reflection index and the ambient brightness of the currently acquired first image may be acquired, and the flash intensity and the exposure parameter that satisfy the optimization condition are acquired based on the reflection index, the ambient brightness, and the target optimization model. In this way, when acquiring the second image based on the flash intensity and the exposure parameter satisfying the optimization condition, the image quality of the second image can be improved, for example, including but not limited to: and acquiring the second image meeting the target brightness value.
Furthermore, the ambient brightness, the reflection index and the target brightness values of at least two target areas in each target area can be input into the objective function of the target optimization model, so as to determine the flash intensity and the exposure parameters meeting the optimization conditions. In this way, when the second image is acquired based on the flash intensity and the exposure parameter satisfying the optimization condition, the image brightness of at least the corresponding at least two target areas can be optimized, for example, the acquisition quality of the image acquisition of the foreground and background areas can be optimized, the image quality of the image acquisition of the at least two target objects can be enhanced, the image acquisition effect can be enhanced, and the like.
Fig. 6 provides an image processing apparatus shown in an exemplary embodiment, and as shown in fig. 6, the apparatus includes:
a determining module 41, configured to determine a reflection index and an ambient brightness of a currently acquired first image;
a processing module 42, configured to obtain flash lamp intensity and exposure parameters meeting optimization conditions based on the ambient brightness, the reflection index, and a multi-objective optimization model;
and an acquisition module 43, configured to perform second image acquisition based on the flash intensity and the exposure parameter that satisfy the optimization condition.
In some embodiments, the flash intensity that satisfies the optimization condition is less than or equal to an upper value of a flash intensity threshold and greater than or equal to a lower value of the flash intensity threshold;
and/or the presence of a gas in the gas,
the exposure parameter meeting the optimization condition is smaller than or equal to the upper limit value of the exposure parameter threshold range and larger than or equal to the lower limit value of the exposure parameter threshold.
In some embodiments, the determining module 41 is configured to determine k target regions of the first image; k is an integer greater than 1;
the determining module 41 is configured to determine the reflection index and the ambient brightness of the 1 st to kth target areas of the first image currently acquired; wherein the reflectance index and at least part of the ambient brightness of the 1 st to kth target areas are used to determine flash intensity and exposure parameters that satisfy optimization conditions.
In some embodiments, the determining module 41 is configured to determine k target regions corresponding to k target objects in the first image based on k target objects included in the first image;
or,
the determining module 41 is configured to divide the first image into k target regions.
In some embodiments, the determining module 41 is configured to determine k target objects included in the first image based on a distribution of reflectance indexes of the first image; wherein the reflection indexes corresponding to different target objects are different.
In some embodiments, the processing module 42 is configured to input the ambient brightness, the reflectance index, and a target brightness value of any at least two of the 1 st to kth target regions into an objective function of the multi-objective optimization model, so as to obtain the flash intensity and the exposure parameter that satisfy the optimization condition.
In some embodiments, the objective function comprises a non-linear optimal problem function;
the processing module 42 is configured to determine the ambient brightness I of the ith target areaiThe reflection index RiThe target luminance value Li input, and the ambient luminance I of the jth target regionjThe reflection index RjAnd inputting the target brightness value Lj into a nonlinear optimal problem function
Figure BDA0002746550960000171
Performing the following steps;
the processing module 42 is further configured to parse the data
Figure BDA0002746550960000172
Obtaining the flash lamp intensity and the exposure parameter which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
In some embodiments, the objective function comprises a linear function;
the processing module 42 is configured to determine the ambient brightness I of the ith target areaiThe reflection index RiAnd the target luminance value Li is input to a linear function (I)i+Ri×C)×E=LiPerforming the following steps; and comparing the ambient brightness I of the jth target regionjThe reflection index RjAnd the target luminance value Lj is input to a linear function (I)j+Rj×C)×E=LjPerforming the following steps;
the processing module 42 is further configured to parse the (I)i+Ri×C)×E=LiAnd the (I)j+Rj×C)×E=LjObtaining the intensity of the flash lamp satisfying the optimized conditionC and the exposure parameter E;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An embodiment of the present disclosure further provides a server, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: when the executable instructions are executed, the image processing method according to any embodiment of the disclosure is realized.
The memory may include various types of storage media, which are non-transitory computer storage media capable of continuing to remember the information stored thereon after a communication device has been powered down.
The processor may be connected to the memory via a bus or the like for reading the executable program stored on the memory, for example, for implementing at least one of the methods shown in fig. 1 to 2, fig. 5.
Embodiments of the present disclosure also provide a computer-readable storage medium storing an executable program, wherein the executable program, when executed by a processor, implements the image processing method according to any embodiment of the present disclosure. For example, at least one of the methods shown in fig. 1 to 2, fig. 5 is implemented.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating an electronic device 800 according to an example 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, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices 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 or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a 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 an input signal from a 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 boundary of a 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 facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be 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.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light 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 acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may 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 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements 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 invention is limited only by the appended claims.

Claims (18)

1. An image processing method, characterized in that the method comprises:
determining the reflection index and the ambient brightness of a first image which is acquired currently;
based on the ambient brightness, the reflection index and a multi-objective optimization model, obtaining the intensity of a flash lamp and exposure parameters meeting optimization conditions;
and acquiring a second image based on the flash lamp intensity and the exposure parameter which meet the optimization condition.
2. The method of claim 1,
the flash lamp intensity meeting the optimization condition is less than or equal to the upper limit value of a flash lamp intensity threshold value and greater than or equal to the lower limit value of the flash lamp intensity threshold value;
and/or the presence of a gas in the gas,
the exposure parameter meeting the optimization condition is smaller than or equal to the upper limit value of the exposure parameter threshold range and larger than or equal to the lower limit value of the exposure parameter threshold.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
determining k target regions of the first image; k is an integer greater than 1;
the determining the reflection index and the ambient brightness of the currently acquired first image includes:
determining the reflection index and the ambient brightness of the 1 st to kth target areas of the first image which is acquired currently; wherein the reflectance index and at least part of the ambient brightness of the 1 st to kth target areas are used to determine flash intensity and exposure parameters that satisfy optimization conditions.
4. The method of claim 3, wherein determining k target regions of the first image comprises one of:
determining k target regions corresponding to k target objects in the first image based on k target objects included in the first image;
dividing the first image into k of the target regions.
5. The method of claim 4, further comprising:
determining k target objects included in the first image based on a distribution of reflectance indexes of the first image; wherein the reflection indexes corresponding to different target objects are different.
6. The method of claim 3, wherein obtaining the flash lamp intensity and the exposure parameters satisfying optimization conditions based on the ambient brightness, the reflectance index and a multi-objective optimization model comprises:
correspondingly inputting the ambient brightness, the reflection index and the target brightness value of any at least two target areas from 1 st to kth target areas into an objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter meeting the optimization conditions.
7. The method of claim 6, wherein the objective function comprises a non-linear optimal problem function;
correspondingly inputting the ambient brightness, the reflection index and the target brightness value of any at least two target areas from 1 st to kth target areas into an objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter meeting the optimization condition, including:
the ambient brightness I of the ith target areaiThe reflection index RiThe target luminance value Li input, and the ambient luminance I of the jth target regionjThe reflection index RjAnd inputting the target brightness value Lj into a nonlinear optimal problem function
Figure FDA0002746550950000021
Performing the following steps;
analyzing the above
Figure FDA0002746550950000022
Obtaining the flash lamp intensity and the exposure parameter which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
8. The method of claim 6, wherein the objective function comprises a linear function;
correspondingly inputting the ambient brightness, the reflection index and the target brightness value of any at least two target areas from 1 st to kth target areas into an objective function of the multi-objective optimization model to obtain the flash intensity and the exposure parameter meeting the optimization condition, including:
the ambient brightness I of the ith target areaiThe reflection index RiAnd the target luminance value Li is input to a linear function (I)i+Ri×C)×E=LiPerforming the following steps;
and comparing the ambient brightness I of the jth target regionjThe reflection index RjAnd the target luminance value Lj is input to a linear function (I)j+Rj×C)×E=LjPerforming the following steps;
analysis of the (I)i+Ri×C)×E=LiAnd the (I)j+Rj×C)×E=LjObtaining the flash lamp intensity C and the exposure parameter E which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
9. An image processing apparatus, characterized in that the apparatus comprises:
the determining module is used for determining the reflection index and the ambient brightness of the currently acquired first image;
the processing module is used for obtaining the intensity of the flash lamp and exposure parameters meeting optimization conditions based on the environment brightness, the reflection index and the multi-objective optimization model;
and the acquisition module is used for acquiring a second image based on the flash lamp intensity and the exposure parameter which meet the optimization condition.
10. The apparatus of claim 9,
the flash lamp intensity meeting the optimization condition is less than or equal to the upper limit value of a flash lamp intensity threshold value and greater than or equal to the lower limit value of the flash lamp intensity threshold value;
and/or the presence of a gas in the gas,
the exposure parameter meeting the optimization condition is smaller than or equal to the upper limit value of the exposure parameter threshold range and larger than or equal to the lower limit value of the exposure parameter threshold.
11. The apparatus of claim 9 or 10,
the determining module is used for determining k target areas of the first image; k is an integer greater than 1;
the determining module is used for determining the reflection index and the ambient brightness of the 1 st to kth target areas of the first image which is acquired currently; wherein the reflectance index and at least part of the ambient brightness of the 1 st to kth target areas are used to determine flash intensity and exposure parameters that satisfy optimization conditions.
12. The apparatus of claim 11,
the determining module is configured to determine k target regions corresponding to k target objects in the first image based on k target objects included in the first image;
or,
the determining module is configured to divide the first image into k target regions.
13. The apparatus of claim 12,
the determining module is configured to determine k target objects included in the first image based on a distribution of reflectance indexes of the first image; wherein the reflection indexes corresponding to different target objects are different.
14. The apparatus of claim 11,
the processing module is configured to correspondingly input the ambient brightness, the reflection index, and the target brightness values of any at least two target areas from the 1 st to the kth target areas into an objective function of the multi-objective optimization model, so as to obtain the flash intensity and the exposure parameter that satisfy the optimization condition.
15. The apparatus of claim 14, wherein the objective function comprises a non-linear optimal problem function;
the processing module is used for converting the ambient brightness I of the ith target areaiThe reflection index RiThe target luminance value Li input, and the ambient luminance I of the jth target regionjThe reflection index RjAnd inputting the target brightness value Lj into a nonlinear optimal problem function
Figure FDA0002746550950000041
Performing the following steps;
the processing module is also used for analyzing the
Figure FDA0002746550950000042
Obtaining the flash lamp intensity and the exposure parameter which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
16. The apparatus of claim 14, wherein the objective function comprises a linear function;
the processing module is used for converting the ambient brightness I of the ith target areaiThe reflection index RiAnd the target luminance value Li is input to a linear function (I)i+Ri×C)×E=LiPerforming the following steps; and comparing the ambient brightness I of the jth target regionjThe reflection index RjAnd the target luminance value Lj is input to a linear function (I)j+Rj×C)×E=LjPerforming the following steps;
the processing module is also used for resolving the (I)i+Ri×C)×E=LiAnd the (I)j+Rj×C)×E=LjObtaining the flash lamp intensity C and the exposure parameter E which meet the optimization condition;
wherein i and j are integers greater than 0 and less than or equal to k, and i is different from j.
17. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: for implementing the image processing method of any one of claims 1 to 8 when executing the executable instructions.
18. 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 of any one of claims 1 to 8.
CN202011168512.0A 2020-10-28 2020-10-28 Image processing method, image processing device, electronic equipment and storage medium Pending CN114418923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011168512.0A CN114418923A (en) 2020-10-28 2020-10-28 Image processing method, image processing device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011168512.0A CN114418923A (en) 2020-10-28 2020-10-28 Image processing method, image processing device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114418923A true CN114418923A (en) 2022-04-29

Family

ID=81260487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011168512.0A Pending CN114418923A (en) 2020-10-28 2020-10-28 Image processing method, image processing device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114418923A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104853111A (en) * 2015-04-30 2015-08-19 广东欧珀移动通信有限公司 Shooting method and terminal
WO2016086549A1 (en) * 2014-12-04 2016-06-09 中兴通讯股份有限公司 Method and device for controlling flash lamp
CN106713715A (en) * 2017-01-26 2017-05-24 维沃移动通信有限公司 Photographing method and mobile terminal
CN108200352A (en) * 2017-12-27 2018-06-22 努比亚技术有限公司 A kind of method, terminal and storage medium for reconciling picture luminance
CN109547701A (en) * 2019-01-04 2019-03-29 Oppo广东移动通信有限公司 Image capturing method, device, storage medium and electronic equipment
WO2019061546A1 (en) * 2017-09-30 2019-04-04 深圳传音通讯有限公司 Mobile terminal photographing method, device and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016086549A1 (en) * 2014-12-04 2016-06-09 中兴通讯股份有限公司 Method and device for controlling flash lamp
CN104853111A (en) * 2015-04-30 2015-08-19 广东欧珀移动通信有限公司 Shooting method and terminal
CN106713715A (en) * 2017-01-26 2017-05-24 维沃移动通信有限公司 Photographing method and mobile terminal
WO2019061546A1 (en) * 2017-09-30 2019-04-04 深圳传音通讯有限公司 Mobile terminal photographing method, device and computer readable storage medium
CN108200352A (en) * 2017-12-27 2018-06-22 努比亚技术有限公司 A kind of method, terminal and storage medium for reconciling picture luminance
CN109547701A (en) * 2019-01-04 2019-03-29 Oppo广东移动通信有限公司 Image capturing method, device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN108986199B (en) Virtual model processing method and device, electronic equipment and storage medium
CN109345485B (en) Image enhancement method and device, electronic equipment and storage medium
CN109360261B (en) Image processing method, image processing device, electronic equipment and storage medium
CN107463052B (en) Shooting exposure method and device
CN107015648B (en) Picture processing method and device
CN108040204B (en) Image shooting method and device based on multiple cameras and storage medium
CN107480785B (en) Convolutional neural network training method and device
CN105791790B (en) Image processing method and device
CN106982327B (en) Image processing method and device
US10627996B2 (en) Method and apparatus for sorting filter options
CN112331158B (en) Terminal display adjusting method, device, equipment and storage medium
CN107730443B (en) Image processing method and device and user equipment
CN111131596B (en) Screen brightness adjusting method and device
CN108830194B (en) Biological feature recognition method and device
CN112702514B (en) Image acquisition method, device, equipment and storage medium
US11617023B2 (en) Method for brightness enhancement of preview image, apparatus, and medium
CN111277754B (en) Mobile terminal shooting method and device
CN112086075B (en) Screen display parameter adjusting method and device and storage medium
CN114418923A (en) Image processing method, image processing device, electronic equipment and storage medium
CN108182658B (en) Image beautifying method and device
CN107707819B (en) Image shooting method, device and storage medium
CN114418865A (en) Image processing method, device, equipment and storage medium
CN111385400A (en) Backlight brightness adjusting method and device
CN114666439B (en) Method, device and medium for adjusting dark color mode display state
CN110874829A (en) Image processing method and device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination