CN109167921B - Shooting method, shooting device, shooting terminal and storage medium - Google Patents

Shooting method, shooting device, shooting terminal and storage medium Download PDF

Info

Publication number
CN109167921B
CN109167921B CN201811215135.4A CN201811215135A CN109167921B CN 109167921 B CN109167921 B CN 109167921B CN 201811215135 A CN201811215135 A CN 201811215135A CN 109167921 B CN109167921 B CN 109167921B
Authority
CN
China
Prior art keywords
image
target
color information
face
template
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
CN201811215135.4A
Other languages
Chinese (zh)
Other versions
CN109167921A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201811215135.4A priority Critical patent/CN109167921B/en
Publication of CN109167921A publication Critical patent/CN109167921A/en
Application granted granted Critical
Publication of CN109167921B publication Critical patent/CN109167921B/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/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • 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/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The disclosure relates to a shooting method, a shooting device, a shooting terminal and a shooting storage medium. The method comprises the following steps: when the current environment of backlight shooting is determined, determining a target template image; the face brightness of the target face in the target template image is greater than a brightness threshold value; and after a shooting instruction is input by a user, generating a shot image according to the current preview image, wherein the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image. The method and the device can increase the face brightness of the target face in the shot image obtained in the backlight shooting environment, avoid the problem that the face is darker in the shot image obtained in the backlight shooting process, and improve the shooting effect.

Description

