CN109862282B - Method and device for processing person image - Google Patents

Method and device for processing person image Download PDF

Info

Publication number
CN109862282B
CN109862282B CN201910120026.2A CN201910120026A CN109862282B CN 109862282 B CN109862282 B CN 109862282B CN 201910120026 A CN201910120026 A CN 201910120026A CN 109862282 B CN109862282 B CN 109862282B
Authority
CN
China
Prior art keywords
brightness
image
exposure
compensation value
value
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
CN201910120026.2A
Other languages
Chinese (zh)
Other versions
CN109862282A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910120026.2A priority Critical patent/CN109862282B/en
Publication of CN109862282A publication Critical patent/CN109862282A/en
Application granted granted Critical
Publication of CN109862282B publication Critical patent/CN109862282B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application provides a person image processing method and a person image processing device, wherein the method comprises the following steps: when a human face exists in a preview picture, determining a preview exposure value corresponding to the preview picture when the brightness of a human face area is at a brightness target value, acquiring the global brightness of the preview picture, determining a first exposure compensation value for improving the brightness of a background dark area according to the brightness of the human face area and the global brightness, determining a second exposure compensation value for reducing the brightness of an overexposure area, and continuously shooting according to the preview exposure value, the first exposure compensation value and the second exposure compensation value respectively to obtain multi-frame images, wherein the multi-frame images comprise a first image exposed by the preview exposure value, a second image exposed by the first exposure compensation value and a third image exposed by the second exposure compensation value, and generating a figure image according to the first image, the second image and the third image. The method improves the shooting effect of the figure image under the night scene or the scene with weak light brightness.

Description

