CN111083386B - Image processing method and electronic device - Google Patents

Image processing method and electronic device Download PDF

Info

Publication number
CN111083386B
CN111083386B CN201911345791.0A CN201911345791A CN111083386B CN 111083386 B CN111083386 B CN 111083386B CN 201911345791 A CN201911345791 A CN 201911345791A CN 111083386 B CN111083386 B CN 111083386B
Authority
CN
China
Prior art keywords
target
information
value
picture
preset
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.)
Active
Application number
CN201911345791.0A
Other languages
Chinese (zh)
Other versions
CN111083386A (en
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201911345791.0A priority Critical patent/CN111083386B/en
Publication of CN111083386A publication Critical patent/CN111083386A/en
Application granted granted Critical
Publication of CN111083386B publication Critical patent/CN111083386B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation

Abstract

The embodiment of the invention discloses an image processing method and electronic equipment, relates to the technical field of communication, and can solve the problem that when other light sources exist in the environment where the electronic equipment is located, the shooting effect of the electronic equipment is poor. The method comprises the following steps: under the condition of performing first light supplement on a shot object, acquiring a first parameter of a target picture, wherein the target picture is a picture which is acquired by a camera of the electronic equipment and corresponds to the shot object, and the first parameter comprises target brightness information and target depth information; determining estimated brightness information of the target according to the first parameter; determining a target exposure parameter corresponding to a target picture according to the estimated brightness information of the target; and in the process of supplementing light to the shot object for the second time, exposing the target picture by adopting the target exposure parameters. The embodiment of the invention is applied to the process of supplementing light to a shot object by the electronic equipment.

Description

Image processing method and electronic device
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to an image processing method and electronic equipment.
Background
At present, when a user shoots through an electronic device, if the electronic device is in a dark environment, the user can turn on a shooting light supplement function, so that after shooting input is performed by the user, the electronic device can supplement light to a shot object through a flash lamp to obtain a bright shot image; in addition, in the light supplementing process of the electronic equipment, the electronic equipment can determine a proper exposure according to the brightness value of the shooting object after light supplementing, and the brightness value of the shooting image is adjusted according to the exposure to prevent the over-exposure phenomenon of the shooting image.
However, in the above method, since other light sources (such as street lamps or car lamps) may exist in the environment where the electronic device is located, when the electronic device adjusts the brightness value of the captured image, the electronic device may be affected by the other light sources, so that the brightness value of the captured image after adjustment is too low, that is, the finally obtained captured image is too dark, and thus the capturing effect of the electronic device is poor.
Disclosure of Invention
The embodiment of the invention provides an image processing method and electronic equipment, which can solve the problem that the shooting effect of the electronic equipment is poor when other light sources exist in the environment where the electronic equipment is located.
In order to solve the technical problem, the embodiment of the invention adopts the following technical scheme:
in a first aspect of the embodiments of the present invention, an image processing method is provided, which is applied to an electronic device, and includes: under the condition of performing first light supplement on a shot object, acquiring a first parameter of a target picture, wherein the target picture is a picture which is acquired through a camera of electronic equipment and corresponds to the shot object, and the first parameter comprises target brightness information and target depth information; determining estimated brightness information of the target according to the first parameter; determining a target exposure parameter corresponding to a target picture according to the estimated brightness information of the target; and in the process of supplementing light to the shot object for the second time, exposing the target picture by adopting the target exposure parameters.
In a second aspect of the embodiments of the present invention, there is provided an electronic device, including: the device comprises an acquisition module, a determination module and a processing module. The device comprises an acquisition module and a processing module, wherein the acquisition module is used for acquiring a first parameter of a target picture under the condition of performing first light supplement on a shot object, the target picture is a picture which is acquired by a camera of the electronic equipment and corresponds to the shot object, and the first parameter comprises target brightness information and target depth information. The determining module is used for determining the estimated brightness information of the target according to the first parameter acquired by the acquiring module; and determining a target exposure parameter corresponding to the target picture according to the estimated brightness information of the target. And the processing module is used for carrying out exposure processing on the target picture by adopting the target exposure parameters determined by the determining module in the process of carrying out secondary light supplement on the shot object.
In a third aspect of the embodiments of the present invention, an electronic device is provided, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, and when executed by the processor, the electronic device implements the steps of the image processing method according to the first aspect.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the image processing method according to the first aspect.
In the embodiment of the present invention, the electronic device may determine the estimated target brightness information according to the first parameter (i.e., the target brightness information and the target depth information) of the target picture obtained in the first light supplementing process, and determine the target exposure parameter according to the estimated target brightness information, so as to perform exposure processing on the target picture by using the target exposure parameter in the second light supplementing process for the photographed object. Because the electronic equipment can determine the distance between other light sources and the electronic equipment in the shooting environment and the influence degree on the brightness of the shot picture according to the actual brightness information and the actual depth information of the target picture, a proper brightness information is determined to determine a proper exposure parameter, and the target picture is exposed through the brightness information to change the brightness of the target picture, the influence of other light sources on the shot image can be reduced, the situation that the shot image is too bright or too dark is avoided, and the shooting effect of the electronic equipment can be improved.
Drawings
Fig. 1 is a schematic structural diagram of an android operating system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an image processing method according to an embodiment of the present invention;
fig. 3 is a second schematic diagram of an image processing method according to an embodiment of the present invention;
fig. 4 is a third schematic diagram of an image processing method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 6 is a hardware schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second," and the like, in the description and in the claims of embodiments of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, a first target value and a second target value, etc. are used to distinguish between different target values, rather than to describe a particular order of target values.
In the description of the embodiments of the present invention, the meaning of "a plurality" means two or more unless otherwise specified. For example, a plurality of elements refers to two elements or more.
The term "and/or" herein is an association relationship describing an associated object, and means that there may be three relationships, for example, a display panel and/or a backlight, which may mean: there are three cases of a display panel alone, a display panel and a backlight at the same time, and a backlight alone. The symbol "/" herein denotes a relationship in which the associated object is or, for example, input/output denotes input or output.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The embodiment of the invention provides an image processing method and electronic equipment, and the electronic equipment can determine the distance between other light sources and the electronic equipment in a shooting environment and the influence degree on the brightness of a shot picture according to the actual brightness information and the actual depth information of the target picture, so as to determine an appropriate brightness information and determine an appropriate exposure parameter, and thus, the target picture is exposed through the brightness information to change the brightness of the target picture, so that the influence of the other light sources on the shot image can be reduced, the situation that the shot image is too bright or too dark is avoided, and the shooting effect of the electronic equipment can be improved.
The image processing method and the electronic device provided by the embodiment of the invention can be applied to the process of supplementing light to a shot object by the electronic device. Specifically, the method can be applied to a process of performing exposure processing on a shot picture in the process of performing light supplement twice on a shot object by the electronic equipment.
The electronic device in the embodiment of the present invention may be an electronic device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present invention are not limited in particular.
The following describes a software environment to which the image processing method provided by the embodiment of the present invention is applied, by taking an android operating system as an example.
Fig. 1 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention. In fig. 1, the architecture of the android operating system includes 4 layers, which are respectively: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).
The application program layer comprises various application programs (including system application programs and third-party application programs) in an android operating system.
The application framework layer is a framework of the application, and a developer can develop some applications based on the application framework layer under the condition of complying with the development principle of the framework of the application.
The system runtime layer includes libraries (also called system libraries) and android operating system runtime environments. The library mainly provides various resources required by the android operating system. The android operating system running environment is used for providing a software environment for the android operating system.
The kernel layer is an operating system layer of an android operating system and belongs to the bottommost layer of an android operating system software layer. The kernel layer provides kernel system services and hardware-related drivers for the android operating system based on the Linux kernel.
Taking an android operating system as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the image processing method provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 1, so that the image processing method may operate based on the android operating system shown in fig. 1. Namely, the processor or the electronic device can implement the image processing method provided by the embodiment of the invention by running the software program in the android operating system.
The electronic device in the embodiment of the invention can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiment of the present invention is not particularly limited.
An image processing method and an electronic device provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
In the embodiment of the invention, when a user shoots through a shooting application program of the electronic equipment, if the electronic equipment is in a dark environment, the user can turn on a flash lamp function in the shooting application program, and then the user can carry out shooting input so that the electronic equipment can supplement light for a shot object; however, when the electronic device detects that there are other light sources (such as a street lamp or a car lamp) in the shooting environment, in order to ensure the shooting effect of the shot image, the electronic device may perform light supplement twice through a flash lamp instead of performing light supplement once on the shot object directly, so as to perform exposure processing on the shot image. Specifically, when the electronic device performs first light supplement, the electronic device may determine the distance between other light sources in the shooting environment and the electronic device and the influence degree of the other light sources on the brightness of the shot picture according to the brightness information, the depth information, and the like of the shot picture after Automatic Exposure (AE) convergence, so as to determine an appropriate exposure parameter, and then when performing second light supplement, the electronic device may adopt the exposure parameter determined during the first light supplement to perform exposure processing on the shot picture, so as to avoid the situation that the shot picture is too dark, thereby obtaining an image with a better shooting effect.
Optionally, in this embodiment of the present invention, the shooting application may be an application having a shooting function, for example, a camera application.
It should be noted that, the electronic device may adjust the brightness of the captured image of the electronic device to an appropriate brightness according to the brightness of the capturing environment in an AE convergence manner, and then obtain the brightness information and the depth information of the current captured image.
Fig. 2 shows a flowchart of an image processing method provided in an embodiment of the present invention, and the method may be applied to an electronic device having an android operating system as shown in fig. 1. As shown in fig. 2, the image processing method provided by the embodiment of the present invention may include steps 201 to 204 described below.
Step 201, under the condition of performing first light supplement on a shot object, the electronic device acquires a first parameter of a target picture.
In an embodiment of the present invention, the target picture is a picture corresponding to a photographed object and acquired by a camera of an electronic device, and the first parameter includes target brightness information and target depth information.
In the embodiment of the invention, under the condition that the electronic equipment displays the shooting preview interface and starts the flash function, after a user carries out shooting input, the electronic equipment can fill light into a shot object in a flash mode so as to acquire a first parameter of a target picture currently displayed on the shooting preview interface after AE convergence, namely the first parameter is acquired after the AE convergence and before the electronic equipment executes a shooting action.
Optionally, in this embodiment of the present invention, the electronic device may include at least one camera, and the electronic device may obtain the first parameter through a plurality of cameras in the at least one camera.
Optionally, in the embodiment of the present invention, the electronic device may obtain, by using the first camera, one brightness information and one depth information of the target picture, obtain, by using the second camera, one brightness information and one depth information of the target picture, determine the brightness information of the target according to the two brightness information, and determine the depth information of the target according to the two depth information, so as to improve accuracy of the obtained first parameter.
Optionally, in this embodiment of the present invention, the electronic device may include at least one camera, and the electronic device may obtain luminance information of the target picture (that is, target luminance information) through one camera of the at least one camera, and obtain depth information of the target picture (that is, target depth information) through time of flight (TOF) corresponding to the camera.
It should be noted that the electronic device may send infrared light to the photographic subject through the sensor of the camera and receive the infrared light returned from the photographic subject through the sensor, and then determine the target depth information according to the round trip time length of the infrared light (i.e., the time interval between the time of sending the infrared light and the time of receiving the returned infrared light).
The target brightness information may be understood as a brightness value of a target screen, and the target depth information may be understood as a distance between a photographic subject and a lens of the electronic device.
Optionally, in an embodiment of the present invention, the target luminance information includes N pieces of first luminance information, and the target depth information includes N pieces of first depth information.
Optionally, in the embodiment of the present invention, as shown in fig. 3 with reference to fig. 2, before the "electronic device acquires the first parameter of the target screen" in step 201, the image processing method provided in the embodiment of the present invention further includes step 301 described below, and the step 201 may be specifically implemented by step 201a described below.
Step 301, under the condition of performing primary light supplement on a shot object, the electronic device performs image processing on a target picture to obtain N picture areas.
In the embodiment of the invention, N is an integer greater than 1.
Optionally, in the embodiment of the present invention, the electronic device may perform image segmentation processing on the target picture to obtain N picture areas.
Optionally, in this embodiment of the present invention, the electronic device may divide the target screen into N ═ m × N, that is, into m rows and N columns of screen regions.
In step 201a, the electronic device acquires N pieces of first luminance information and N pieces of first depth information corresponding to N picture areas.
In an embodiment of the present invention, the N pieces of first luminance information are luminance information of N picture areas in a target picture, the N pieces of first depth information are depth information of the N picture areas, one piece of first luminance information corresponds to one picture area, and one piece of first depth information corresponds to one picture area.
Optionally, in the embodiment of the present invention, for each piece of first luminance information in the N pieces of first luminance information, the electronic device may obtain luminance information of all pixel points in one screen region through the first camera and the second camera, and obtain one piece of first luminance information corresponding to the one screen region according to calculation (for example, averaging) of the luminance information of all pixel points, so as to obtain the N pieces of first luminance information.
Optionally, in the embodiment of the present invention, the electronic device may obtain each piece of first depth information through the first camera and the second camera, or may obtain each piece of first depth information through TOF measurement.
Exemplarily, as shown in table 1, it shows a correspondence relationship of N picture areas, N first luminance information, and N first depth information in the embodiment of the present invention.
TABLE 1
Figure BDA0002333304610000051
In Table 1, the picture area A11The first brightness information (i.e. the picture area of the first row and the first column after the division of the target picture) is L11And the corresponding first depth information is D11(ii) a Picture area Amn(i.e., for the picture area of the m-th row and the n-th column after the target picture is divided, m and n are positive integers) the corresponding first brightness information is LmnAnd the corresponding first depth information is Dmn
In the embodiment of the invention, because the brightness information and the depth information of different picture areas in the target picture may be different, the electronic device may perform image processing on the target picture to obtain a plurality of picture areas, so that the electronic device may determine the first brightness information and the first depth information corresponding to each picture area, respectively, and thus, the accuracy of the obtained brightness information and the depth information of the target picture may be improved.
Step 202, the electronic device determines the estimated brightness information of the target according to the first parameter.
It can be understood that the target brightness information is actual brightness information of a target picture acquired by the electronic device, and the target depth information is actual depth information of the target picture acquired by the electronic device; the electronic device may determine an appropriate luminance information (i.e., the estimated target luminance information) according to the actual luminance information and the actual depth information of the target picture, so as to determine whether there is any influence of other light sources or other light sources on the luminance of the target picture in the environment where the electronic device is located.
Optionally, in an embodiment of the present invention, the target luminance information includes N pieces of first luminance information, the target depth information includes N pieces of first depth information, and the target estimated luminance information includes N pieces of first estimated luminance information; the electronic device may determine N first estimated luminance information according to the N first luminance information and the N first depth information to determine the estimated luminance information of the target. The step 202 can be realized by the steps 202a and 202b described below.
Step 202a, for each first luminance information of the N first luminance information and each first depth information of the N first depth information, the electronic device determines a first estimated luminance information of a picture region according to a first luminance information, a first depth information, a weight value set and an initial luminance information to obtain N first estimated luminance information.
In an embodiment of the present invention, the one weight value set corresponds to one picture region, the one initial brightness information corresponds to one picture region, and the one weight value set includes a preset weight value, a first weight value and a second weight value, where the first weight value is a weight value corresponding to the first brightness information, and the second weight value is a weight value corresponding to the first depth information.
It is to be understood that, for each of the N screen regions, the electronic device may execute the step 202a to obtain the first estimated luminance information corresponding to each screen region, so as to determine N first estimated luminance information corresponding to the N screen regions.
It should be noted that N picture regions correspond to N weight value sets (one picture region corresponds to one weight value set), and the N weight value sets include N preset weight values (one weight value set includes one preset weight value), and the N preset weight values may be the same or different; the N picture areas correspond to N pieces of initial luminance information (one picture area corresponds to one piece of initial luminance information), and the N pieces of initial luminance information may be the same or different.
Exemplarily, in combination with table 1, as shown in table 2, it shows a corresponding relationship of N first luminance information, N first depth information, N sets of weight values, N initial luminance information, and N first predicted luminance information in the embodiment of the present invention.
TABLE 2
Figure BDA0002333304610000061
In Table 2, the frame area A11The corresponding first brightness information is L11The corresponding first depth information is D11The corresponding preset weighted value is W11The corresponding first weight value is B11The corresponding second weight value is C11And the corresponding initial luminance information is P11The electronic device can be based on the picture area A11Corresponding to these parameters (i.e. the first luminance information L)11First depth information D11A preset weight value W11First weight value B11A second weight value C11And initial luminance information P11) Determining the picture area A11The first estimated luminance information of (1) is Q11(ii) a Picture area AmnThe corresponding first brightness information is LmnThe corresponding first depth information is DmnThe corresponding preset weighted value is WmnThe corresponding first weight value is BmnThe corresponding second weight value is CmnAnd the corresponding initial luminance information is PmnThe electronic device can be based on the picture area AmnCorresponding to these parameters (i.e. the first luminance information L)mnFirst depth information DmnA preset weight value WmnFirst weight value BmnA second weight value CmnAnd initial luminance information Pmn) Determining the picture area AmnThe first estimated luminance information of (1) is Qmn
Wherein, the picture area A11Corresponding preset weighted value W11Corresponding first weight value B11And a corresponding second weight value C11Is the picture area A11A corresponding set of weight values; picture area AmnCorresponding preset weighted value WmnCorresponding first weight value BmnAnd a corresponding second weight value CmnIs the picture area AmnA corresponding set of weight values.
Optionally, in the embodiment of the present invention, the electronic device may store N preset weight values in a list form.
Optionally, in an embodiment of the present invention, a value range of each of the N preset weight values is 0 to 1, a preset weight value of a central picture area of the target picture (for example, a picture area where the central picture area is m/2 rows and N/2 columns) may be 1, and a preset weight value of an edge picture area of the target picture (the edge picture area may be a picture area on the periphery of the target picture area, for example, a corner picture area) may be 0, or is greater than 0 and smaller than a fifth preset threshold (for example, a numerical value slightly greater than 0). It can be understood that the preset weight value of the center picture region of the target picture is the largest, and the preset weight value of the edge picture region is the smallest, that is, the preset weight values from the center picture region to the edge picture region of the target picture are sequentially decreased (for example, linearly decreased, gaussian distributed decreased, or other decreasing manners).
Optionally, in an embodiment of the present invention, each of the preset weight values is used to indicate a weight value corresponding to a brightness in one screen region. In the flash light supplement process, the brightness of different picture areas in the target picture is different (for example, the brightness of the central picture area is brighter), and a preset weight value (i.e., a preset weight value in a weight value set) may be respectively corresponding to each picture area to change the brightness of each picture area in the N picture areas.
Optionally, in the embodiment of the present invention, in the process of supplementing light by using a flash, the shot object is lightened by the flash, and the lightening degrees of different positions of the shot object are different, and each picture area may correspond to a first weight value (that is, a first weight value in a set of weight values) according to the lightening degrees of different positions of the shot object, so as to change the brightness of each picture area in the N picture areas.
Optionally, in the embodiment of the present invention, in the process of supplementing light by using the flash lamp, the lighting degree of the flash lamp is related to the distance from the photographic object, that is, the farther the distance from the photographic object is, the weaker the lighting degree of the flash lamp is, a second weight value (that is, a second weight value in a weight value set) may be respectively corresponding to each picture region according to the distance from the photographic object, so as to reduce the influence of the photographic object with the farther distance on the flashed photographic result.
It can be understood that, in the process of supplementing light by using the flash lamp, the first brightness information of each picture region corresponds to a preset weight value according to the actual brightness of each picture region, the first brightness information of each picture region corresponds to a first weight value according to the lighting degree of the flash lamp, and the first depth information of each picture region corresponds to a second weight value according to the distance from the shooting object, so as to obtain first estimated brightness information corresponding to each picture region, that is, each first estimated brightness information is proper brightness information obtained by combining the actual brightness, the lighting degree of the flash lamp and the distance from the shooting object, so that the electronic device can accurately perform subsequent exposure processing according to each first estimated brightness information.
Alternatively, in the embodiment of the present invention, the "electronic device determines, in the step 202a, a first estimated luminance information of a picture region according to a first luminance information, a first depth information, a weight value set, and an initial luminance information" may specifically be implemented in the following steps 202a1 to 202a 3.
In step 202a1, the electronic device determines a first target value according to a first luminance information and a first weight value.
It is to be understood that, for each of the N screen regions, the electronic device may perform the step 202a1 to obtain the first target value corresponding to each screen region, so as to determine N first target values corresponding to the N screen regions.
Exemplarily, in combination with table 2, as shown in table 3, it shows a corresponding relationship between N first luminance information, N first weight values, and N first target values in the embodiment of the present invention.
TABLE 3
Figure BDA0002333304610000071
Figure BDA0002333304610000081
In Table 3, the frame area A11The corresponding first brightness information is L11The corresponding first weight value is B11The corresponding first target value is Wb11(ii) a Picture area AmnThe corresponding first brightness information is LmnCorresponding first weight valueIs BmnThe corresponding first target value is Wbmn
Optionally, in the embodiment of the present invention, the step 202a1 may be specifically implemented by the following step 202a11, step 202a12, or step 202a 13.
In step 202a11, if a first brightness information is less than or equal to a first preset threshold, the electronic device determines the first preset value as a first target value.
Optionally, in an embodiment of the present invention, the first preset value may be 1.
Illustratively, in conjunction with Table 3, Picture region A11The corresponding first brightness information is L11And the corresponding first weight value is B11If the L is11Less than or equal to a first predetermined threshold (e.g., L)1) The electronic device can determine the picture area a11Corresponding first target value Wb11Is 1.
In step 202a12, if the first brightness information is greater than or equal to the second predetermined threshold, the electronic device determines the second predetermined value as a first target value.
In an embodiment of the invention, the second predetermined threshold is greater than the first predetermined threshold, and the second predetermined value is greater than the first predetermined value.
Optionally, in an embodiment of the present invention, the second preset value may be a value greater than 1.
It can be understood that when the first brightness information of one frame region is greater than or equal to the second preset threshold, the brightness of the one frame region may be determined to be brighter, and a value greater than 1 may be determined as the first target value corresponding to the one frame region, so as to change the brightness of the one frame region.
It should be noted that the second preset value may be adjusted according to an actual use requirement, for example, the second preset value may be increased to increase the brightness adjustment degree of the highlight frame region in the target frame, and the second preset value may be decreased to decrease the brightness adjustment degree of the highlight frame region in the target frame.
Examples of the inventionAlternatively, in conjunction with Table 3, first luminance information (e.g., L) of one of the N screen regionsij) Greater than or equal to a second preset threshold (e.g., L)2) The electronic device will then preset the second value (e.g., Wb)max) Determining a first target value (e.g. Wb) for the certain frame regionij=Wbmax)。
Step 202a13, if the first brightness information is greater than the first preset threshold and less than the second preset threshold, the electronic device determines a first target value according to the first brightness information, the first preset threshold, the second preset threshold and the second preset value.
Optionally, in the embodiment of the present invention, the electronic device may determine a first target value according to a first luminance information, a first preset threshold, a second preset threshold, and a second preset value by using a first preset algorithm.
Optionally, in the embodiment of the present invention, the first preset algorithm specifically may be: wbij=(Lij-L1)/(L2-L1)*(Wbmax-1) +1, wherein, WbijIs a first target value (i.e. the first target value corresponding to the picture area in the ith row and the jth column), LijIs a first luminance information, L1Is a first predetermined threshold value, L2Is a second predetermined threshold value, WbmaxIs a second predetermined value.
It can be understood that, under the condition that the first luminance information of one picture area is greater than a first preset threshold and smaller than a second preset threshold, the value of the first target value corresponding to the one picture area is between the first preset threshold and the second preset threshold; and as the first brightness information increases, the first target value corresponding to the frame area also increases, i.e. shows a linear increasing trend.
For example, at the first luminance information L11If the image area A is larger than the first preset threshold and smaller than the second preset threshold11First luminance information L of11If a, the electronic device may determine c as the screen area a11Corresponding first itemA scalar value; if the frame area A11First luminance information L of11B, the electronic device may determine d as the screen area a11Corresponding first target value, wherein b>a, and c>d。
Step 202a2, the electronic device determines a second target value according to a first depth information and the second weight value.
It is to be understood that, for each of the N screen regions, the electronic device may perform the step 202a2 to obtain the second target value corresponding to each screen region, so as to determine N second target values corresponding to the N screen regions.
Exemplarily, in combination with table 2, as shown in table 4, it shows a corresponding relationship between N pieces of first depth information, N pieces of second weight values, and N pieces of second target values in the embodiment of the present invention.
TABLE 4
Figure BDA0002333304610000091
In Table 4, the frame area A11The corresponding first depth information is D11The corresponding second weight value is C11The corresponding first target value is Wd11(ii) a Picture area AmnThe corresponding first depth information is DmnThe corresponding first weight value is CmnThe corresponding first target value is Wdmn
Optionally, in the embodiment of the present invention, the step 202a2 may be specifically implemented by the following step 202a21, step 202a22, or step 202a 23.
In step 202a21, if the first depth information is less than or equal to the third preset threshold, the electronic device determines the first preset value as a second target value.
Illustratively, in conjunction with Table 4, Picture region A11The corresponding first depth information is D11And the corresponding second weight value is C11If D is11Less than or equal to a third predetermined threshold (e.g. D)1) Then electronThe device can determine picture area a11Corresponding second target value Wd11Is 1.
In step 202a22, if the first depth information is greater than or equal to the fourth preset threshold, the electronic device determines the third preset value as a second target value.
In an embodiment of the present invention, the fourth predetermined threshold is greater than a third predetermined threshold, and the third predetermined value is smaller than the first predetermined value.
Optionally, in an embodiment of the present invention, the third preset value may be a value greater than or equal to 0.
It is understood that, when the first depth information of one picture area is greater than or equal to the fourth preset threshold, the depth of the one picture area may be determined to be greater, and a value greater than or equal to 0 may be determined as the second target value corresponding to the one picture area, so as to change the brightness of the one picture area.
Illustratively, in conjunction with Table 4, first depth information (e.g., D) for one of the N picture regionsij) Greater than or equal to a fourth preset threshold (e.g., D)2) Then the electronic device determines a second preset value (e.g. 0) as a second target value (e.g. Wd) of the certain frame areaij=0)。
Step 202a23, if the first depth information is greater than the third preset threshold and less than the fourth preset threshold, the electronic device determines a second target value according to the first depth information, the third preset threshold and the fourth preset threshold.
Optionally, in the embodiment of the present invention, the electronic device may determine a second target value according to the first depth information, the third preset threshold, and the fourth preset threshold by using a second preset algorithm.
Optionally, in the embodiment of the present invention, the second preset algorithm specifically may be: wdij=1-(Dij-D1)/(D2-D1) Wherein, WdijIs a second target value (i.e. the second target value corresponding to the picture area in the ith row and the jth column), DijIs oneFirst depth information, D1Is a third predetermined threshold value, D2Is a fourth preset threshold.
Step 202a3, the electronic device determines a first estimated brightness information according to a first target value, a second target value, a preset weight value and an initial brightness information.
Optionally, in the embodiment of the present invention, the electronic device may determine a first estimated brightness information according to a first target value, a second target value, a preset weight value, and an initial brightness information by using a third preset algorithm.
Optionally, in an embodiment of the present invention, the third preset algorithm may specifically be Pij=Wij*Wbij*Wdij*QijWherein P isijIs a first estimated luminance information, WijIs a preset weight value, WbijIs a first target value, WdijIs a second target value, QijIs an initial luminance information.
Step 202b, the electronic device determines the estimated target brightness information according to the N first estimated brightness information.
Optionally, in the embodiment of the present invention, the electronic device may determine the estimated target brightness information according to the N first estimated brightness information by using a fourth preset algorithm.
Optionally, in this embodiment of the present invention, the fourth preset algorithm may specifically be any one of the following algorithms: an average algorithm, a mean algorithm, a confidence value algorithm, and the like.
Illustratively, in conjunction with Table 2, Picture region A11The corresponding first estimated brightness information is Q11Picture area A12The corresponding first estimated brightness information is Q12Picture area A1nThe corresponding first estimated brightness information is Q1nPicture area A21The corresponding first estimated brightness information is Q21Picture area AmnThe corresponding first estimated brightness information is QmnThe electronic device can calculate the sum of N first estimated brightness information of N picture areas and calculate N first estimated brightnessThe ratio of the sum of the degree information to N (i.e., m x N).
In the embodiment of the invention, in the process of supplementing light by using the flash lamp, the actual brightness of each picture area in the plurality of picture areas, the lighting degree of the flash lamp and the distance from the shot object can be combined, and first estimated brightness information is respectively determined for each picture area, so that the electronic equipment can accurately perform subsequent exposure processing according to each first estimated brightness information.
Step 203, the electronic device determines a target exposure parameter corresponding to the target picture according to the estimated brightness information of the target.
In the embodiment of the present invention, the target exposure parameter may be used to perform exposure processing on a target screen.
Optionally, in an embodiment of the present invention, the target exposure parameter may include at least one of: exposure time, exposure intensity value, and sensitivity (ISO) value, etc.
Optionally, in the embodiment of the present invention, as shown in fig. 4 with reference to fig. 2, before the step 203, the image processing method provided in the embodiment of the present invention further includes a step 401 described below, and the step 203 may be specifically realized by the step 203a or the step 203b described below.
Step 401, the electronic device determines whether the estimated target brightness information is greater than the preset brightness information.
Step 203a, if the estimated brightness information of the target is greater than the preset brightness information, the electronic device reduces the current exposure parameter of the target picture to obtain the target exposure parameter.
It can be understood that the above-mentioned target estimated brightness information may be a reference basis for adjusting the current exposure parameter of the target frame; when the estimated target brightness information is larger than the preset brightness information, the phenomenon of overexposure exists in the shot object, and the current exposure parameter of the target picture can be reduced, so that the reduced exposure parameter is used for carrying out image processing on the target picture, and an excessively bright image area exists in the shot image obtained by shooting.
Step 203b, if the estimated brightness information of the target is smaller than the preset brightness information, the electronic device increases the current exposure parameter of the target picture to obtain the target exposure parameter.
It can be understood that when the estimated target brightness information is less than the preset brightness information, the shot object has an underexposure phenomenon, and the current exposure parameter of the target picture can be increased, so that the image processing is performed on the target picture by the increased exposure parameter, and an excessively dark image area exists in the shot image obtained by shooting.
In the embodiment of the invention, the target estimated brightness information can be a reference basis for adjusting the current exposure parameter of the target picture, and the electronic equipment can adjust the current exposure parameter of the target picture according to the target estimated brightness information, so that the adjusted exposure parameter is used for carrying out image processing on the target picture, and an image area with over brightness or over darkness is prevented from being existed in the shot image obtained by shooting.
Optionally, in the embodiment of the present invention, if the estimated target brightness information is equal to the preset brightness information, the electronic device may not adjust the current exposure parameter of the target frame, that is, determine the current exposure parameter as the target exposure parameter.
And 204, in the process of supplementing light to the shot object for the second time, the electronic equipment adopts the target exposure parameters to expose the target picture.
In the embodiment of the invention, the electronic equipment can adjust the display brightness value of the target picture in the shooting preview interface by adopting the target exposure parameter in the process of supplementing light to the shot object for the second time.
Optionally, in the embodiment of the present invention, the electronic device may reduce the display brightness value of the target picture by reducing the current exposure parameter (for example, the current exposure duration and the current ISO) so as to avoid an over-bright area existing in the target picture; or, the electronic device may increase the display brightness value of the target picture by increasing the current exposure parameter, so as to avoid an excessively dark area in the target picture.
According to the embodiment of the invention, after the electronic equipment carries out exposure processing on the target picture, the target image can be shot, namely the target image is an image after the exposure processing.
It can be understood that when there is other light sources or the influence degree of other light sources on the brightness of the target picture is large in the environment where the electronic device is located, the electronic device obtains the target exposure parameter according to the target estimated brightness information by determining the target estimated brightness information in advance to change the display brightness value of the target picture, so that the influence of other light sources on the brightness of the target picture is reduced.
The embodiment of the invention provides an image processing method, and electronic equipment can determine estimated target brightness information according to first parameters (namely target brightness information and target depth information) of a target picture acquired in a first light supplementing process, and determine target exposure parameters according to the estimated target brightness information, so that the target exposure parameters are adopted to perform exposure processing on the target picture in a second light supplementing process on a shot object. Because the electronic equipment can determine the distance between other light sources and the electronic equipment in the shooting environment and the influence degree on the brightness of the shot picture according to the actual brightness information and the actual depth information of the target picture, a proper brightness information is determined to determine a proper exposure parameter, and the target picture is exposed through the brightness information to change the brightness of the target picture, the influence of other light sources on the shot image can be reduced, the situation that the shot image is too bright or too dark is avoided, and the shooting effect of the electronic equipment can be improved.
Fig. 5 shows a schematic diagram of a possible structure of an electronic device involved in the embodiment of the present invention. As shown in fig. 5, the electronic device 50 may include: an acquisition module 51, a determination module 52 and a processing module 53.
The obtaining module 51 is configured to obtain a first parameter of a target picture under the condition of performing first light supplement on a shot object, where the target picture is a picture corresponding to the shot object and acquired by a camera of an electronic device, and the first parameter includes target brightness information and target depth information. The determining module 52 is configured to determine the estimated target brightness information according to the first parameter obtained by the obtaining module 51; and determining a target exposure parameter corresponding to the target picture according to the estimated brightness information of the target. And the processing module 53 is configured to perform exposure processing on the target picture by using the target exposure parameter determined by the determining module 52 in the process of performing secondary light supplement on the shot object.
In a possible implementation manner, the target luminance information includes N pieces of first luminance information, and the target depth information includes N pieces of first depth information. The processing module 53 is further configured to perform image processing on the target picture to obtain N picture areas before the obtaining module 51 obtains the first parameter of the target picture, where N is an integer greater than 1. The obtaining module 51 is specifically configured to obtain N pieces of first luminance information and N pieces of first depth information corresponding to the N picture areas, where one piece of first luminance information corresponds to one picture area, and one piece of first depth information corresponds to one picture area.
In one possible implementation manner, the target estimated luminance information includes N first estimated luminance information. The determining module 52 is specifically configured to determine, for each first luminance information of the N first luminance information and each first depth information of the N first depth information, a first pre-estimated luminance information of a picture region according to a first luminance information, a first depth information, a weight value set, and an initial luminance information, so as to obtain N first pre-estimated luminance information, where a weight value set corresponds to a picture region, an initial luminance information corresponds to a picture region, a weight value set includes a preset weight value, a first weight value, and a second weight value, the first weight value is a weight value corresponding to the first luminance information, and the second weight value is a weight value corresponding to the first depth information; and determining the estimated brightness information of the target according to the N pieces of first estimated brightness information.
In a possible implementation manner, the determining module 52 is specifically configured to determine a first target value according to a first brightness information and a first weight value; determining a second target value according to the first depth information and the second weight value; and determining first pre-estimated brightness information according to a first target value, a second target value, a preset weight value and initial brightness information.
In a possible implementation manner, the determining module 52 is specifically configured to determine the first preset value as a first target value if a first brightness information is less than or equal to a first preset threshold; or if the first brightness information is greater than or equal to a second preset threshold value, determining the second preset value as a first target value, wherein the second preset threshold value is greater than the first preset threshold value, and the second preset value is greater than the first preset value; or, if the first brightness information is greater than the first preset threshold and less than the second preset threshold, determining a first target value according to the first brightness information, the first preset threshold, the second preset threshold and the second preset value.
In a possible implementation manner, the determining module 52 is specifically configured to determine the first preset value as a second target value if one of the first depth information is less than or equal to a third preset threshold; or if the first depth information is greater than or equal to a fourth preset threshold, determining a third preset numerical value as a second target numerical value, wherein the fourth preset threshold is greater than the third preset threshold, and the third preset numerical value is smaller than the first preset numerical value; or, if the first depth information is greater than the third preset threshold and less than the fourth preset threshold, determining a second target value according to the first depth information, the third preset threshold and the fourth preset threshold.
In a possible implementation manner, the determining module 52 is specifically configured to, if the estimated target brightness information is greater than the preset brightness information, turn down the current exposure parameter of the target picture to obtain a target exposure parameter; or if the estimated target brightness information is less than the preset brightness information, the current exposure parameter of the target picture is increased to obtain the target exposure parameter.
The electronic device provided by the embodiment of the present invention can implement each process implemented by the electronic device in the above method embodiments, and for avoiding repetition, detailed descriptions are not repeated here.
The embodiment of the invention provides electronic equipment, which can determine the distance between other light sources in a shooting environment and the electronic equipment and the influence degree on the brightness of a shot picture according to the actual brightness information and the actual depth information of the target picture, thereby determining proper brightness information to determine a proper exposure parameter, and carrying out exposure processing on the target picture through the brightness information to change the brightness of the target picture, so that the influence of the other light sources on the shot image can be reduced, the situation that the shot image is too bright or too dark can be avoided, and the shooting effect of the electronic equipment can be improved.
Fig. 6 is a hardware schematic diagram of an electronic device implementing various embodiments of the invention. As shown in fig. 6, electronic device 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111.
It should be noted that the electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown in fig. 6, or combine some components, or arrange different components, as will be understood by those skilled in the art. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 110 is configured to, under the condition of performing first light supplement on a shot object, obtain a first parameter of a target picture, where the target picture is a picture corresponding to the shot object and acquired by a camera of an electronic device, and the first parameter includes target brightness information and target depth information; determining estimated brightness information of the target according to the first parameter; determining a target exposure parameter corresponding to a target picture according to the estimated brightness information of the target; and in the process of supplementing light to the shot object for the second time, carrying out exposure processing on the target picture by adopting the target exposure parameters.
The embodiment of the invention provides electronic equipment, which can determine the distance between other light sources in a shooting environment and the electronic equipment and the influence degree on the brightness of a shot picture according to the actual brightness information and the actual depth information of the target picture, thereby determining proper brightness information to determine a proper exposure parameter, and carrying out exposure processing on the target picture through the brightness information to change the brightness of the target picture, so that the influence of the other light sources on the shot image can be reduced, the situation that the shot image is too bright or too dark can be avoided, and the shooting effect of the electronic equipment can be improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 101 may be used for receiving and sending signals during a message transmission or call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 102, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the electronic apparatus 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 104 is used to receive an audio or video signal. The input unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. The microphone 1042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode.
The electronic device 100 also includes at least one sensor 105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or the backlight when the electronic device 100 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. Touch panel 1071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 1071 (e.g., operations by a user on or near touch panel 1071 using a finger, stylus, or any suitable object or attachment). The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and receives and executes commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 1071 may be overlaid on the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 6, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
The interface unit 108 is an interface for connecting an external device to the electronic apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 100 or may be used to transmit data between the electronic apparatus 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the electronic device. Processor 110 may include one or more processing units; alternatively, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The electronic device 100 may further include a power supply 111 (e.g., a battery) for supplying power to each component, and optionally, the power supply 111 may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 100 includes some functional modules that are not shown, and are not described in detail herein.
Optionally, an embodiment of the present invention further provides an electronic device, which includes the processor 110 shown in fig. 6, the memory 109, and a computer program stored in the memory 109 and capable of running on the processor 110, where the computer program, when executed by the processor 110, implements the processes of the foregoing method embodiment, and can achieve the same technical effect, and details are not described here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the method embodiments, and can achieve the same technical effects, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be, for example, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (13)