Shooting method, shooting device, shooting terminal and storage medium
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a shooting method, an apparatus, a terminal, and a storage medium.
Background
Shooting is the most common and important function in terminals such as mobile phones or tablet computers.
In the related art, when shooting is performed using a terminal, a backlight shooting may occur both indoors and outdoors. When a person photo is shot in a backlight mode, the face of the shot photo is often too dark, and the background of the shot photo is too bright, so that the face of the shot photo cannot be clearly seen.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a photographing method, apparatus, terminal, and storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a photographing method including:
when the current environment of backlight shooting is determined, determining a target template image; the face brightness of the target face in the target template image is greater than a brightness threshold value;
and after a shooting instruction is input by a user, generating a shot image according to the current preview image, wherein the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image.
Optionally, the method further includes:
replacing the color information of each region of the target face in the current acquired image corresponding to the current preview image with the color information of the corresponding region of the target face in the target template image to obtain the current preview image;
generating a photographed image from the current preview image, including: and saving the current preview image as the shot image.
Optionally, the generating the captured image according to the current preview image includes:
and replacing the color information of each region of the target face in the current preview image with the color information of the corresponding region of the target face in the target template image to obtain a shot image.
Optionally, the target template image includes a first template image and a second template image;
replacing the color information of each region of the target face in the current acquired image with the color information of the corresponding region of the target face in the target template image, wherein the replacing process comprises the following steps:
replacing the color information of a first area of a target face in a current acquired image with the first color information of a corresponding area of the target face in a first template image;
correcting second color information of a second region of the target face in a second template image, wherein the contrast difference between the corrected second color information and the first color information is smaller than or equal to a difference threshold value;
and replacing the color information of the second area of the target face in the current acquired image with the corrected second color information.
Optionally, the method further includes:
and saving the shot image as a template image in a template library according to a template instruction input by a user, wherein the template instruction is used for indicating the shot image as the template image.
Optionally, the determining the target template image includes:
and selecting a target template image from the template library according to the face angle of the target face in the current preview image, wherein the face angle of the target face in the target template image is consistent with the face angle of the target face in the current preview image.
According to a second aspect of the embodiments of the present disclosure, there is provided a photographing apparatus including:
a determination module configured to determine a target template image when it is determined that it is currently in a backlight shooting environment; the face brightness of the target face in the target template image is greater than a brightness threshold value;
and the generating module is configured to generate a shot image according to the current preview image after a shooting instruction is input by a user, wherein the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image.
Optionally, the apparatus further comprises: the replacing module is configured to replace color information of each region of the target face in the current acquired image corresponding to the current preview image with color information of a corresponding region of the target face in the target template image to obtain the current preview image;
the generation module comprises a first generation submodule; a first generation sub-module configured to save the current preview image as a captured image.
Optionally, the generating module includes a second generating submodule; and the second generation submodule is configured to replace the color information of each region of the target face in the current preview image with the color information of the corresponding region of the target face in the target template image to obtain a shot image.
Optionally, the target template image includes a first template image and a second template image;
a replacement module comprising: the system comprises a first replacement submodule, a modification submodule and a second replacement submodule;
the first replacement submodule is configured to replace the color information of a first area of the target face in the current acquired image with the first color information of a corresponding area of the target face in the first template image;
the correction submodule is configured to correct second color information of a second area of the target face in the second template image, and the contrast difference between the corrected second color information and the first color information is smaller than or equal to a difference threshold value;
and the second replacement submodule is configured to replace the color information of the second area of the target face in the current acquired image with the corrected second color information.
Optionally, the apparatus further comprises: a template module;
and the template module is configured to store the shot image as a template image in a template library according to a template instruction input by a user, wherein the template instruction is used for indicating that the shot image is used as the template image.
Optionally, the determining module includes a determining submodule; and the determining submodule is configured to select a target template image from the template library according to the face angle of the target face in the current preview image, wherein the face angle of the target face in the target template image is consistent with the face angle of the target face in the current preview image.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal, including:
a processor and a memory for storing computer instructions; the processor executes the computer instructions to perform the method of any of the first aspect above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of a terminal, enable the terminal to perform the method of any one of the first aspect described above.
According to the shooting method, the shooting device, the terminal and the storage medium, when the situation that the target template image is located in the backlight shooting environment at present is determined, after a shooting instruction is input by a user, a shot image is generated according to the current preview image, the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image, and the brightness of the target face in the target template image is larger than the brightness threshold, so that the face brightness of the target face in the shot image obtained in the backlight shooting environment can be increased, the problem that the face in the shot image obtained in the backlight shooting environment is darker is solved, and the shooting effect is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a block diagram illustrating a photographing method according to an exemplary embodiment;
fig. 2 is a block diagram illustrating a photographing method according to another exemplary embodiment;
fig. 3 is a block diagram illustrating a photographing method according to still another exemplary embodiment;
FIG. 4 is a block diagram of a camera shown in accordance with an exemplary embodiment;
FIG. 5 is a block diagram of a camera shown in accordance with another exemplary embodiment;
FIG. 6 is a block diagram of a camera shown in accordance with yet another exemplary embodiment;
fig. 7 is a block diagram illustrating a photographing apparatus according to still another exemplary embodiment;
fig. 8 is a block diagram illustrating a photographing apparatus according to still another exemplary embodiment;
fig. 9 is a block diagram illustrating a photographing apparatus according to still another exemplary embodiment;
FIG. 10 is a block diagram illustrating a terminal in accordance with yet another exemplary embodiment;
fig. 11 is a block diagram illustrating a terminal 800 according to yet another example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a block diagram illustrating a photographing method according to an exemplary embodiment. The main executing body of the shooting method provided by the embodiment can be a terminal, such as a mobile phone, a tablet computer, a camera, and the like. As shown in fig. 1, the method of the present embodiment may include the following steps:
in step 101, when the target template image is determined to be in a backlight shooting environment currently, determining a target template image; the face brightness of the target face in the target template image is greater than the brightness threshold.
In this step, the present disclosure is not limited to a specific manner of determining that the imaging apparatus is in the backlight shooting environment. Alternatively, the backlight shooting environment may be determined by the intensity of the light obtained from the camera, for example, when the intensity of the light obtained from the camera exceeds an intensity threshold, the backlight shooting environment may be determined; alternatively, it may be determined that the image is in the backlight shooting environment by the light-dark contrast of the face and the background in the current preview image, for example, when the light-dark contrast of the face and the background in the current preview image exceeds a contrast threshold, it may be determined that the image is in the backlight shooting environment.
Alternatively, the target face in the target template image may be determined by a face recognition technique. The target face may be a face to be photographed, and the face to be photographed may be determined by a face in the current preview image. The face brightness of the target face in the target template image being greater than the brightness threshold may indicate that the target face in the target template image is not too dark, for example, the target template image may be a photograph taken in a non-backlit shooting environment.
In step 102, after the user inputs a shooting instruction, a shot image is generated according to the current preview image, and the color information of each region of the target face in the shot image is determined according to the color information of the corresponding region of the target face in the target template image.
In this step, the target face in the current preview image or the shot image may be determined by a face recognition technique. The shooting instruction may specifically be an instruction indicating that the user needs to save the current preview image as the shot image. The shot image is generated according to the current preview image, and the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image.
The shot image obtained by the shooting method in the related technology has the problem of darker face because the shot image is currently in a backlight shooting environment, wherein the face brightness of the target face in the shot image can be increased by determining the color information of each area of the target face in the shot image according to the color information of the corresponding area of the target face in the target template image, and the face brightness of the target face in the target template image is greater than a brightness threshold value, so that the problem of darker face in the shot image obtained in backlight shooting is avoided.
It should be noted that, for the region division of the target face, the disclosure may not be limited. Alternatively, the target face may be divided into a forehead region, a nose region, a mouth region, an eye region, an ear region, a chin region, a cheek region, a face region, an eyebrow region, and the like, according to the position of the five sense organs; or, the target face may be divided into different regions according to a preset shape with a preset size; alternatively, each sensory organ in the five sense organs may be located in one region, and the regions other than the region where the five sense organs are located may be further divided according to a preset shape with a preset size. The predetermined shape may be a regular shape such as a rectangle or a square. The larger the preset size is, the larger the granularity is, and the smaller the preset size is, the smaller the granularity is.
The region of the target face in the shot image may specifically be a region corresponding to the same position of the face of the target person in the target template image, and it should be noted that the target face in the shot image and the target face in the target template image are the same person, and the person is the target person. For example, the nose region of the target face in the target template image is a corresponding region of the nose region of the target face in the captured image. For another example, the forehead area of the target face in the target template image is a corresponding area of the forehead area of the target face in the captured image.
Alternatively, the color information may be, for example, color information represented by three primary colors of Red (Red, R) Green (Green, G) Blue (Blue, B).
According to the shooting method provided by the embodiment, when the target template image is determined to be in the backlight shooting environment, after a shooting instruction is input by a user, the shot image is generated according to the current preview image, the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image, and the face brightness of the target face in the target template image is greater than the brightness threshold, so that the face brightness of the target face in the shot image obtained in the backlight shooting environment can be increased, the problem that the face in the shot image obtained in the backlight shooting environment is dark is avoided, and the shooting effect is improved.
Fig. 2 is a block diagram illustrating a photographing method according to another exemplary embodiment. Referring to fig. 2, the method provided in this embodiment mainly describes an alternative implementation manner of generating a captured image according to a current preview image on the basis of the method shown in fig. 1. As shown in fig. 2, the forehead method of the present embodiment may include:
in step 201, when the target template image is determined to be in a backlight shooting environment currently, determining a target template image; the face brightness of the target face in the target template image is greater than the brightness threshold.
In this step, optionally, the target template image may be a template image in a template library, and the template library may be updated according to a user requirement, that is, one image is added as a template image to the template library, or an existing template image in the template library is removed from the template library.
Optionally, the determining the target template image specifically may include: and randomly selecting and determining a target template image from all template images of which the face brightness of the target face is greater than a brightness threshold value in the template library.
Optionally, because the brightness of different regions of the face may be different at different face angles, in order to further improve the shooting effect, determining the target template image may specifically include: and selecting a target template image from the template library according to the face angle of the target face in the current preview image, wherein the face angle of the target face in the target template image is consistent with the face angle of the target face in the current preview image. Here, the face angles may be the same, or the difference between the face angles is smaller than or equal to a preset difference.
It should be noted that the number of target template images may be one or more. When there are a plurality of target face regions, color information of the regions of the target face of the plurality of target template images may be superimposed on the captured image.
In step 202, the color information of each region of the target face in the current captured image corresponding to the current preview image is replaced with the color information of the corresponding region of the target face in the target template image, so as to obtain the current preview image.
In this step, the currently acquired image may specifically be an image acquired by a camera, and after the currently acquired image is processed, a currently previewed image may be obtained, and color information of each region of the target face in the currently previewed image is determined according to color information of a corresponding region of the target face in the target template image. Specifically, the color information of each region of the target face in the currently acquired image may be replaced with the color information of the corresponding region of the target face in the target template image, so as to obtain the current preview image. That is, the color information of each region of the target face in the current preview image is the same as the color information of the corresponding region of the target face in the target template image.
It should be noted that, the color information of the other regions except the region where the target face is located in the current preview image may be the same as or different from the color of the corresponding region in the target template image, and this disclosure does not limit this.
Considering that the target face in the template image may not be complete, the target face can be obtained after combining a plurality of template images. Therefore, in order to avoid the problem that a shot image obtained by only one target template image is not real enough to further improve the shooting effect, optionally, the target template image includes a first template image and a second template image; correspondingly, step 202 may specifically include: replacing the color information of a first area of a target face in a current acquired image with the first color information of a corresponding area of the target face in a first template image; correcting second color information of a second region of the target face in a second template image, wherein the contrast difference between the corrected second color information and the first color information is smaller than or equal to a difference threshold value; and replacing the color information of the second area of the target face in the current acquired image with the corrected second color information.
It should be noted that, because the contrast difference between different regions of the face in the captured image is not too large when the image is captured in the non-backlighted environment, here, the second color information of the second region of the target face in the second template image is corrected, so that the contrast difference between the corrected second color information and the first color information is smaller than or equal to the difference threshold, and the problem of poor capturing effect caused by the large contrast difference between the color information of the first region and the second color information of the second region in the current preview image can be avoided. Alternatively, the difference threshold may be related to a region, for example, the difference threshold of the nose tip region corresponding to the alar region may be greater than the difference threshold of the nose tip region corresponding to the forehead region.
The color information of each region of the target face in the current acquired image corresponding to the current preview image is replaced by the color information of the corresponding region of the target face in the target template image to obtain the current preview image, so that the face in the preview image presented to the user in the backlight environment is the face with improved brightness, and the effect of the preview image seen by the user is the effect of the shot image saved after the user inputs the shooting instruction, thereby improving the user experience.
In step 203, after the user inputs a photographing instruction, the current preview image is saved as a photographed image.
Optionally, after step 203, the following step 204 may be further included.
In step 204, the captured image is saved as a template image in a template library according to a template instruction input by the user, wherein the template instruction is used for instructing the captured image to be used as the template image.
In this step, the template command may be, for example, a command to store the captured image in a directory corresponding to the template library, or may be, for example, a command to score the capturing effect of the captured image to exceed a score threshold. Here, by saving the captured image as a template image in the template library according to a template instruction input by the user, the user can update the template image in the template library.
In the shooting method provided by this embodiment, the color information of each region of the target face in the current acquired image corresponding to the current preview image is replaced with the color information of the corresponding region of the target face in the target template image to obtain the current preview image, and after the user inputs a shooting instruction, the current preview image is stored as the shot image, so that the face in the preview image presented to the user in a backlight environment is the face with improved brightness, and the effect of the preview image seen by the user is the effect of the shot image stored after the user inputs the shooting instruction, thereby improving the user experience.
Fig. 3 is a block diagram illustrating a photographing method according to still another exemplary embodiment. Referring to fig. 3, the method provided in this embodiment mainly describes another alternative implementation of generating a captured image from a current preview image on the basis of the method shown in fig. 1. As shown in fig. 3, the method of this embodiment may include:
in step 301, when it is determined that the target template image is currently in a backlight shooting environment, determining a target template image; the face brightness of the target face in the target template image is greater than the brightness threshold.
It should be noted that step 301 is similar to step 201, and is not described herein again.
In step 302, after the user inputs a shooting instruction, the color information of each region of the target face in the current preview image is replaced with the color information of the corresponding region of the target face in the target template image, so as to obtain a shot image.
It should be noted that the specific manner of obtaining the photographed image is similar to the specific manner of obtaining the current preview image by replacing the color information of each region of the target face in the current acquired image with the color information of the corresponding region of the target face in the target template image, and is not described herein again.
Optionally, after step 302, the following step 303 may be further included.
In step 303, the captured image is saved as a template image in a template library according to a template instruction input by the user, where the template instruction is used to instruct the captured image to be the template image.
It should be noted that step 303 is similar to step 204, and is not described herein again.
In the shooting method provided by the embodiment, when it is determined that the current shooting environment is in the backlight shooting environment, the target template image is determined, after the user inputs a shooting instruction, the color information of each region of the target face in the current preview image is replaced by the color information of the corresponding region of the target face in the target template image, so that the shot image is obtained, the color information of each region of the target face in the shot image is determined according to the color information of the corresponding region of the target face in the target template image, and the face brightness of the target face in the target template image is greater than the brightness threshold, so that the face brightness of the target face in the shot image obtained in the backlight shooting environment can be increased, the problem that the face in the shot image obtained in the backlight shooting environment is dark is avoided, and the shooting effect is improved.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 4 is a block diagram illustrating a photographing apparatus according to an exemplary embodiment. The apparatus may be implemented as part or all of the terminal by software, hardware or a combination of both. Referring to fig. 4, the apparatus includes: a determination module 401 and a generation module 402. Wherein,
a determination module 401 configured to determine a target template image when it is determined that it is currently in a backlight shooting environment; the face brightness of the target face in the target template image is greater than a brightness threshold value;
and the generating module 402 is configured to generate a shot image according to the current preview image after a shooting instruction is input by a user, wherein the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image.
In summary, the photographing apparatus provided in the embodiment of the disclosure determines the target template image by the determining module when it is determined that the target template image is currently in the backlight photographing environment, and after the user inputs a photographing instruction, generating a shot image according to the current preview image, wherein the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image, so that the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image, the face brightness of the target face in the target template image is larger than the brightness threshold, so that the face brightness of the target face in the shot image obtained in the backlight shooting environment can be increased, the problem that the face in the shot image obtained in the backlight shooting process is darker is avoided, and the shooting effect is improved.
Fig. 5 is a block diagram illustrating a photographing apparatus according to another exemplary embodiment. Referring to fig. 5, the apparatus is based on the block diagram shown in fig. 4, and optionally, the apparatus may further include: a replacing module 403, configured to replace color information of each region of the target face in the current acquired image corresponding to the current preview image with color information of a corresponding region of the target face in the target template image, so as to obtain a current preview image;
the generating module 402 includes a first generating submodule 4021; a first generation sub module 4021 configured to save the current preview image as a captured image.
To sum up, in the photographing device provided in the embodiment of the present disclosure, the color information of each region of the target face in the currently acquired image corresponding to the currently previewed image is replaced by the color information of the corresponding region of the target face in the target template image through the replacement module to obtain the currently previewed image, and after the user inputs the photographing instruction, the first generation sub-module stores the currently previewed image as the photographed image, so that the face in the previewed image presented to the user in the backlight environment is the face with the brightness increased, and the effect of the previewed image seen by the user is the effect of the photographed image stored after the user inputs the photographing instruction, thereby improving the user experience.
Fig. 6 is a block diagram illustrating a photographing apparatus according to still another exemplary embodiment. Referring to fig. 6, on the basis of the block diagram shown in fig. 4, optionally, the generating module includes 402 a second generating submodule 4022; the second generation sub-module 4022 is configured to replace the color information of each region of the target face in the current preview image with the color information of the corresponding region of the target face in the target template image, so as to obtain a captured image.
To sum up, in the photographing device provided in the embodiment of the present disclosure, the color information of each region of the target face in the current preview image is replaced by the color information of the corresponding region of the target face in the target template image through the second generation sub-module to obtain the photographed image, so that the color information of each region of the target face in the photographed image is determined according to the color information of the corresponding region of the target face in the target template image, and the face brightness of the target face in the target template image is greater than the brightness threshold, thereby increasing the face brightness of the target face in the photographed image obtained in the backlight photographing environment, avoiding the problem of dark face in the photographed image obtained in the backlight photographing, and improving the photographing effect.
Fig. 7 is a block diagram illustrating a photographing apparatus according to still another exemplary embodiment. Referring to fig. 7, the apparatus is based on the block diagram shown in fig. 5, and optionally, the target template image includes a first template image and a second template image; a replacement module 403 comprising: a first replacement submodule 4031, a correction submodule 4032 and a second replacement submodule 4033;
a first replacement sub-module 4031 configured to replace the color information of the first region of the target face in the currently acquired image with the first color information of the corresponding region of the target face in the first template image;
a modification submodule 4032 configured to modify second color information of a second region of the target face in the second template image, wherein a contrast difference between the modified second color information and the first color information is smaller than or equal to a difference threshold;
and the second replacing sub-module 4033 is configured to replace the color information of the second area of the target face in the currently acquired image with the corrected second color information.
To sum up, in the photographing device provided in the embodiment of the present disclosure, the first replacement sub-module replaces the color information of the first region of the target face in the currently acquired image with the first color information of the corresponding region of the target face in the first template image, the modification sub-module modifies the second color information of the second region of the target face in the second template image, the contrast difference between the modified second color information and the first color information is less than or equal to the difference threshold, and the second replacement sub-module replaces the color information of the second region of the target face in the currently acquired image with the modified second color information, so that the problem that the photographed image obtained by only using one target template image is not true enough can be avoided, and the photographing effect is further improved.
Fig. 8 is a block diagram illustrating a photographing apparatus according to still another exemplary embodiment. Referring to fig. 8, the apparatus is based on the block diagram shown in fig. 4, and optionally, the apparatus further includes: a template module 404;
and a template module 404 configured to save the captured image as a template image in a template library according to a template instruction input by a user, wherein the template instruction is used for instructing the captured image as the template image.
To sum up, according to the shooting device provided by the embodiment of the present disclosure, the template module stores the shot image as the template image in the template library according to the template instruction input by the user, so that the user can update the template image in the template library.
Fig. 9 is a block diagram illustrating a photographing apparatus according to still another exemplary embodiment. Referring to fig. 9, the apparatus is based on the block diagram shown in fig. 4, and optionally, the determining module 401 includes: a determination sub-module 4011; the determining submodule 4011 is configured to select a target template image from the template library according to a face angle of a target face in the current preview image, where the face angle of the target face in the target template image is consistent with the face angle of the target face in the current preview image.
To sum up, in the shooting device provided in the embodiment of the present disclosure, the determination sub-module selects the target template image from the template library according to the face angle of the target face in the current preview image, and the face angle of the target face in the target template image is consistent with the face angle of the target face in the current preview image, so that the shooting effect can be further improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 10 is a block diagram illustrating a terminal according to still another exemplary embodiment, and as shown in fig. 10, the terminal may include: a processor 1001 and a memory 1002 for storing computer instructions.
The processor 1001 executes the computer instructions to execute the following method:
when the current environment of backlight shooting is determined, determining a target template image; the face brightness of the target face in the target template image is greater than a brightness threshold value;
and after a shooting instruction is input by a user, generating a shot image according to the current preview image, wherein the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image.
Optionally, the method further includes:
replacing the color information of each region of the target face in the current acquired image corresponding to the current preview image with the color information of the corresponding region of the target face in the target template image to obtain the current preview image;
generating a photographed image from the current preview image, including: and saving the current preview image as the shot image.
Optionally, the generating the captured image according to the current preview image includes:
and replacing the color information of each region of the target face in the current preview image with the color information of the corresponding region of the target face in the target template image to obtain a shot image.
Optionally, the target template image includes a first template image and a second template image;
replacing the color information of each region of the target face in the current acquired image with the color information of the corresponding region of the target face in the target template image, wherein the replacing process comprises the following steps:
replacing the color information of a first area of a target face in a current acquired image with the first color information of a corresponding area of the target face in a first template image;
correcting second color information of a second region of the target face in a second template image, wherein the contrast difference between the corrected second color information and the first color information is smaller than or equal to a difference threshold value;
and replacing the color information of the second area of the target face in the current acquired image with the corrected second color information.
Optionally, the method further includes:
and saving the shot image as a template image in a template library according to a template instruction input by a user, wherein the template instruction is used for indicating the shot image as the template image.
Optionally, the determining the target template image includes:
and selecting a target template image from the template library according to the face angle of the target face in the current preview image, wherein the face angle of the target face in the target template image is consistent with the face angle of the target face in the current preview image.
Fig. 11 is a block diagram illustrating a terminal 800 according to yet another example embodiment. For example, the terminal 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 11, terminal 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the terminal 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on terminal 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of terminal 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal 800.
The multimedia component 808 includes a screen providing an output interface between the terminal 800 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the terminal 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for terminal 800. For example, sensor assembly 814 can detect the open/closed state of device 800, the relative positioning of components, such as a display and keypad of terminal 800, sensor assembly 814 can also detect a change in position of terminal 800 or a component of terminal 800, the presence or absence of user contact with terminal 800, orientation or acceleration/deceleration of terminal 800, and a change in temperature of terminal 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 816 is configured to facilitate communications between terminal 800 and other devices in a wired or wireless manner. The terminal 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the terminal 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer-readable storage medium in which instructions, when executed by a processor of a terminal, enable the terminal to perform a photographing method, the method comprising:
when the current environment of backlight shooting is determined, determining a target template image; the face brightness of the target face in the target template image is greater than a brightness threshold value;
and after a shooting instruction is input by a user, generating a shot image according to the current preview image, wherein the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image.
Optionally, the method further includes:
replacing the color information of each region of the target face in the current acquired image corresponding to the current preview image with the color information of the corresponding region of the target face in the target template image to obtain the current preview image;
generating a photographed image from the current preview image, including: and saving the current preview image as the shot image.
Optionally, the generating the captured image according to the current preview image includes:
and replacing the color information of each region of the target face in the current preview image with the color information of the corresponding region of the target face in the target template image to obtain a shot image.
Optionally, the target template image includes a first template image and a second template image;
replacing the color information of each region of the target face in the current acquired image with the color information of the corresponding region of the target face in the target template image, wherein the replacing process comprises the following steps:
replacing the color information of a first area of a target face in a current acquired image with the first color information of a corresponding area of the target face in a first template image;
correcting second color information of a second region of the target face in a second template image, wherein the contrast difference between the corrected second color information and the first color information is smaller than or equal to a difference threshold value;
and replacing the color information of the second area of the target face in the current acquired image with the corrected second color information.
Optionally, the method further includes:
and saving the shot image as a template image in a template library according to a template instruction input by a user, wherein the template instruction is used for indicating the shot image as the template image.
Optionally, the determining the target template image includes:
and selecting a target template image from the template library according to the face angle of the target face in the current preview image, wherein the face angle of the target face in the target template image is consistent with the face angle of the target face in the current preview image.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A photographing method, characterized by comprising:
when the current environment of backlight shooting is determined, determining a target template image; the face brightness of the target face in the target template image is greater than a brightness threshold value;
after a user inputs a shooting instruction, generating a shot image according to a current preview image, wherein the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image;
replacing the color information of each region of the target face in the current acquired image corresponding to the current preview image with the color information of the corresponding region of the target face in the target template image to obtain the current preview image;
the generating of the shot image according to the current preview image includes: saving the current preview image as the shot image;
the target template image comprises a first template image and a second template image;
replacing the color information of each region of the target face in the current acquired image with the color information of the corresponding region of the target face in the target template image, including:
replacing the color information of the first region of the target face in the current acquired image with the first color information of the corresponding region of the target face in the first template image;
modifying second color information of a second region of the target face in the second template image, wherein the contrast difference between the modified second color information and the first color information is smaller than or equal to a difference threshold value;
and replacing the color information of the second area of the target face in the current acquired image with the modified second color information.
2. The method of claim 1, wherein generating the captured image from the current preview image comprises:
and replacing the color information of each region of the target face in the current preview image with the color information of the corresponding region of the target face in the target template image to obtain the shot image.
3. The method of claim 1, further comprising:
and storing the shot image as a template image in a template library according to a template instruction input by a user, wherein the template instruction is used for indicating that the shot image is used as the template image.
4. The method of any of claims 1-3, wherein the determining a target template image comprises:
and selecting the target template image from a template library according to the face angle of the target face in the current preview image, wherein the face angle of the target face in the target template image is consistent with the face angle of the target face in the current preview image.
5. A camera, comprising:
a determination module configured to determine a target template image when it is determined that it is currently in a backlight shooting environment; the face brightness of the target face in the target template image is greater than a brightness threshold value;
the generation module is configured to generate a shot image according to a current preview image after a shooting instruction is input by a user, wherein the color information of each area of the target face in the shot image is determined according to the color information of the corresponding area of the target face in the target template image;
the device further comprises: a replacing module configured to replace color information of each region of the target face in a current acquired image corresponding to the current preview image with color information of a corresponding region of the target face in the target template image, so as to obtain the current preview image;
the generation module comprises a first generation submodule; the first generation sub-module is configured to save the current preview image as the captured image;
the target template image comprises a first template image and a second template image;
the replacement module includes: the system comprises a first replacement submodule, a modification submodule and a second replacement submodule;
the first replacement sub-module is configured to replace color information of a first region of the target face in the currently acquired image with first color information of a corresponding region of the target face in the first template image;
the correction submodule is configured to correct second color information of a second region of the target face in the second template image, and a contrast difference between the corrected second color information and the first color information is smaller than or equal to a difference threshold;
the second replacement submodule is configured to replace the color information of the second region of the target face in the currently acquired image with the corrected second color information.
6. The apparatus of claim 5, wherein the generation module comprises a second generation submodule; the second generation submodule is configured to replace color information of each region of the target face in the current preview image with color information of a corresponding region of the target face in the target template image, so as to obtain the shot image.
7. The apparatus of claim 5, further comprising: a template module;
the template module is configured to store the shot image as a template image in a template library according to a template instruction input by a user, wherein the template instruction is used for indicating that the shot image is used as the template image.
8. The apparatus of any of claims 5-7, wherein the means for determining comprises: determining a submodule;
the determining submodule is configured to select the target template image from a template library according to the face angle of the target face in the current preview image, wherein the face angle of the target face in the target template image is consistent with the face angle of the target face in the current preview image.
9. A terminal, comprising:
a processor and a memory for storing computer instructions; the processor executes the computer instructions to perform the method of any of claims 1-4.
10. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of a terminal, enable the terminal to perform the method of any of claims 1-4.
CN201811215135.4A 2018-10-18 2018-10-18 Shooting method, shooting device, shooting terminal and storage medium Active CN109167921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811215135.4A CN109167921B (en) 2018-10-18 2018-10-18 Shooting method, shooting device, shooting terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811215135.4A CN109167921B (en) 2018-10-18 2018-10-18 Shooting method, shooting device, shooting terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109167921A CN109167921A (en) 2019-01-08
CN109167921B true CN109167921B (en) 2020-10-20