Method and device for processing person image
Technical Field
The present application relates to the field of electronic devices, and in particular, to a method and an apparatus for processing a character image.
Background
With the development of electronic device technology, most cameras of electronic devices have a night scene shooting function. When people in the night scene are photographed, the camera can be adjusted to the night scene mode to photograph. However, most of the people in the shot night scene have dark and unclear portrait, unclear background and unsatisfactory shooting effect.
Disclosure of Invention
The application provides a figure image processing method which is used for solving the problem that the figure image shooting effect under the night scene in the related technology is not ideal.
An embodiment of one aspect of the present application provides a method for processing a human image, including:
when the human face exists in the preview picture, determining a preview exposure value corresponding to the preview picture when the brightness of the human face area is at a brightness target value;
acquiring the global brightness of the preview picture, and determining a first exposure compensation value for improving the brightness of a background dark area according to the brightness of the face area and the global brightness;
determining a second exposure compensation value for reducing the brightness of the overexposed area;
continuously shooting according to the preview exposure value, the first exposure compensation value and the second exposure compensation value respectively to obtain multi-frame images, wherein the multi-frame images comprise a first image exposed by the preview exposure value, a second image exposed by the first exposure compensation value and a third image exposed by the second exposure compensation value;
and generating a person image according to the first image, the second image and the third image.
According to the character image processing method, the preview exposure value corresponding to the preview image when the brightness of the face area in the preview image is at the brightness target value is utilized to respectively determine the first exposure compensation value used for improving the brightness of the background dark area and the second exposure compensation value used for reducing the brightness of the overexposure area, continuous shooting is respectively carried out according to the preview exposure value, the first exposure compensation value and the second exposure compensation value to obtain the multi-frame image, the character image is generated according to the first image, the second image and the third image, and therefore the multi-frame images under the three exposure compensation values are synthesized to obtain the character image. In the whole shooting process, the first exposure compensation value for improving the brightness of a background dark area and the second exposure compensation value for reducing the brightness of an overexposure area are respectively determined by utilizing the preview exposure value, so that the condition that a person image is clear and bright in shooting under a night scene or a scene with weak light brightness can be ensured, the background can be clearly seen, and the shooting effect of the person image under the scenes is improved due to the fact that bright areas such as lamplight and advertising boards cannot be overexposed images in the background.
Another embodiment of the present application provides a human image processing apparatus, including:
the device comprises a first determining module, a second determining module and a control module, wherein the first determining module is used for determining a preview exposure value corresponding to a preview picture when the brightness of a face area is at a brightness target value when the face is detected to exist in the preview picture;
the global brightness acquisition module is used for acquiring the global brightness of the preview picture;
the second determining module is used for determining a first exposure compensation value for improving the brightness of a background dark area according to the brightness of the face area and the global brightness;
the third determining module is used for determining a second exposure compensation value for reducing the brightness of the overexposure area;
the shooting module is used for continuously shooting according to the preview exposure value, the first exposure compensation value and the second exposure compensation value to obtain multi-frame images, wherein the multi-frame images comprise a first image which is exposed by adopting the preview exposure value, a second image which is exposed by adopting the first exposure compensation value and a third image which is exposed by adopting the second exposure compensation value;
and the image generation module is used for generating a person image according to the first image, the second image and the third image.
The character image processing device in the embodiment of the application determines a first exposure compensation value for improving the brightness of a background dark area and a second exposure compensation value for reducing the brightness of an overexposure area respectively by using a preview exposure value corresponding to a preview image when the brightness of a face area in the preview image is at a brightness target value, and performs continuous shooting respectively according to the preview exposure value, the first exposure compensation value and the second exposure compensation value to obtain a multi-frame image, and generates a character image according to the first image, the second image and the third image, so that the multi-frame images under the three exposure compensation values are synthesized to obtain the character image. In the whole shooting process, the first exposure compensation value for improving the brightness of a background dark area and the second exposure compensation value for reducing the brightness of an overexposure area are respectively determined by utilizing the preview exposure value, so that the condition that a person image is clear and bright in shooting under a night scene or a scene with weak light brightness can be ensured, the background can be clearly seen, and the shooting effect of the person image under the scenes is improved due to the fact that bright areas such as lamplight and advertising boards cannot be overexposed images in the background.
An embodiment of another aspect of the present application provides an electronic device, including: the image processing device comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the image processing method of the person as the embodiment of the aspect.
Another embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, wherein the program is executed by a processor to implement the human image processing method according to the above-mentioned embodiment.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a method for processing a human image according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another human image processing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another human image processing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another human image processing method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a human image processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
A person image processing method and apparatus according to an embodiment of the present application are described below with reference to the drawings.
The embodiment of the application provides a person image processing method aiming at the problem that the person image shooting effect under the night scene shot in the related technology is not ideal.
According to the character image processing method, the preview exposure value corresponding to the preview image when the brightness of the face area in the preview image is at the brightness target value is utilized to respectively determine the first exposure compensation value used for improving the brightness of the background dark area and the second exposure compensation value used for reducing the brightness of the overexposure area, continuous shooting is respectively carried out according to the preview exposure value, the first exposure compensation value and the second exposure compensation value to obtain the multi-frame image, the character image is generated according to the first image, the second image and the third image, and therefore the multi-frame images under the three exposure compensation values are synthesized to obtain the character image. In the whole shooting process, the first exposure compensation value for improving the brightness of a background dark area and the second exposure compensation value for reducing the brightness of an overexposure area are respectively determined by utilizing the preview exposure value, so that the condition that a person image is clear and bright in shooting under a night scene or a scene with weak light brightness can be ensured, the background can be clearly seen, and the shooting effect of the person image under the scenes is improved due to the fact that bright areas such as lamplight and advertising boards cannot be overexposed images in the background.
Fig. 1 is a schematic flowchart of a person image processing method according to an embodiment of the present application. It should be noted that the person image processing method in the embodiment of the present application may be applied to capture a person image in a night scene, or capture a person image in a scene with a light intensity smaller than a certain threshold.
The character image processing method provided by the embodiment of the application can be executed by electronic equipment such as a mobile phone, a palm computer and the like with a photographing function and an operating system, so that the photographing effect of the character image in a night scene or a scene with weak light brightness is improved.
As shown in fig. 1, the human image processing method includes:
step 101, when a human face is detected in the preview picture, determining a preview exposure value corresponding to the preview picture when the brightness of the human face area is at a brightness target value.
Taking shooting in a night scene as an example, when a user opens a camera in the electronic device and takes a picture in the night scene, the electronic device can display a preview picture. When a human face exists in the preview picture, the human face picture needs to be clearly displayed.
In this embodiment, the electronic device may detect whether a human face exists in the preview picture, and when it is detected that the human face exists in the preview picture, determine a corresponding preview exposure value when the brightness of the human face area in the preview picture is at the brightness target value. The brightness target value may be preset when the electronic device leaves a factory, or may be set by a user as needed.
In this embodiment, the preview Exposure value may be an Exposure compensation value (EV for short) of 0, that is, EV 0.
If the brightness of the face area in the preview picture is not at the brightness target value, the exposure amount can be adjusted to enable the brightness of the face area to be at the brightness target value, and the corresponding exposure value when the brightness of the face area is at the brightness target value is taken as the preview exposure value. For example, when the brightness of the face area in the preview picture is lower than the brightness target value, the exposure can be increased; when the brightness of the face region is higher than the brightness target value, the exposure amount can be reduced.
And 102, acquiring the global brightness of the preview picture, and determining a first exposure compensation value for improving the brightness of a background dark area according to the brightness of the face area and the global brightness. The global brightness refers to a brightness value of the entire preview screen.
In this embodiment, the overall brightness of the preview image may be obtained according to the brightness of each region in the preview image. For example, an average value of the luminance of each region in the preview screen may be calculated, and the average value may be used as the global luminance of the preview screen. For another example, a weighted average of the luminance of each region in the preview screen may be calculated, and the weighted average is used as the global luminance of the preview screen. For another example, the brightness of each pixel in the preview picture may be obtained, and the sum of the brightness of each pixel is divided by the total number of pixels, so that the obtained value is the global brightness of the preview picture. It should be noted that the three global brightness calculation manners given above are only for facilitating the understanding of those skilled in the art, and should not be taken as a specific limitation of the present application.
When a person image is shot in a night scene, light, a billboard and other bright areas may exist in the background, and the areas except the bright areas in the background are usually dark, so that the dark areas of the shot background are not clear enough. In order to increase the brightness of the background dark area, an exposure compensation value may be increased to increase the exposure amount at the time of photographing.
In this embodiment, the first exposure compensation value for increasing the brightness of the background dark area may be determined according to the brightness of the face area and the global brightness.
In practical applications, an EV greater than 0, such as EV +0.3, EV +0.7, etc., indicates that the exposure amount is greater than that of EV0, and the exposure amount at EV +0.7 is greater than that at EV +0.3, with other exposure parameters being the same.
If the difference between the brightness of the face area and the global brightness is larger, the dark background area is indicated to be darker, and then the first exposure compensation value is larger, so that the exposure amount is larger; if the difference between the brightness of the face region and the global brightness is smaller, the difference between the brightness of the background dark region and the brightness of the face region is smaller, and then the first exposure compensation value for improving the background dark region is smaller.
In step 103, a second exposure compensation value for reducing the brightness of the overexposed region is determined.
When night scene shooting is carried out, bright areas such as lighting, advertising boards and the like may exist in the background, and the areas are easy to be overexposed, so that the overexposed areas such as the lighting, the advertising boards and the like cannot be clearly seen.
In this embodiment, a second exposure compensation value for reducing the brightness of the overexposed region may be determined. It is understood that to avoid overexposure of bright areas in the background, the exposure compensation value may be made less than 0, such as EV-0.3, EV-0.7, etc., to reduce the exposure amount.
When the second exposure compensation value is determined, as a possible implementation manner, a trigger operation for photographing is detected in real time, when the trigger operation for photographing is detected, for example, when an operation of clicking a photographing button or an operation of pressing a photographing shortcut key is detected, multi-frame pre-exposure with different brightness is performed on a current picture, in the process of pre-exposure, a dynamic range of a current scene is determined, so as to determine a minimum exposure compensation value according to the dynamic range of the current scene, and thus, the second exposure compensation value is determined between the minimum exposure compensation value and a preview exposure value.
For example, with a minimum exposure compensation value of EV-2.3 and a preview exposure value of EV0, the second exposure compensation value may be EV-2.3, EV-2.0, EV-1.3, etc.
As another possible implementation manner, a relationship table of the luminance and the exposure compensation value is established in advance, wherein the luminance and the exposure compensation value may be in a one-to-one relationship or a one-to-many relationship. When the triggering operation aiming at the photographing control is detected, the brightness of the current scene is obtained, and the relation table of the brightness and the exposure compensation value is searched according to the brightness of the current scene so as to determine the exposure compensation value corresponding to the brightness of the current scene and serve as the second exposure compensation value.
The second exposure compensation value may be one or more. For example, the second exposure compensation value may be EV-0.3, EV-0.7, EV-1.0.
In the embodiment of the present application, the order of determining the first exposure compensation value and the second exposure compensation value is not limited.
And 104, continuously shooting according to the preview exposure value, the first exposure compensation value and the second exposure compensation value respectively to obtain multi-frame images, wherein the multi-frame images comprise a first image exposed by the preview exposure value, a second image exposed by the first exposure compensation value and a third image exposed by the second exposure compensation value.
After the preview exposure value, the first exposure compensation value and the second exposure compensation value are determined, the preview exposure value, the first exposure compensation value and the second exposure compensation value can be respectively obtained to carry out continuous shooting to obtain multi-frame images.
That is, the number of first images exposed with the preview exposure value, the number of second images exposed with the first exposure compensation value, and the number of third images exposed with the second exposure compensation value are all greater than 1.
For example, if the preview exposure value is EV0, the first exposure compensation value is EV +0.3, and the second exposure compensation value is EV-0.7, then the multi-frame image when continuous shooting is performed with EV0, the multi-frame image when continuous shooting is performed with EV +0.3, and the multi-frame image when continuous shooting is performed with EV-0.7 are acquired.
When the second exposure compensation value is multiple, one image can be taken with each second exposure compensation value. For example, if the second exposure compensation values are EV-0.3, EV-0.7, EV-1.3, then one image may be taken at each of EV-0.3, EV-0.7, and EV-1.3, respectively.
Step 105, generating a person image according to the first image, the second image and the third image.
In this embodiment, the brightness of the face region in the first image is at a brightness target value; the second image is shot by the first exposure compensation value used for improving the brightness of the background dark area, and the brightness of the background dark area in the second image is higher than that of the background dark area in the first image; the third image is captured at a second exposure compensation value that reduces the brightness of the overexposed region, and the brightness of the overexposed region in the second image is lower than the brightness of the overexposed region in the first image.
In order to enable the person image to be clear and bright in the shot person image in the night scene, the background can be seen clearly, and the bright areas such as the light and the advertising board in the background cannot be overexposed, the first image, the second image and the third image can be synthesized to obtain the person image which is clear and bright in the person image, clear in the background and free of overexposure in the bright areas such as the light and the advertising board in the background. For example, the face region in the first image, the background dark region in the second image, and the overexposed region in the third image may be synthesized to obtain the image of the person.
In practical applications, when determining the preview exposure value, the brightness of the face area in the preview screen may not be at the brightness target value. In this embodiment, the brightness of the face region in the preview image can be at the brightness target value by adjusting the exposure parameter, so as to obtain the preview exposure value. Fig. 2 is a schematic flow chart of another human image processing method according to an embodiment of the present application, which is described in detail below with reference to fig. 2.
As shown in fig. 2, the determining of the preview exposure value corresponding to the preview image when the brightness of the face area is at the brightness target value includes:
step 201, adjusting the exposure parameter corresponding to the preview picture according to the brightness of the face area, so that the brightness of the face area is at the brightness target value.
The exposure parameters may include, but are not limited to, one or more combinations of exposure time, sensitivity, exposure compensation values, and the like. In practical applications, exposure parameters are obtained by adjusting hardware such as an aperture, a shutter, and sensitivity.
In this embodiment, when the brightness of the face area in the preview picture is not at the brightness target value, the brightness of the face area can be at the brightness target value by adjusting the exposure parameter corresponding to the preview picture. For example, the brightness of the face area in the preview screen is set to the brightness target value by adjusting the aperture and the light sensitivity.
Step 202, determining a target exposure parameter currently corresponding to the preview picture when the brightness of the face area is at the brightness target value.
When the brightness of the face area is at the brightness target value, the face is clear and bright in the preview picture, and then the current exposure parameter is determined as the current corresponding target exposure parameter of the preview picture.
Step 203, acquiring the exposure value in the target exposure parameter, and taking the exposure value as a preview exposure value.
In this embodiment, the exposure value in the target exposure parameter currently corresponding to the preview screen may be the preview exposure value, for example, EV 0.
In the embodiment of the application, when the brightness of the face area in the preview picture is not at the brightness target value, the exposure parameter can be adjusted to enable the brightness of the face area to be at the brightness target value, so that the face area is clearer and brighter in the preview picture, and the exposure value corresponding to the preview picture when the brightness of the face area is at the brightness target value is used as the preview exposure value.
In practical application, when the first exposure compensation value for improving the brightness of the background dark area is determined according to the brightness of the face area and the global brightness, the first exposure compensation value can be determined according to the ratio of the brightness of the face area to the global brightness and the sensitivity. Fig. 3 is a schematic flow chart of another human image processing method according to an embodiment of the present application.
As shown in fig. 3, the determining a first exposure compensation value for increasing the brightness of the background dark area according to the brightness of the face area and the global brightness includes:
step 301, calculating the ratio of the brightness of the face region to the global brightness.
After the brightness of the face region and the global brightness are obtained, the ratio of the brightness of the face region to the global brightness can be calculated. The larger the ratio is, the larger the difference between the brightness of the background dark area and the brightness of the face area is; the smaller the ratio, the smaller the difference between the brightness of the background dark area and the brightness of the face area.
For example, if the ratio is greater than 2, the face may be considered to be in a forward scene; if the ratio is smaller than 1 and larger than 0, the face can be considered to be in a backlight scene.
Step 302, determining a first exposure compensation value for increasing the brightness of the background dark area according to a preset sensitivity range and a preset ratio.
Since the light sensitivity affects the exposure, in order to reduce the noise of the shot image and ensure the balance between the definition and the noise, when the first exposure parameter is determined according to the ratio of the brightness of the human face area to the global brightness, the range of the light sensitivity can be considered, and the first exposure compensation value for improving the brightness of the background dark area can be determined jointly according to the preset light sensitivity range and the ratio of the brightness of the human face area to the global brightness.
The larger the ratio of the brightness of the face area to the global brightness is, the larger the difference between the brightness of the background dark area and the brightness of the face area is, and the larger the exposure compensation value for improving the brightness of the background dark area is, so that the ratio and the exposure compensation value are in a positive correlation relationship. Based on this, as a possible implementation manner, the ratio of the brightness of the current face area to the global brightness, and the corresponding first exposure compensation value, may be determined based on the positive correlation between the exposure compensation value and the ratio in the preset sensitivity range.
That is to say, in a certain sensitivity range, when the brightness of the face area is determined to be the brightness target value according to the positive correlation between the exposure compensation value and the ratio, the exposure compensation value corresponding to the ratio of the brightness target value to the global brightness and used for improving the brightness of the background dark area is defined in the certain sensitivity range, so that the balance between the definition and the noise is ensured.
In the embodiment of the application, the relation between the brightness of the face region and the global brightness is quantized, the accuracy of the second exposure compensation value can be improved, the second exposure compensation value is determined by combining the sensitivity range, and the balance between the definition and the noise can be ensured.
In actual shooting, a shooting picture may contain moving objects, such as moving passers-by, and shooting is performed when the exposure compensation amount is relatively large, and the moving objects may cause noise to an image, thereby affecting shooting quality. In order to reduce the influence of noise, in this embodiment, when generating a portrait for a night scene using the first image, the second image, and the third image, noise reduction processing may be performed on the first image and the second image, and then synthesis may be performed. Fig. 4 is a schematic flow chart of another human image processing method according to an embodiment of the present application, which is described below with reference to fig. 4.
As shown in fig. 4, the above-mentioned generating the person image from the first image, the second image and the third image includes:
step 401, performing noise reduction processing on the first image and the second image, and combining the first image and the second image after the noise reduction processing.
In this embodiment, time domain noise reduction may be performed on the first image and the second image, specifically, when performing noise reduction processing on the first image, a plurality of images in the first image may be aligned in rows, and then pixel points corresponding to a moving object are determined and adjusted to reduce noise; the same method can be used for the second image to perform noise reduction processing.
After the noise reduction processing is performed on the first image and the second image, the first image and the second image may be synthesized.
In order to further reduce the influence of noise, in the present embodiment, the number of first images and the number of second images may be the same to synthesize the same number of first images and second images. For example, a first image at N preview exposure values and a second image at N first exposure compensation values are taken, and after exposure processing is performed, the N first images and the N second images after noise reduction processing may be combined.
Step 402, the first image and the second image after being combined and the third image are combined to obtain a person image.
After the first image and the second image are combined, the combined first image and second image can be used to be combined with a third image to obtain a person image.
According to the person image processing method, the first image and the second image are subjected to noise reduction processing, and the three images are subjected to synthesis processing after the noise reduction processing, so that the shooting effect of the person image in the night scene can be further improved.
In order to implement the above embodiments, the present application further provides a human image processing apparatus. Fig. 5 is a schematic structural diagram of a human image processing apparatus according to an embodiment of the present application.
As shown in fig. 5, the personal image processing apparatus includes: a first determination module 510, a global brightness acquisition module 520, a second determination module 530, a third determination module 540, a photographing module 550, and an image generation module 560.
The first determining module 510 is configured to determine, when a human face is detected in the preview screen, a preview exposure value corresponding to the preview screen when the brightness of the human face area is at a brightness target value.
The global brightness obtaining module 520 is configured to obtain the global brightness of the preview picture.
The second determining module 530 is configured to determine a first exposure compensation value for increasing the brightness of the background dark area according to the brightness of the face area and the global brightness.
The third determining module 540 is used for determining a second exposure compensation value for reducing the brightness of the overexposed region.
The shooting module 550 is configured to continuously shoot according to the preview exposure value, the first exposure compensation value, and the second exposure compensation value to obtain multiple frames of images, where the multiple frames of images include a first image exposed by using the preview exposure value, a second image exposed by using the first exposure compensation value, and a third image exposed by using the second exposure compensation value.
And an image generating module 560 for generating a person image from the first image, the second image and the third image.
In a possible implementation manner of the embodiment of the present application, the first determining module 510 is further configured to:
adjusting exposure parameters corresponding to the preview picture according to the brightness of the face area so as to enable the brightness of the face area to be at a brightness target value;
determining a target exposure parameter corresponding to the preview picture when the brightness of the face area is at a brightness target value;
and acquiring an exposure value in the target exposure parameter, and taking the exposure value as a preview exposure value.
In a possible implementation manner of the embodiment of the present application, the second determining module 530 is specifically configured to:
calculating the ratio of the brightness of the face area to the global brightness;
and determining a first exposure compensation value for improving the brightness of the background dark area according to the preset sensitivity range and the ratio.
In a possible implementation manner of the embodiment of the present application, the second determining module 530 is specifically configured to:
and determining a first exposure compensation value for improving the brightness of the background dark area according to the ratio based on the positive correlation between the exposure compensation value and the ratio in the preset sensitivity range.
In a possible implementation manner of the embodiment of the present application, the third determining module 540 is specifically configured to:
when the triggering operation aiming at the photographing control is detected, pre-exposure of multiple frames with different brightness is carried out on the current picture;
determining the dynamic range of the current scene in the pre-exposure process;
and determining a second exposure compensation value for reducing the brightness of the overexposed area according to the dynamic range of the current scene.
In a possible implementation manner of the embodiment of the present application, the third determining module 540 is specifically configured to:
when the triggering operation aiming at the photographing control is detected, the brightness of the current scene is obtained;
and according to the brightness of the current scene, determining a second exposure compensation value for reducing the brightness of the overexposed area from a pre-established relation table of the brightness and the exposure compensation value.
In a possible implementation manner of the embodiment of the present application, the image generating module 560 is specifically configured to:
carrying out noise reduction processing on a first image and a second image, and synthesizing the first image and the second image after the noise reduction processing;
and synthesizing the synthesized first image, the synthesized second image and the third image to obtain a person image.
It should be noted that the explanation of the embodiment of the human image processing method is also applicable to the human image processing apparatus of the embodiment, and therefore, the explanation is not repeated herein.
According to the character image processing method, the preview exposure value corresponding to the preview image when the brightness of the face area in the preview image is at the brightness target value is utilized to respectively determine the first exposure compensation value used for improving the brightness of the background dark area and the second exposure compensation value used for reducing the brightness of the overexposure area, continuous shooting is respectively carried out according to the preview exposure value, the first exposure compensation value and the second exposure compensation value to obtain the multi-frame image, the character image is generated according to the first image, the second image and the third image, and therefore the multi-frame images under the three exposure compensation values are synthesized to obtain the character image. In the whole shooting process, the first exposure compensation value for improving the brightness of a background dark area and the second exposure compensation value for reducing the brightness of an overexposure area are respectively determined by utilizing the preview exposure value, so that the condition that a person image is clear and bright in shooting under a night scene or a scene with weak light brightness can be ensured, the background can be clearly seen, and the shooting effect of the person image under the scenes is improved due to the fact that bright areas such as lamplight and advertising boards cannot be overexposed images in the background.
In order to implement the above embodiments, an electronic device is further provided in the embodiments of the present application. Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
As shown in fig. 6, the electronic apparatus includes: a memory 610, a processor 620 and a computer program stored in the memory 610 and operable on the processor 620, wherein the processor 620 executes the program to implement the human image processing method according to the above embodiment.
In order to implement the above embodiments, the present application also proposes a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the person image processing method as described in the above embodiments.
In the description of the present specification, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (11)