1. An image processing method applied to an electronic device, the method comprising:
under the condition of performing first light supplement on a shot object, acquiring a first parameter of a target picture, wherein the target picture is a picture corresponding to the shot object and acquired by a camera of the electronic equipment, the first parameter comprises target brightness information and target depth information, the target brightness information comprises N pieces of first brightness information, and the target depth information comprises N pieces of first depth information;
determining target pre-estimated brightness information according to the first parameters, wherein the target pre-estimated brightness information comprises N pieces of first pre-estimated brightness information;
determining a target exposure parameter corresponding to the target picture according to the target estimated brightness information;
in the process of supplementing light to the shot object for the second time, exposure processing is carried out on the target picture by adopting the target exposure parameters;
before the obtaining of the first parameter of the target picture, the method further includes:
carrying out image processing on the target picture to obtain N picture areas, wherein N is an integer greater than 1;
the determining the estimated brightness information of the target according to the first parameter comprises:
determining, for each first luminance information of the N first luminance information and each first depth information of the N first depth information, a first pre-estimated luminance information of a picture region according to a first luminance information, a first depth information, a weight value set, and an initial luminance information, so as to obtain the N first pre-estimated luminance information, where the weight value set corresponds to the picture region, the initial luminance information corresponds to the picture region, the weight value set includes a preset weight value, a first weight value, and a second weight value, the first weight value is a weight value corresponding to the first luminance information, and the second weight value is a weight value corresponding to the first depth information;
and determining the estimated target brightness information according to the N pieces of first estimated brightness information.
2. The method according to claim 1, wherein the obtaining the first parameter of the target picture comprises:
and acquiring N pieces of first brightness information and N pieces of first depth information corresponding to the N picture areas, wherein one piece of first brightness information corresponds to one picture area, and one piece of first depth information corresponds to the one picture area.
3. The method of claim 1, wherein determining a first predicted luminance information for a picture region based on a first luminance information, a first depth information, a set of weight values, and an initial luminance information comprises:
determining a first target value according to the first brightness information and the first weight value;
determining a second target value according to the first depth information and the second weight value;
and determining the first pre-estimated brightness information according to the first target value, the second target value, the preset weight value and the initial brightness information.
4. The method of claim 3, wherein determining a first target value based on the first luminance information and the first weight value comprises:
if the first brightness information is less than or equal to a first preset threshold value, determining a first preset value as the first target value;
if the first brightness information is greater than or equal to a second preset threshold, determining a second preset value as the first target value, wherein the second preset threshold is greater than the first preset threshold, and the second preset value is greater than the first preset value;
and if the first brightness information is larger than the first preset threshold and smaller than the second preset threshold, determining the first target value according to the first brightness information, the first preset threshold, the second preset threshold and the second preset value.
5. The method of claim 3, wherein determining a second target value based on the first depth information and the second weight value comprises:
if the first depth information is smaller than or equal to a third preset threshold, determining a first preset numerical value as a second target numerical value;
if the first depth information is greater than or equal to a fourth preset threshold, determining a third preset numerical value as the second target numerical value, wherein the fourth preset threshold is greater than the third preset threshold, and the third preset numerical value is smaller than the first preset numerical value;
and if the first depth information is greater than the third preset threshold and less than the fourth preset threshold, determining a second target value according to the first depth information, the third preset threshold and the fourth preset threshold.
6. The method according to any one of claims 1 to 5, wherein the determining a target exposure parameter corresponding to the target frame according to the target pre-estimated brightness information comprises:
if the estimated target brightness information is larger than the preset brightness information, reducing the current exposure parameter of the target picture to obtain the target exposure parameter;
if the estimated target brightness information is smaller than the preset brightness information, the current exposure parameter of the target picture is increased to obtain the target exposure parameter.
7. An electronic device, characterized in that the electronic device comprises: the device comprises an acquisition module, a determination module and a processing module;
the acquisition module is used for acquiring a first parameter of a target picture under the condition of performing first light supplement on a shot object, wherein the target picture is a picture which is acquired by a camera of the electronic equipment and corresponds to the shot object, the first parameter comprises target brightness information and target depth information, the target brightness information comprises N pieces of first brightness information, and the target depth information comprises N pieces of first depth information;
the determining module is configured to determine target pre-estimated brightness information according to the first parameter acquired by the acquiring module, where the target pre-estimated brightness information includes N pieces of first pre-estimated brightness information; determining a target exposure parameter corresponding to the target picture according to the target estimated brightness information;
the processing module is configured to perform exposure processing on the target picture by using the target exposure parameter determined by the determining module in a process of performing secondary light supplement on the shot object;
the processing module is further configured to perform image processing on the target picture to obtain N picture areas before the acquisition module acquires the first parameter of the target picture, where N is an integer greater than 1;
the determining module is specifically configured to determine, for each first luminance information of the N pieces of first luminance information and each first depth information of the N pieces of first depth information, a first pre-estimated luminance information of a picture region according to a piece of first luminance information, a piece of first depth information, a weight value set, and an initial luminance information, so as to obtain the N pieces of first pre-estimated luminance information, where the weight value set corresponds to the picture region, the initial luminance information corresponds to the picture region, the weight value set includes a preset weight value, a first weight value, and a second weight value, the first weight value is a weight value corresponding to the one piece of first luminance information, and the second weight value is a weight value corresponding to the one piece of first depth information; and determining the estimated target brightness information according to the N pieces of first estimated brightness information.
8. The electronic device according to claim 7, wherein the obtaining module is specifically configured to obtain N pieces of first luminance information and N pieces of first depth information corresponding to the N picture areas, one piece of first luminance information corresponding to one picture area, and one piece of first depth information corresponding to the one picture area.
9. The electronic device of claim 7, wherein the determining module is specifically configured to determine a first target value according to the first luminance information and the first weight value; determining a second target value according to the first depth information and the second weight value; and determining the first pre-estimated brightness information according to the first target value, the second target value, the preset weight value and the initial brightness information.
10. The electronic device according to claim 9, wherein the determining module is specifically configured to determine a first preset value as the first target value if the first brightness information is less than or equal to a first preset threshold; or if the first brightness information is greater than or equal to a second preset threshold, determining a second preset value as the first target value, wherein the second preset threshold is greater than the first preset threshold, and the second preset value is greater than the first preset value; or, if the first brightness information is greater than the first preset threshold and less than the second preset threshold, determining the first target value according to the first brightness information, the first preset threshold, the second preset threshold and the second preset value.
11. The electronic device according to claim 9, wherein the determining module is specifically configured to determine the first preset value as the second target value if the first depth information is less than or equal to a third preset threshold; or if the first depth information is greater than or equal to a fourth preset threshold, determining a third preset value as the second target value, wherein the fourth preset threshold is greater than the third preset threshold, and the third preset value is smaller than the first preset value; or, if the first depth information is greater than the third preset threshold and smaller than the fourth preset threshold, determining the second target value according to the first depth information, the third preset threshold and the fourth preset threshold.
12. The electronic device according to any one of claims 7 to 11, wherein the determining module is specifically configured to, if the estimated target brightness information is greater than preset brightness information, decrease a current exposure parameter of the target frame to obtain the target exposure parameter; or if the estimated target brightness information is smaller than the preset brightness information, increasing the current exposure parameter of the target picture to obtain the target exposure parameter.
13. An electronic device, comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the image processing method according to any one of claims 1 to 6.
CN201911345791.0A 2019-12-24 2019-12-24 Image processing method and electronic device Active CN111083386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911345791.0A CN111083386B (en) 2019-12-24 2019-12-24 Image processing method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911345791.0A CN111083386B (en) 2019-12-24 2019-12-24 Image processing method and electronic device