Family

ID=64878651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811215135.4A Active CN109167921B (en) 2018-10-18 2018-10-18 Shooting method, shooting device, shooting terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109167921B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113766125B (en) * 2019-09-29 2022-10-25 Oppo广东移动通信有限公司 Focusing method and device, electronic equipment and computer readable storage medium
CN112367470B (en) * 2020-10-29 2022-03-08 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN113542598B (en) * 2021-07-02 2023-11-21 维沃移动通信(杭州)有限公司 Image processing method, device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1522048A (en) * 2003-02-12 2004-08-18 ŷķ����ʽ���� Image editing apparatus
CN101383912A (en) * 2008-10-23 2009-03-11 上海交通大学 Color intelligent automatic regulating device for television video taking
WO2016024668A1 (en) * 2014-08-11 2016-02-18 엘지전자 주식회사 Mobile terminal and control method therefor
CN107038715A (en) * 2017-03-21 2017-08-11 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN108600640A (en) * 2018-07-03 2018-09-28 京东方科技集团股份有限公司 Gesture identification, color white balance adjustment and exposure regulating method and device in image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7751599B2 (en) * 2006-08-09 2010-07-06 Arcsoft, Inc. Method for driving virtual facial expressions by automatically detecting facial expressions of a face image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1522048A (en) * 2003-02-12 2004-08-18 ŷķ����ʽ���� Image editing apparatus
CN101383912A (en) * 2008-10-23 2009-03-11 上海交通大学 Color intelligent automatic regulating device for television video taking
WO2016024668A1 (en) * 2014-08-11 2016-02-18 엘지전자 주식회사 Mobile terminal and control method therefor
CN107038715A (en) * 2017-03-21 2017-08-11 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN108600640A (en) * 2018-07-03 2018-09-28 京东方科技集团股份有限公司 Gesture identification, color white balance adjustment and exposure regulating method and device in image