1. A method for processing a human image, comprising the steps of:
when the human face exists in the preview picture, determining a preview exposure value corresponding to the preview picture when the brightness of the human face area is at a brightness target value;
acquiring the global brightness of the preview picture, and determining a first exposure compensation value for improving the brightness of a background dark area according to the brightness of the face area and the global brightness;
when the triggering operation aiming at the photographing control is detected, pre-exposure of multiple frames with different brightness is carried out on the current picture;
determining the dynamic range of the current scene in the pre-exposure process;
determining a second exposure compensation value for reducing the brightness of an overexposure area according to the dynamic range of the current scene;
continuously shooting according to the preview exposure value, the first exposure compensation value and the second exposure compensation value respectively to obtain multi-frame images, wherein the multi-frame images comprise a first image exposed by the preview exposure value, a second image exposed by the first exposure compensation value and a third image exposed by the second exposure compensation value;
and generating a person image according to the first image, the second image and the third image.
2. The method of claim 1, wherein the determining the preview exposure value corresponding to the preview screen when the brightness of the face area is at the brightness target value comprises:
adjusting the exposure parameters corresponding to the preview picture according to the brightness of the face area so as to enable the brightness of the face area to be at the brightness target value;
determining a target exposure parameter corresponding to the preview picture when the brightness of the face area is at the brightness target value;
and acquiring an exposure value in the target exposure parameter, and taking the exposure value as the preview exposure value.
3. The method of claim 1, wherein determining a first exposure compensation value to increase the brightness of a background dark area according to the brightness of the face area and the global brightness comprises:
calculating the ratio of the brightness of the face area to the global brightness;
and determining a first exposure compensation value for improving the brightness of the background dark area according to a preset sensitivity range and the ratio.
4. The method of claim 3, wherein determining the first exposure compensation value to increase the brightness of the background dark area according to the predetermined sensitivity range and the ratio comprises:
and determining a first exposure compensation value for improving the brightness of the background dark area according to the ratio based on the positive correlation between the exposure compensation value and the ratio in a preset sensitivity range.
5. The method of claim 1, wherein determining the second exposure compensation value to reduce the brightness of the overexposed region comprises:
when the triggering operation aiming at the photographing control is detected, the brightness of the current scene is obtained;
and determining a second exposure compensation value for reducing the brightness of the overexposed area from a pre-established relation table of the brightness and the exposure compensation value according to the brightness of the current scene.
6. The method of any of claims 1 to 5, wherein generating the image of the person from the first image, the second image, and the third image comprises:
denoising the first image and the second image, and synthesizing the first image and the second image subjected to denoising;
and synthesizing the synthesized first image, the synthesized second image and the third image to obtain a character image.
7. A personal image processing apparatus, comprising:
the device comprises a first determining module, a second determining module and a control module, wherein the first determining module is used for determining a preview exposure value corresponding to a preview picture when the brightness of a face area is at a brightness target value when the face is detected to exist in the preview picture;
the global brightness acquisition module is used for acquiring the global brightness of the preview picture;
the second determining module is used for determining a first exposure compensation value for improving the brightness of a background dark area according to the brightness of the face area and the global brightness;
the third determining module is used for carrying out multi-frame pre-exposure with different brightness on the current picture when the triggering operation aiming at the photographing control is detected; determining the dynamic range of the current scene in the pre-exposure process; determining a second exposure compensation value for reducing the brightness of an overexposure area according to the dynamic range of the current scene;
the shooting module is used for continuously shooting according to the preview exposure value, the first exposure compensation value and the second exposure compensation value to obtain multi-frame images, wherein the multi-frame images comprise a first image which is exposed by adopting the preview exposure value, a second image which is exposed by adopting the first exposure compensation value and a third image which is exposed by adopting the second exposure compensation value;
and the image generation module is used for generating a person image according to the first image, the second image and the third image.
8. The apparatus of claim 7, wherein the second determining module is specifically configured to:
calculating the ratio of the brightness of the face area to the global brightness;
and determining a first exposure compensation value for improving the brightness of the background dark area according to a preset sensitivity range and the ratio.
9. The apparatus of claim 7, wherein the third determination module is specifically configured to:
when the triggering operation aiming at the photographing control is detected, the brightness of the current scene is obtained;
and determining a second exposure compensation value for reducing the brightness of the overexposed area from a pre-established relation table of the brightness and the exposure compensation value according to the brightness of the current scene.
10. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the human image processing method as claimed in any one of claims 1 to 6 when executing the program.
11. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the personal image processing method according to any one of claims 1 to 6.
CN201910120026.2A 2019-02-18 2019-02-18 Method and device for processing person image Active CN109862282B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910120026.2A CN109862282B (en) 2019-02-18 2019-02-18 Method and device for processing person image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910120026.2A CN109862282B (en) 2019-02-18 2019-02-18 Method and device for processing person image