Publications (2)

Publication Number Publication Date
CN111083386A CN111083386A (en) 2020-04-28
CN111083386B true CN111083386B (en) 2021-01-22

Family

ID=70317201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911345791.0A Active CN111083386B (en) 2019-12-24 2019-12-24 Image processing method and electronic device

Country Status (1)

Country Link
CN (1) CN111083386B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111935481B (en) * 2020-09-23 2022-02-01 贝壳技术有限公司 Method and device for testing image shooting device and computer readable storage medium
CN113596345B (en) * 2021-08-09 2023-01-17 荣耀终端有限公司 Parameter adjustment method, display control method, electronic device, and medium
CN114071018A (en) * 2021-11-16 2022-02-18 济南信通达电气科技有限公司 Method and equipment for adjusting brightness of disconnecting link indicating board image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791809A (en) * 2016-12-14 2017-05-31 维沃移动通信有限公司 A kind of light measuring method and mobile terminal
CN107796825A (en) * 2016-09-01 2018-03-13 宁波舜宇光电信息有限公司 Device inspection method
CN108307123A (en) * 2018-01-22 2018-07-20 维沃移动通信有限公司 A kind of exposure adjustment method and mobile terminal
CN108401457A (en) * 2017-08-25 2018-08-14 深圳市大疆创新科技有限公司 A kind of control method of exposure, device and unmanned plane

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100562894C (en) * 2007-03-23 2009-11-25 北京中星微电子有限公司 A kind of image combining method and device
CN105100632B (en) * 2014-05-13 2018-07-27 北京展讯高科通信技术有限公司 The method of adjustment and device of imaging device automatic exposure, imaging device
US10931883B2 (en) * 2018-03-20 2021-02-23 Magik Eye Inc. Adjusting camera exposure for three-dimensional depth sensing and two-dimensional imaging

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107796825A (en) * 2016-09-01 2018-03-13 宁波舜宇光电信息有限公司 Device inspection method
CN106791809A (en) * 2016-12-14 2017-05-31 维沃移动通信有限公司 A kind of light measuring method and mobile terminal
CN108401457A (en) * 2017-08-25 2018-08-14 深圳市大疆创新科技有限公司 A kind of control method of exposure, device and unmanned plane
CN108307123A (en) * 2018-01-22 2018-07-20 维沃移动通信有限公司 A kind of exposure adjustment method and mobile terminal