Also Published As

Publication number Publication date
CN109167921A (en) 2019-01-08

Similar Documents

Publication Publication Date Title
CN108986199B (en) Virtual model processing method and device, electronic equipment and storage medium
CN109784255B (en) Neural network training method and device and recognition method and device
CN106572299B (en) Camera opening method and device
US20180286097A1 (en) Method and camera device for processing image
CN106408603B (en) Shooting method and device
CN106331504B (en) Shooting method and device
WO2016011747A1 (en) Skin color adjustment method and device
CN107341777B (en) Picture processing method and device
CN108154466B (en) Image processing method and device
CN107015648B (en) Picture processing method and device
US11310443B2 (en) Video processing method, apparatus and storage medium
CN109167921B (en) Shooting method, shooting device, shooting terminal and storage medium
CN108122195B (en) Picture processing method and device
EP3944607A1 (en) Image acquisition module, electronic device, image acquisition method and storage medium
CN111078170B (en) Display control method, display control device, and computer-readable storage medium
CN112188074B (en) Image processing method and device, electronic equipment and readable storage medium
CN112217990A (en) Task scheduling method, task scheduling device, and storage medium
CN111953903A (en) Shooting method, shooting device, electronic equipment and storage medium
US11252341B2 (en) Method and device for shooting image, and storage medium
CN107241535B (en) Flash lamp adjusting device and terminal equipment
CN111835941B (en) Image generation method and device, electronic equipment and computer readable storage medium
CN115914721A (en) Live broadcast picture processing method and device, electronic equipment and storage medium
CN114338956B (en) Image processing method, image processing apparatus, and storage medium
CN105447829B (en) Image processing method and device
CN107122356B (en) Method and device for displaying face value 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