Publications (2)

Publication Number Publication Date
CN109862282A CN109862282A (en) 2019-06-07
CN109862282B true CN109862282B (en) 2021-04-30

Family

ID=66898194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910120026.2A Active CN109862282B (en) 2019-02-18 2019-02-18 Method and device for processing person image

Country Status (1)

Country Link
CN (1) CN109862282B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110415407A (en) * 2019-07-24 2019-11-05 厦门立林科技有限公司 A kind of intelligent entrance guard control method and device and equipment based on high definition recognition of face
CN110443766B (en) * 2019-08-06 2022-05-31 厦门美图之家科技有限公司 Image processing method and device, electronic equipment and readable storage medium
CN110691199A (en) * 2019-10-10 2020-01-14 厦门美图之家科技有限公司 Face automatic exposure method and device, shooting equipment and storage medium
CN112989866B (en) * 2019-12-02 2024-04-09 浙江宇视科技有限公司 Object recognition method, device, electronic equipment and readable storage medium
CN113099101B (en) * 2019-12-23 2023-03-24 杭州宇泛智能科技有限公司 Camera shooting parameter adjusting method and device and electronic equipment
CN111507358B (en) * 2020-04-01 2023-05-16 浙江大华技术股份有限公司 Face image processing method, device, equipment and medium
CN111586308B (en) * 2020-04-10 2022-03-29 北京迈格威科技有限公司 Image processing method and device and electronic equipment
CN111654640B (en) * 2020-05-27 2021-11-23 维沃移动通信有限公司 Exposure adjusting method and device and electronic equipment
CN112804461A (en) * 2021-02-01 2021-05-14 深圳瑞为智能科技有限公司 Method for automatically adjusting AE target brightness
CN113099124A (en) * 2021-04-07 2021-07-09 中煤科工集团重庆研究院有限公司 Method for detecting displacement field of video monitoring area
CN114095666B (en) * 2021-08-12 2023-09-22 荣耀终端有限公司 Photographing method, electronic device, and computer-readable storage medium
CN114615439B (en) * 2022-03-08 2024-03-05 北京有竹居网络技术有限公司 Exposure statistical method, device, electronic equipment and medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100632B (en) * 2014-05-13 2018-07-27 北京展讯高科通信技术有限公司 The method of adjustment and device of imaging device automatic exposure, imaging device
JP6343200B2 (en) * 2014-07-31 2018-06-13 キヤノン株式会社 Imaging apparatus, control method therefor, and program
CN106454140B (en) * 2015-08-06 2019-06-25 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN107690804B (en) * 2015-10-28 2020-08-25 华为技术有限公司 Image processing method and user terminal
CN107197170A (en) * 2017-07-14 2017-09-22 维沃移动通信有限公司 A kind of exposal control method and mobile terminal
CN107580184B (en) * 2017-10-31 2019-11-19 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN108616689B (en) * 2018-04-12 2020-10-02 Oppo广东移动通信有限公司 Portrait-based high dynamic range image acquisition method, device and equipment
CN109068067B (en) * 2018-08-22 2020-06-12 Oppo广东移动通信有限公司 Exposure control method and device and electronic equipment