Also Published As

Publication number Publication date
CN111083386A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN108307109B (en) High dynamic range image preview method and terminal equipment
CN110913131B (en) Moon shooting method and electronic equipment
CN108234894B (en) Exposure adjusting method and terminal equipment
CN110505400B (en) Preview image display adjustment method and terminal
CN111083386B (en) Image processing method and electronic device
CN110213484B (en) Photographing method, terminal equipment and computer readable storage medium
CN107730460B (en) Image processing method and mobile terminal
CN107623818B (en) Image exposure method and mobile terminal
CN108040209B (en) Shooting method and mobile terminal
CN108965728B (en) Brightness adjusting method and terminal
CN109462745B (en) White balance processing method and mobile terminal
CN109474784B (en) Preview image processing method and terminal equipment
CN109246351B (en) Composition method and terminal equipment
CN108616687B (en) Photographing method and device and mobile terminal
CN109859718B (en) Screen brightness adjusting method and terminal equipment
CN110708475B (en) Exposure parameter determination method, electronic equipment and storage medium
CN111050069B (en) Shooting method and electronic equipment
CN109167917B (en) Image processing method and terminal equipment
CN111131722A (en) Image processing method, electronic device, and medium
CN111145151A (en) Motion area determination method and electronic equipment
CN110913133B (en) Shooting method and electronic equipment
CN111432122B (en) Image processing method and electronic equipment
CN110769162B (en) Electronic equipment and focusing method
CN111026263B (en) Audio playing method and electronic equipment

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
GR01 Patent grant
GR01 Patent grant