Also Published As

Publication number Publication date
CN109862282A (en) 2019-06-07

Similar Documents

Publication Publication Date Title
CN109862282B (en) Method and device for processing person image
CN110445988B (en) Image processing method, image processing device, storage medium and electronic equipment
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
Battiato et al. Exposure correction for imaging devices: an overview
JP4675851B2 (en) Method for adaptively determining camera settings according to scene and camera configured to adaptively determine camera settings according to scene
JP4772612B2 (en) Method and system for generating enhanced output images
CN109194882B (en) Image processing method, image processing device, electronic equipment and storage medium
US8724921B2 (en) Method of capturing high dynamic range images with objects in the scene
CN110599433B (en) Double-exposure image fusion method based on dynamic scene
US8264574B2 (en) Electronic image capture with reduced noise
CN110033418B (en) Image processing method, image processing device, storage medium and electronic equipment
KR101662846B1 (en) Apparatus and method for generating bokeh in out-of-focus shooting
US20160005362A1 (en) Determination Of Optical Condition And Adjustment Of Display
CN110620873B (en) Device imaging method and device, storage medium and electronic device
JP2007035028A (en) Producing method for high dynamic range image, and production system for high dynamic range output image
JP2014155001A (en) Image processing apparatus and image processing method
CN110047060B (en) Image processing method, image processing device, storage medium and electronic equipment
CN110740266B (en) Image frame selection method and device, storage medium and electronic equipment
CN110677557B (en) Image processing method, image processing device, storage medium and electronic equipment
US8090253B2 (en) Photographing control method and apparatus using strobe
CN111526299B (en) High dynamic range image synthesis method and electronic equipment
JP2014179920A (en) Imaging apparatus, control method thereof, program, and storage medium
CN110891145B (en) Method for obtaining image by photographing and electronic equipment
CN108337448B (en) High dynamic range image acquisition method and device, terminal equipment and storage medium
Guthier et al. A real-time system for capturing hdr videos

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