[go: up one dir, main page]

WO2019051683A1 - Fill light photography method, mobile terminal and computer-readable storage medium - Google Patents

Fill light photography method, mobile terminal and computer-readable storage medium Download PDF

Info

Publication number
WO2019051683A1
WO2019051683A1 PCT/CN2017/101627 CN2017101627W WO2019051683A1 WO 2019051683 A1 WO2019051683 A1 WO 2019051683A1 CN 2017101627 W CN2017101627 W CN 2017101627W WO 2019051683 A1 WO2019051683 A1 WO 2019051683A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
mobile terminal
fill
screen
light
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.)
Ceased
Application number
PCT/CN2017/101627
Other languages
French (fr)
Chinese (zh)
Inventor
傅茜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Transsion Communication Co Ltd
Original Assignee
Shenzhen Transsion Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Transsion Communication Co Ltd filed Critical Shenzhen Transsion Communication Co Ltd
Priority to CN201780096693.0A priority Critical patent/CN111480333B/en
Priority to PCT/CN2017/101627 priority patent/WO2019051683A1/en
Publication of WO2019051683A1 publication Critical patent/WO2019051683A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene

Definitions

  • the present invention relates to the field of photographing technology, and in particular, to a fill light photographing method, a mobile terminal, and a computer readable storage medium.
  • the main object of the present invention is to provide a fill light photographing method, a mobile terminal and a computer readable storage medium, aiming at solving the technical problem of insufficient brightness of the front camera of the terminal.
  • the present invention provides a fill light photographing method, which is applied to a mobile terminal, the mobile terminal includes a front camera and a front flash, and the fill light photographing method includes the following steps:
  • the first image and the second image are combined to obtain a target image.
  • the step of controlling the brightness of the screen of the mobile terminal to fill light when receiving the pre-photographing instruction, and acquiring the first image by the front camera when the screen is filled with light comprises:
  • the first image is acquired by the front camera when the screen is filled.
  • the step of synthesizing the first image and the second image to obtain a target image includes:
  • the face image and the background image are superimposed to obtain a target image.
  • the step of acquiring the face image in the first image includes:
  • the method of filling light photography further includes:
  • the current fill mode is prompted by voice.
  • the method further includes:
  • the image adjustment instruction when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.
  • the present invention further provides a mobile terminal, the mobile terminal includes a front camera and a front flash; the mobile terminal further includes a processor, a memory, and is stored in the memory and can be
  • the fill photo taking program executed by the processor when the fill photo taking program is executed by the processor, implements the following steps:
  • the first image and the second image are combined to obtain a target image.
  • the step of controlling the brightness of the screen of the mobile terminal to fill light when receiving the pre-photographing instruction, and acquiring the first image by the front camera when the screen is filled with light comprises:
  • the first image is acquired by the front camera when the screen is filled.
  • the step of synthesizing the first image and the second image to obtain a target image includes:
  • the face image and the background image are superimposed to obtain a target image.
  • the step of acquiring the face image in the first image includes:
  • the current fill mode is prompted by voice.
  • the image adjustment instruction when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.
  • the present invention further provides a computer readable storage medium, wherein the computer readable storage medium stores a photo fill light program, wherein when the photo fill light program is executed by a processor, the following steps are implemented. :
  • the first image and the second image are combined to obtain a target image.
  • the step of controlling the brightness of the screen of the mobile terminal to fill light when receiving the pre-photographing instruction, and acquiring the first image by the front camera when the screen is filled with light comprises:
  • the first image is acquired by the front camera when the screen is filled.
  • the step of synthesizing the first image and the second image to obtain a target image includes:
  • the face image and the background image are superimposed to obtain a target image.
  • the step of acquiring the face image in the first image includes:
  • the current fill mode is prompted by voice.
  • the image adjustment instruction when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.
  • the present invention controls the screen brightness of the mobile terminal to fill light, and acquires the first image through the front camera when the screen is filled; and turns on the front flash to fill the light. And acquiring a second image through the front camera when the flash is filled; synthesizing the first image and the second image to obtain a target image.
  • the present invention respectively performs shooting by means of screen fill light and flash fill light, and combines the photos obtained by the two fill modes, extracts and clears the clear parts in each photo, thereby making the portrait And the surrounding environment can be clearly presented on the photo, which improves the brightness and clarity of the photo; the operation method is simple, and the camera performance and photo quality are improved, and the cost is not increased.
  • FIG. 1 is a schematic structural diagram of hardware of a mobile terminal according to an embodiment of the present invention.
  • FIG. 2 is a schematic flow chart of a first embodiment of a method for photographing a fill light according to the present invention
  • FIG. 3 is a schematic diagram of the refinement process of controlling the brightness of the screen of the mobile terminal to perform fill light when receiving the pre-photographing instruction, and acquiring the first image through the front camera when the screen is filled. ;
  • FIG. 4 is a schematic flow chart of a second embodiment of a photo-filling method according to the present invention.
  • the main idea of the solution of the embodiment of the present invention is: when receiving the photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled; and turning on the front flash to fill the light. And acquiring a second image through the front camera when the flash is filled; synthesizing the first image and the second image to obtain a target image.
  • the fill light photographing method according to the embodiment of the present invention is mainly applied to a mobile terminal, and the mobile terminal can be implemented in various manners.
  • the mobile terminal may include a mobile terminal such as a mobile phone, a tablet, a palmtop, a portable media player, a wearable device, a smart bracelet, and the like.
  • a mobile phone will be taken as an example of a mobile terminal, and those skilled in the art will understand that the configuration according to an embodiment of the present invention can be applied to other types of movements in addition to components particularly for mobile purposes. terminal.
  • FIG. 1 is a schematic structural diagram of hardware of a mobile terminal involved in an embodiment of the present invention.
  • the mobile terminal may include a processor 1001 (for example, a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is configured to implement connection communication between the components; the user interface 1003 may include a fingerprint collector (fingerprint sensor), a display (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally Including standard wired interface, wireless interface (such as WI-FI interface); memory 1005 can be high-speed RAM memory or stable memory (non-volatile Alternatively, the memory 1005 may alternatively be a storage device independent of the processor 1001 described above.
  • the user interface 1003 may include a fingerprint collector (fingerprint sensor), a display (Display), an input unit such as a keyboard (Keyboard);
  • the network interface 1004 may optionally Including standard wired interface, wireless interface (such as WI-FI interface); memory 1005 can be high-speed RAM memory or stable memory (non-volatile Alternatively, the memory 1005 may alternatively be a storage device independent of the processor 1001 described above.
  • the mobile terminal may further include a camera (front camera), a flash (front flash), and RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • sensors such as light sensors, motion sensors, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display according to the brightness of the ambient light, and the proximity sensor can close the display and/or according to the distance between the photosensitive device and the reference object. Backlighting.
  • the gravity acceleration sensor can detect the magnitude of acceleration in each direction (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. This will not be repeated here.
  • FIG. 1 does not constitute a limitation of the mobile terminal, and may include more or less components than those illustrated, or combine some components or different components. Arrangement.
  • the memory 1005 as a computer readable storage medium of FIG. 1 can include an operating system, a network communication module, and a fill photo taking program.
  • the network communication module is mainly used to connect to a server for data communication with the server; and the processor 1001 can call the fill photo taking program stored in the memory 1005 and perform the following operations:
  • the first image and the second image are combined to obtain a target image.
  • the step of controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled includes:
  • the first image is acquired by the front camera when the screen is filled.
  • the step of synthesizing the first image and the second image to obtain a target image includes:
  • the face image and the background image are superimposed to obtain a target image.
  • the step of acquiring the face image in the first image includes:
  • processor 1001 may also call the fill photo taking program stored in the memory 1005 and perform the following operations:
  • the current fill mode is prompted by voice.
  • processor 1001 may also call the fill photo taking program stored in the memory 1005 and perform the following operations:
  • the image adjustment instruction when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.
  • the invention provides a method of filling light photographing.
  • FIG. 2 is a schematic flow chart of a first embodiment of a photo-filling photographing method according to the present invention.
  • the fill light photographing method is applied to a mobile terminal, and the mobile terminal includes a front camera and a front flash, and the fill light photographing method includes the following steps:
  • Step S10 when receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled;
  • the two have their own defects, the uniformity of the flash fill light is poor, although the face and part of the background can be illuminated, but it is easy to cause the background is clear but the face is too exposed, or the face is too dark and the background is too dark Screen fill light can evenly illuminate the face, but the fill light range is limited to the face of the face, other backgrounds are often difficult to illuminate. Therefore, these photographing methods have certain defects.
  • the present embodiment proposes a fill light photographing method to solve the technical problem that the front camera of the mobile terminal lacks the brightness of the photograph.
  • the fill light photographing method in this embodiment is applied to a mobile terminal, and the mobile terminal in the following description will take a mobile phone as an example for description.
  • the camera is provided with a camera on the same side of the screen, and the camera on the same side of the screen is called a front camera in order to distinguish it from the camera on the back of the mobile phone.
  • the front camera in this embodiment may be a fixed camera fixed on the screen side of the mobile phone, or may be a rotatable camera whose current position is on the screen side of the mobile phone.
  • a front flash is also provided for filling light during front camera shooting.
  • the user when the user needs to use the front camera of the mobile phone to perform self-photographing, the user can open the camera interface in the mobile phone and click the front camera option to trigger the front camera command; of course, the user can also pass the text input mode. Input the command text or command code corresponding to the front camera command to trigger the pre-shooting command; of course, the front camera command can be triggered by voice input.
  • the mobile phone receives the pre-shooting command, it will activate the camera function of the front camera and enter the front shooting mode.
  • the mobile phone When entering the front shooting mode, the mobile phone first controls the brightness of the screen to increase the display brightness of the screen, thereby filling the current shooting.
  • the light emitted from the screen of the mobile phone can be regarded as a surface light source; in the state where the surface light source is illuminated, the face in front of the front camera of the mobile phone will be evenly illuminated, achieving the effect of soft light; At the same time, since the brightness of the screen is lowered relative to the flash, it is not irritating to the human eye, and the user can take a picture with a more natural expression on the screen fill light. While the screen is being filled, the mobile phone screen will also display the image currently captured by the front camera. The user can adjust his movements, facial expressions or the shooting angle of the mobile phone according to the content displayed on the screen; the user is determined to shoot.
  • the camera button can be a virtual button in the virtual keyboard of the mobile phone screen, or a physical button such as a volume button or a Home button
  • the mobile phone is supplemented by the screen according to the user's operation.
  • the first image is acquired by shooting through the front camera.
  • the user can also use the voice to control the mobile phone to take pictures, or set a delayed photo.
  • Step S20 the front flash is turned on to fill light, and the second image is acquired by the front camera when the flash is filled;
  • step S10 and step S20 are performed in a state in which the screen fill light and the flash fill light are respectively performed in a short time; first, the first image is captured by the screen fill light, and then the flash is used to fill the light.
  • the method completes the shooting of the second image to obtain the first image and the second image; of course, in the actual process, the second image may be captured by the flash fill light, and then the screen fill light is completed.
  • the photographing of an image and the order of the filling modes do not constitute a limitation of the technical solution of the embodiment.
  • Step S30 synthesizing the first image and the second image to obtain a target image.
  • the first image is captured in the screen fill state, and the screen fill light can be regarded as the surface light source; in the state where the surface light source is illuminated, the face in front of the front camera of the mobile phone will It will be evenly illuminated, achieving a soft light effect for clear imaging, and because the brightness of the screen is reduced relative to the flash, it will not irritate the human eye, and the user can fill the screen with a more natural expression.
  • the range of fill light is limited to the face and the surrounding area.
  • Other backgrounds are usually difficult to illuminate, so the face in the first image can be clearly imaged except near the screen of the mobile phone.
  • the brightness of other backgrounds is darker.
  • the second image is taken in the flash fill state, and at this time, the flash fill light is similar to the point light source, and its center brightness is high, which can illuminate the face and the background, but the flash brightness is high. It is also easy to cause overexposure, resulting in a clear background in the second image but the image of the face and surrounding is not clear.
  • the first image and the second image may be combined, and the clear portions of the first image and the second image are respectively taken, thereby obtaining an overall clear target image.
  • the mobile phone acquires the face image in the first image, acquires the background image in the second image, and superimposes the face image and the background image to obtain the target image.
  • the face image in the first image is clear
  • the background image in the second image is also clear, so the superimposed composite target image is also clear overall.
  • the obtaining of the face image in the first image may be implemented by: when obtaining the first image and the second image, the mobile phone first performs face detection on the first image, and identifies the first image.
  • Face area, in which face detection generally has the following methods:
  • 1 reference template method first design one or several standard face templates, then calculate the degree of matching between the sample collected by the test and the standard template, and judge whether there is a human face through the threshold;
  • the method of the face rule is to extract these features to generate corresponding rules to determine whether the test sample contains a human face;
  • This method adopts the method of artificial neural network in pattern recognition, that is, the classifier is generated by learning the face image sample set and the non-image sample set;
  • This method treats all face image sets as one face image subspace and determines whether there is a face image based on the distance between the detected sample and its projection in the subspace.
  • the specific face recognition process may adopt the above-mentioned face detection technology, and of course, other existing face detection technologies may be used, which are not specifically limited in this embodiment.
  • the handset Upon identifying the face region in the first image, the handset will perform edge detection and cutting on the face region to distinguish the face region in the first image from other regions in the first image.
  • the mobile phone When the distinction is completed, the mobile phone will transparently process other areas than the face area in the first image. When the transparency processing is completed, all the areas except the face area in the original first image are transparent, thereby obtaining a face image.
  • the second image is subjected to face detection to identify a face region in the second image; when the face region in the second image is recognized, the region other than the face region is in the second image a background area; at this time, edge detection and cutting are also performed on the face area to distinguish the face area of the second image from the background area; when the distinction is completed, the face area in the second image is transparently processed; When the transparency processing is completed, the face area in the original second image is transparent, thereby obtaining a background image without the face area.
  • the face image and the background image are obtained, the face image and the background image are superimposed, that is, the target image is obtained.
  • the background other than the face is mainly photographed to obtain the background image, so the requirement for the face portion is lower, and the brightness of the flash is higher.
  • the flash is flashing, the sudden bright light has a certain stimulation to the human eye. Therefore, when taking the second image, the user can close the eye to take photos, avoiding the flashing of the flash to the human eye.
  • the mobile phone can issue a voice prompt during the whole process of shooting to prompt the current fill mode.
  • the mobile phone when controlling the brightness of the screen to fill the light, can issue a “currently fill light” voice prompt; in the flash fill mode, the mobile phone can issue a “current flash fill light” voice prompt, the user is hearing When the voice prompts, the eyes can be closed to avoid the stimulation of the flash by the flash.
  • the screen brightness of the mobile terminal is controlled to fill light, and the first image is acquired by the front camera when the screen is filled; the front flash is turned on. Filling light, and acquiring a second image through the front camera when the flash is filled; synthesizing the first image and the second image to obtain a target image.
  • the embodiment performs shooting by means of screen fill light and flash fill light, and synthesizes the photos obtained by the two fill modes, extracts and clears the clear parts in each photo, thereby making Both the portrait and the surrounding environment can be clearly presented on the photo, which improves the brightness and clarity of the photo; the operation method is simple, and the camera performance and the photo quality are improved, and the cost is not increased.
  • FIG. 3 is a diagram of controlling the screen brightness of the mobile terminal to fill light when receiving the pre-photographing instruction, and acquiring the first image through the front camera when the screen is filled. Refine the process diagram.
  • step S10 includes:
  • Step S11 when receiving the pre-photographing instruction, acquiring the current ambient light intensity, and controlling the screen brightness of the mobile terminal according to the ambient light intensity to fill light;
  • step S12 the first image is acquired by the front camera when the screen is filled.
  • the mobile phone controls the brightness of the screen according to the current ambient light intensity. Specifically, when receiving the pre-shooting instruction triggered by the user, the mobile phone will activate the camera function of the front camera to enter the front shooting mode; at the same time, the mobile phone will obtain the current ambient light intensity through the photosensitive element, wherein the photosensitive element It can be set separately in the mobile phone, or it can be integrated inside the front camera; when the ambient light intensity is obtained, the ambient light intensity is compared with the preset standard light intensity to determine whether the ambient light intensity is less than the preset standard.
  • the preset standard light intensity is a preset parameter value, which can understand the light intensity value that the front camera can clearly image, and can have different preset standard light intensity for different front cameras; If the light intensity is less than the preset standard light intensity, it indicates that the ambient light intensity is relatively high. At this time, the difference between the preset standard light intensity and the ambient light intensity is calculated, and then the preset screen brightness control is controlled according to the difference. Find the corresponding screen brightness parameter on the parameter table, and increase the screen according to the brightness parameter.
  • the brightness is complemented, wherein the preset screen brightness control parameter table can be understood as a relationship between the light intensity difference and the screen brightness. The table can be used to determine whether the screen brightness should be adjusted in the case of a certain light intensity difference. The screen fills the light best; if the ambient light intensity is greater than or equal to the preset standard light intensity, then the phone will maintain the current screen brightness.
  • the image can be taken while the screen is being filled, and the first image is acquired.
  • FIG. 4 is a schematic flow chart of a second embodiment of a photo-filling photographing method according to the present invention.
  • the method further includes:
  • Step S40 when receiving the image adjustment instruction, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.
  • the mobile phone will display the target image on the screen to facilitate the user to view; if the user thinks that the target image does not meet the requirement,
  • the target image can be manually adjusted twice.
  • the mobile phone can also call the original first image and the second image, and display the target image, the first image and the second image respectively in the same interface for the user to compare and view; the user can also manually use the first image in the first image.
  • the overlapping area is selected in the second image, and then the new target image is re-synthesized.
  • the phone can also support other common image editing operations, such as rotation, cutting, graffiti, and so on.
  • the present invention also provides a mobile terminal.
  • the mobile terminal of the present invention includes a front camera and a front flash; the mobile terminal further includes a processor, a memory, and a fill light photographing program stored on the memory and executable by the processor, the fill light photographing When the program is executed by the processor, the following steps are implemented:
  • the first image and the second image are combined to obtain a target image.
  • the step of controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled includes:
  • the first image is acquired by the front camera when the screen is filled.
  • the step of synthesizing the first image and the second image to obtain a target image includes:
  • the face image and the background image are superimposed to obtain a target image.
  • the step of acquiring the face image in the first image includes:
  • the current fill mode is prompted by voice.
  • the image adjustment instruction when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.
  • the present invention also provides a computer readable storage medium.
  • the computer readable storage medium of the present invention stores a fill photo taking program, wherein when the fill photo taking program is executed by the processor, the following steps are implemented:
  • the first image and the second image are combined to obtain a target image.
  • the step of controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled includes:
  • the first image is acquired by the front camera when the screen is filled.
  • the step of synthesizing the first image and the second image to obtain a target image includes:
  • the face image and the background image are superimposed to obtain a target image.
  • the step of acquiring the face image in the first image includes:
  • the current fill mode is prompted by voice.
  • the image adjustment instruction when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.
  • portions of the technical solution of the present invention that contribute substantially or to the prior art may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Telephone Function (AREA)

Abstract

Disclosed is a fill light photography method. The method comprises: when a front-facing photography instruction is received, controlling the brightness of a screen of the mobile terminal so as to fill in light, and acquiring a first image by means of the front-facing camera when the screen fills in light; turning on the front-facing flash to fill in light, and acquiring a second image by means of the front-facing camera when the flash fills in light; and combining the first image and the second image to obtain a target image. Further disclosed are a mobile terminal and a computer-readable storage medium. The present invention carries out photography by means of a screen filling in light and a flash filling in light, respectively, combines photographs obtained by means of the two means for filling in light, and extracts the clear parts in various photographs and splices and fuses same, thereby making both a portrait and the surrounding environment clearly present in the photographs so as to improve the brightness and definition of the photographs.

Description

补光拍照方法、移动终端及计算机可读存储介质  Filling photo method, mobile terminal and computer readable storage medium

技术领域Technical field

本发明涉及拍照技术领域,尤其涉及一种补光拍照方法、移动终端及计算机可读存储介质。The present invention relates to the field of photographing technology, and in particular, to a fill light photographing method, a mobile terminal, and a computer readable storage medium.

背景技术Background technique

目前,随着移动终端技术的不断发展,市面上的大多数智能手机都配备了前置摄像头,利用前置摄像头进行自拍或者拍摄其它事物也已经成为了主流。利用前置摄像头进行拍照,在周边光线较暗时,拍出的照片会因为光线不足而过暗,从而影响了成像的清晰度。At present, with the continuous development of mobile terminal technology, most smart phones on the market are equipped with front-facing cameras, and self-timer or other things have become mainstream with the front camera. Taking pictures with the front camera, when the surrounding light is dim, the photos taken will be too dark due to insufficient light, which affects the sharpness of the image.

传统的前置摄像头补光拍照方法有两种,一种是闪光灯补光拍照,一种是屏幕补光拍照。但这两者的具有各自的缺陷,闪光灯补光的均匀度较差,虽然可以将人脸和部分背景照亮,但容易造成背景清晰但人脸过曝,或者人脸清晰背景过暗的问题;屏幕补光可以将人脸均匀照亮,但补光范围只限于人脸周围,其他背景通常难以照亮。因此,这些拍照方法都具有缺陷。There are two kinds of traditional front camera fill light photography methods, one is the flash fill light photo, the other is the screen fill light photo. However, the two have their own defects, the uniformity of the flash fill light is poor, although the face and part of the background can be illuminated, but it is easy to cause the background is clear but the face is too exposed, or the face is too dark and the background is too dark Screen fill light can evenly illuminate the face, but the fill light range is limited to the face of the face, other backgrounds are often difficult to illuminate. Therefore, these photographing methods have drawbacks.

发明内容Summary of the invention

本发明的主要目的在于提供一种补光拍照方法、移动终端及计算机可读存储介质,旨在解决终端前置摄像头拍照亮度不足的的技术问题。The main object of the present invention is to provide a fill light photographing method, a mobile terminal and a computer readable storage medium, aiming at solving the technical problem of insufficient brightness of the front camera of the terminal.

为实现上述目的,本发明提供一种补光拍照方法,所述补光拍照方法应用于移动终端,所述移动终端包括前置摄像头和前置闪光灯,所述补光拍照方法包括以下步骤:To achieve the above objective, the present invention provides a fill light photographing method, which is applied to a mobile terminal, the mobile terminal includes a front camera and a front flash, and the fill light photographing method includes the following steps:

在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像;When receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled;

开启所述前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;Turning on the front flash to fill light, and acquiring a second image through the front camera when the flash is filled;

将所述第一图像和第二图像进行合成,获得目标图像。The first image and the second image are combined to obtain a target image.

可选地,所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的步骤包括:Optionally, the step of controlling the brightness of the screen of the mobile terminal to fill light when receiving the pre-photographing instruction, and acquiring the first image by the front camera when the screen is filled with light comprises:

在接收到前置拍照指令时,获取当前的环境光线强度,并根据所述环境光线强度控制所述移动终端的屏幕亮度进行补光;Obtaining a current ambient light intensity when receiving the pre-photographing instruction, and controlling the screen brightness of the mobile terminal to fill light according to the ambient light intensity;

在屏幕补光时通过所述前置摄像头获取第一图像。The first image is acquired by the front camera when the screen is filled.

可选地,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤包括:Optionally, the step of synthesizing the first image and the second image to obtain a target image includes:

获取所述第一图像中的人脸图像,并获取所述第二图像中的背景图像;Obtaining a face image in the first image, and acquiring a background image in the second image;

将所述人脸图像和背景图像进行叠加处理,获得目标图像。The face image and the background image are superimposed to obtain a target image.

可选地,所述获取所述第一图像中的人脸图像的步骤包括:Optionally, the step of acquiring the face image in the first image includes:

对所述第一图像进行人脸检测,识别出所述第一图像中的人脸区域;Performing face detection on the first image to identify a face region in the first image;

对所述人脸区域的边缘进行切割,并将所述第一图像中所述人脸区域以外的区域透明化,得到人脸图像。Cutting an edge of the face region, and transparently defining an area other than the face region in the first image to obtain a face image.

可选地,所述补光拍照方法还包括:Optionally, the method of filling light photography further includes:

以语音的方式提示当前的补光模式。The current fill mode is prompted by voice.

可选地,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤之后,还包括:Optionally, after the step of synthesizing the first image and the second image to obtain a target image, the method further includes:

在接收到图像调整指令时,根据所述图像调整指令调整所述目标图像的图像参数,其中所述图像参数至少包括对比度、饱和度、曝光度中的一种或多种。And when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.

此外,为实现上述目的,本发明还提供一种移动终端,所述移动终端包括前置摄像头和前置闪光灯;所述移动终端还包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的补光拍照程序,所述补光拍照程序被所述处理器执行时,实现以下步骤:In addition, in order to achieve the above object, the present invention further provides a mobile terminal, the mobile terminal includes a front camera and a front flash; the mobile terminal further includes a processor, a memory, and is stored in the memory and can be The fill photo taking program executed by the processor, when the fill photo taking program is executed by the processor, implements the following steps:

在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像;When receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled;

开启所述前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;Turning on the front flash to fill light, and acquiring a second image through the front camera when the flash is filled;

将所述第一图像和第二图像进行合成,获得目标图像。The first image and the second image are combined to obtain a target image.

可选地,所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的步骤包括:Optionally, the step of controlling the brightness of the screen of the mobile terminal to fill light when receiving the pre-photographing instruction, and acquiring the first image by the front camera when the screen is filled with light comprises:

在接收到前置拍照指令时,获取当前的环境光线强度,并根据所述环境光线强度控制所述移动终端的屏幕亮度进行补光;Obtaining a current ambient light intensity when receiving the pre-photographing instruction, and controlling the screen brightness of the mobile terminal to fill light according to the ambient light intensity;

在屏幕补光时通过所述前置摄像头获取第一图像。The first image is acquired by the front camera when the screen is filled.

可选地,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤包括:Optionally, the step of synthesizing the first image and the second image to obtain a target image includes:

获取所述第一图像中的人脸图像,并获取所述第二图像中的背景图像;Obtaining a face image in the first image, and acquiring a background image in the second image;

将所述人脸图像和背景图像进行叠加处理,获得目标图像。The face image and the background image are superimposed to obtain a target image.

可选地,所述获取所述第一图像中的人脸图像的步骤包括:Optionally, the step of acquiring the face image in the first image includes:

对所述第一图像进行人脸检测,识别出所述第一图像中的人脸区域;Performing face detection on the first image to identify a face region in the first image;

对所述人脸区域的边缘进行切割,并将所述第一图像中所述人脸区域以外的区域透明化,得到人脸图像。Cutting an edge of the face region, and transparently defining an area other than the face region in the first image to obtain a face image.

可选地,所述补光拍照程序被所述处理器执行时,还实现以下步骤:Optionally, when the fill photo taking program is executed by the processor, the following steps are further implemented:

以语音的方式提示当前的补光模式。The current fill mode is prompted by voice.

可选地,所述补光拍照程序被所述处理器执行时,还实现以下步骤:Optionally, when the fill photo taking program is executed by the processor, the following steps are further implemented:

在接收到图像调整指令时,根据所述图像调整指令调整所述目标图像的图像参数,其中所述图像参数至少包括对比度、饱和度、曝光度中的一种或多种。And when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.

此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有拍照补光程序,其中所述拍照补光程序被处理器执行时,实现以下步骤:In addition, in order to achieve the above object, the present invention further provides a computer readable storage medium, wherein the computer readable storage medium stores a photo fill light program, wherein when the photo fill light program is executed by a processor, the following steps are implemented. :

在接收到前置拍照指令时,控制移动终端的屏幕亮度进行补光,并在屏幕补光时通过前置摄像头获取第一图像;When receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled;

开启前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;Turning on the front flash to fill the light, and obtaining the second image through the front camera when the flash is filled;

将所述第一图像和第二图像进行合成,获得目标图像。The first image and the second image are combined to obtain a target image.

可选地,所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的步骤包括:Optionally, the step of controlling the brightness of the screen of the mobile terminal to fill light when receiving the pre-photographing instruction, and acquiring the first image by the front camera when the screen is filled with light comprises:

在接收到前置拍照指令时,获取当前的环境光线强度,并根据所述环境光线强度控制所述移动终端的屏幕亮度进行补光;Obtaining a current ambient light intensity when receiving the pre-photographing instruction, and controlling the screen brightness of the mobile terminal to fill light according to the ambient light intensity;

在屏幕补光时通过所述前置摄像头获取第一图像。The first image is acquired by the front camera when the screen is filled.

可选地,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤包括:Optionally, the step of synthesizing the first image and the second image to obtain a target image includes:

获取所述第一图像中的人脸图像,并获取所述第二图像中的背景图像;Obtaining a face image in the first image, and acquiring a background image in the second image;

将所述人脸图像和背景图像进行叠加处理,获得目标图像。The face image and the background image are superimposed to obtain a target image.

可选地,所述获取所述第一图像中的人脸图像的步骤包括:Optionally, the step of acquiring the face image in the first image includes:

对所述第一图像进行人脸检测,识别出所述第一图像中的人脸区域;Performing face detection on the first image to identify a face region in the first image;

对所述人脸区域的边缘进行切割,并将所述第一图像中所述人脸区域以外的区域透明化,得到人脸图像。Cutting an edge of the face region, and transparently defining an area other than the face region in the first image to obtain a face image.

可选地,所述补光拍照程序被所述处理器执行时,还实现以下步骤:Optionally, when the fill photo taking program is executed by the processor, the following steps are further implemented:

以语音的方式提示当前的补光模式。The current fill mode is prompted by voice.

可选地,所述补光拍照程序被所述处理器执行时,还实现以下步骤:Optionally, when the fill photo taking program is executed by the processor, the following steps are further implemented:

在接收到图像调整指令时,根据所述图像调整指令调整所述目标图像的图像参数,其中所述图像参数至少包括对比度、饱和度、曝光度中的一种或多种。And when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.

本发明在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像;开启所述前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;将所述第一图像和第二图像进行合成,获得目标图像。通过以上方式,本发明分别通过屏幕补光和闪光灯补光的方式进行拍摄,并将两种补光方式下获得的照片进行合成,将各照片中的清晰部分提取并进行拼接融合,从而使得人像和四周环境都可以清晰呈现在照片上,从而提高了照片的亮度和清晰度;操作方法简单,在提升摄像性能和照片质量的同时,也未造成成本的上升。When receiving the pre-photographing instruction, the present invention controls the screen brightness of the mobile terminal to fill light, and acquires the first image through the front camera when the screen is filled; and turns on the front flash to fill the light. And acquiring a second image through the front camera when the flash is filled; synthesizing the first image and the second image to obtain a target image. Through the above manner, the present invention respectively performs shooting by means of screen fill light and flash fill light, and combines the photos obtained by the two fill modes, extracts and clears the clear parts in each photo, thereby making the portrait And the surrounding environment can be clearly presented on the photo, which improves the brightness and clarity of the photo; the operation method is simple, and the camera performance and photo quality are improved, and the cost is not increased.

附图说明DRAWINGS

图1是本发明实施例方案涉及的移动终端的硬件结构示意图;1 is a schematic structural diagram of hardware of a mobile terminal according to an embodiment of the present invention;

图2为本发明补光拍照方法第一实施例的流程示意图;2 is a schematic flow chart of a first embodiment of a method for photographing a fill light according to the present invention;

图3为图2中所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的细化流程示意图;FIG. 3 is a schematic diagram of the refinement process of controlling the brightness of the screen of the mobile terminal to perform fill light when receiving the pre-photographing instruction, and acquiring the first image through the front camera when the screen is filled. ;

图4为本发明补光拍照方法第二实施例的流程示意图。FIG. 4 is a schematic flow chart of a second embodiment of a photo-filling method according to the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

本发明实施例方案的主要思路是:在接收到拍照指令时,控制移动终端的屏幕亮度进行补光,并在屏幕补光时通过前置摄像头获取第一图像;开启前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;将所述第一图像和第二图像进行合成,获得目标图像。The main idea of the solution of the embodiment of the present invention is: when receiving the photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled; and turning on the front flash to fill the light. And acquiring a second image through the front camera when the flash is filled; synthesizing the first image and the second image to obtain a target image.

本发明实施例涉及的补光拍照方法主要应用于移动终端,该移动终端可以通过多种方式实现。例如,该移动终端可以包括诸如手机、平板电脑、掌上电脑、便捷式媒体播放器、可穿戴设备、智能手环等移动终端。The fill light photographing method according to the embodiment of the present invention is mainly applied to a mobile terminal, and the mobile terminal can be implemented in various manners. For example, the mobile terminal may include a mobile terminal such as a mobile phone, a tablet, a palmtop, a portable media player, a wearable device, a smart bracelet, and the like.

后续描述中将以手机作为移动终端为例进行说明,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本发明的实施方式的构造也能够应用于其它类型的移动终端。In the following description, a mobile phone will be taken as an example of a mobile terminal, and those skilled in the art will understand that the configuration according to an embodiment of the present invention can be applied to other types of movements in addition to components particularly for mobile purposes. terminal.

参照图1,图1为本发明实施例方案中涉及的移动终端的硬件结构示意图。本发明实施例中,移动终端可以包括处理器1001(例如CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括指纹采集器(指纹传感器)、显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。Referring to FIG. 1, FIG. 1 is a schematic structural diagram of hardware of a mobile terminal involved in an embodiment of the present invention. In the embodiment of the present invention, the mobile terminal may include a processor 1001 (for example, a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is configured to implement connection communication between the components; the user interface 1003 may include a fingerprint collector (fingerprint sensor), a display (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally Including standard wired interface, wireless interface (such as WI-FI interface); memory 1005 can be high-speed RAM memory or stable memory (non-volatile Alternatively, the memory 1005 may alternatively be a storage device independent of the processor 1001 described above.

可选地,该移动终端还可以包括摄像头(前置摄像头)、闪光灯(前置闪光灯)、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示屏的亮度,接近传感器可根据感光设备与参照物的距离,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,该移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Optionally, the mobile terminal may further include a camera (front camera), a flash (front flash), and RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more. Among them, sensors such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display according to the brightness of the ambient light, and the proximity sensor can close the display and/or according to the distance between the photosensitive device and the reference object. Backlighting. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. This will not be repeated here.

本领域技术人员可以理解,图1中示出的移动终端的硬件结构并不构成对移动终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It will be understood by those skilled in the art that the hardware structure of the mobile terminal shown in FIG. 1 does not constitute a limitation of the mobile terminal, and may include more or less components than those illustrated, or combine some components or different components. Arrangement.

继续参照图1,图1中作为一种计算机可读存储介质的存储器1005可以包括操作系统、网络通信模块以及补光拍照程序。With continued reference to FIG. 1, the memory 1005 as a computer readable storage medium of FIG. 1 can include an operating system, a network communication module, and a fill photo taking program.

在图1中,网络通信模块主要用于连接服务器,与服务器进行数据通信;而处理器1001可以调用存储器1005中存储的补光拍照程序,并执行以下操作:In FIG. 1, the network communication module is mainly used to connect to a server for data communication with the server; and the processor 1001 can call the fill photo taking program stored in the memory 1005 and perform the following operations:

在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像;When receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled;

开启所述前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;Turning on the front flash to fill light, and acquiring a second image through the front camera when the flash is filled;

将所述第一图像和第二图像进行合成,获得目标图像。The first image and the second image are combined to obtain a target image.

进一步地,所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的步骤包括:Further, when receiving the pre-photographing instruction, the step of controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled, includes:

在接收到前置拍照指令时,获取当前的环境光线强度,并根据所述环境光线强度控制所述移动终端的屏幕亮度进行补光;Obtaining a current ambient light intensity when receiving the pre-photographing instruction, and controlling the screen brightness of the mobile terminal to fill light according to the ambient light intensity;

在屏幕补光时通过所述前置摄像头获取第一图像。The first image is acquired by the front camera when the screen is filled.

进一步地,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤包括:Further, the step of synthesizing the first image and the second image to obtain a target image includes:

获取所述第一图像中的人脸图像,并获取所述第二图像中的背景图像;Obtaining a face image in the first image, and acquiring a background image in the second image;

将所述人脸图像和背景图像进行叠加处理,获得目标图像。The face image and the background image are superimposed to obtain a target image.

进一步地,所述获取所述第一图像中的人脸图像的步骤包括:Further, the step of acquiring the face image in the first image includes:

对所述第一图像进行人脸检测,识别出所述第一图像中的人脸区域;Performing face detection on the first image to identify a face region in the first image;

对所述人脸区域的边缘进行切割,并将所述第一图像中所述人脸区域以外的区域透明化,得到人脸图像。Cutting an edge of the face region, and transparently defining an area other than the face region in the first image to obtain a face image.

进一步地,处理器1001还可以调用存储器1005中存储的补光拍照程序,并执行以下操作:Further, the processor 1001 may also call the fill photo taking program stored in the memory 1005 and perform the following operations:

以语音的方式提示当前的补光模式。The current fill mode is prompted by voice.

进一步地,处理器1001还可以调用存储器1005中存储的补光拍照程序,并执行以下操作:Further, the processor 1001 may also call the fill photo taking program stored in the memory 1005 and perform the following operations:

在接收到图像调整指令时,根据所述图像调整指令调整所述目标图像的图像参数,其中所述图像参数至少包括对比度、饱和度、曝光度中的一种或多种。And when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.

基于上述移动终端的硬件结构,提出本发明补光拍照方法的各个实施例。Based on the hardware structure of the above mobile terminal, various embodiments of the fill light photographing method of the present invention are proposed.

本发明提供一种补光拍照方法。The invention provides a method of filling light photographing.

参照图2,图2为本发明补光拍照方法第一实施例的流程示意图。Referring to FIG. 2, FIG. 2 is a schematic flow chart of a first embodiment of a photo-filling photographing method according to the present invention.

本实施例中,所述补光拍照方法应用于移动终端,所述移动终端包括前置摄像头和前置闪光灯,所述补光拍照方法包括以下步骤:In this embodiment, the fill light photographing method is applied to a mobile terminal, and the mobile terminal includes a front camera and a front flash, and the fill light photographing method includes the following steps:

步骤S10,在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像;Step S10, when receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled;

目前,市面上的大多数智能手机都配备了前置摄像头,利用前置摄像头进行自拍或者拍摄其它事物也已经成为了主流。利用前置摄像头进行拍照,在周边光线较暗时,拍出的照片会因为光线不足而过暗,从而影响了成像的清晰度。传统的前置摄像头补光拍照方法有两种,一种是闪光灯补光拍照,一种是屏幕补光拍照。但这两者的具有各自的缺陷,闪光灯补光的均匀度较差,虽然可以将人脸和部分背景照亮,但容易造成背景清晰但人脸过曝,或者人脸清晰背景过暗的问题;屏幕补光可以将人脸均匀照亮,但补光范围只限于人脸周围,其它背景通常难以照亮。因此,这些拍照方法都具有一定的缺陷。Currently, most smartphones on the market are equipped with front-facing cameras, and self-portraits or other things with the front camera have become mainstream. Taking pictures with the front camera, when the surrounding light is dim, the photos taken will be too dark due to insufficient light, which affects the sharpness of the image. There are two kinds of traditional front camera fill light photography methods, one is the flash fill light photo, the other is the screen fill light photo. However, the two have their own defects, the uniformity of the flash fill light is poor, although the face and part of the background can be illuminated, but it is easy to cause the background is clear but the face is too exposed, or the face is too dark and the background is too dark Screen fill light can evenly illuminate the face, but the fill light range is limited to the face of the face, other backgrounds are often difficult to illuminate. Therefore, these photographing methods have certain defects.

基于上述问题,本实施例提出一种补光拍照方法,以解决移动终端前置摄像头拍照亮度不足的技术问题。Based on the above problem, the present embodiment proposes a fill light photographing method to solve the technical problem that the front camera of the mobile terminal lacks the brightness of the photograph.

具体的,本实施例中的补光拍照方法应用于移动终端,在后续描述中的移动终端将以手机为例进行说明。该手机的屏幕同侧设置有摄像头,该与屏幕同侧的摄像头为了与手机背面的摄像头进行区分,可称为前置摄像头。值得说明的是,本实施例中的前置摄像头可以是固定在手机屏幕侧的固定摄像头,还可以是当前位置处于手机屏幕侧的可旋转摄像头。进一步地,手机屏幕的同侧除了前置摄像头外,还设置有前置闪光灯,用于在前置摄像拍摄时补光使用。Specifically, the fill light photographing method in this embodiment is applied to a mobile terminal, and the mobile terminal in the following description will take a mobile phone as an example for description. The camera is provided with a camera on the same side of the screen, and the camera on the same side of the screen is called a front camera in order to distinguish it from the camera on the back of the mobile phone. It should be noted that the front camera in this embodiment may be a fixed camera fixed on the screen side of the mobile phone, or may be a rotatable camera whose current position is on the screen side of the mobile phone. Further, on the same side of the screen of the mobile phone, in addition to the front camera, a front flash is also provided for filling light during front camera shooting.

本实施例中,用户在需要使用手机的前置摄像头进行自拍时,可打开手机中的拍照界面,点击前置拍照选项,从而触发前置拍照指令;当然用户也可以通过文字输入的方式,通过输入前置拍照指令对应的指令文字或者指令代码,触发前置拍照指令;当然还可以是通过语音输入的方式触发前置拍照指令。手机在接收到该前置拍照指令时,将会启动前置摄像头的拍照功能,进入前置拍摄模式。在进入前置拍摄模式时,手机首先会对屏幕的亮度进行控制,提高屏幕的显示亮度,从而对当前的拍摄进行补光。此时的手机屏幕的发射出光线,可以看做是面光源发光;在这样的面光源发光的状态下,手机前置摄像头前方的人脸将会被均匀照亮,实现了柔光的效果;同时由于屏幕的亮度相对闪光灯而言亮度降低,不会刺激到人眼,用户可以以更自然的表情在屏幕补光的情况下进行拍照。在屏幕补光的同时,手机屏幕还将显示前置摄像头当前所拍到的图像,用户可根据屏幕所显示的内容调整自己的动作、面部表情或是手机的拍摄角度等;用户在确定进行拍摄时,会在手机上按下拍照键(该拍照键可以是手机屏幕的虚拟键盘中的虚拟按键,也可以是音量键、Home键等实体按键);手机则根据用户的操作在屏幕补光时通过前置摄像头进行拍摄,获取第一图像。当然用户也可以用语音的方式控制手机进行拍照,或是设置延迟拍照等。In this embodiment, when the user needs to use the front camera of the mobile phone to perform self-photographing, the user can open the camera interface in the mobile phone and click the front camera option to trigger the front camera command; of course, the user can also pass the text input mode. Input the command text or command code corresponding to the front camera command to trigger the pre-shooting command; of course, the front camera command can be triggered by voice input. When the mobile phone receives the pre-shooting command, it will activate the camera function of the front camera and enter the front shooting mode. When entering the front shooting mode, the mobile phone first controls the brightness of the screen to increase the display brightness of the screen, thereby filling the current shooting. At this time, the light emitted from the screen of the mobile phone can be regarded as a surface light source; in the state where the surface light source is illuminated, the face in front of the front camera of the mobile phone will be evenly illuminated, achieving the effect of soft light; At the same time, since the brightness of the screen is lowered relative to the flash, it is not irritating to the human eye, and the user can take a picture with a more natural expression on the screen fill light. While the screen is being filled, the mobile phone screen will also display the image currently captured by the front camera. The user can adjust his movements, facial expressions or the shooting angle of the mobile phone according to the content displayed on the screen; the user is determined to shoot. When the photo button is pressed on the mobile phone (the camera button can be a virtual button in the virtual keyboard of the mobile phone screen, or a physical button such as a volume button or a Home button); the mobile phone is supplemented by the screen according to the user's operation. The first image is acquired by shooting through the front camera. Of course, the user can also use the voice to control the mobile phone to take pictures, or set a delayed photo.

步骤S20,开启所述前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;Step S20, the front flash is turned on to fill light, and the second image is acquired by the front camera when the flash is filled;

本实施例中,手机在屏幕补光状态下获取到第一图像时,并未立即停止拍摄。此时手机将会开启前置闪光灯,通过前置闪光灯进行补光;此时闪光灯补光类似于点光源发光,其中心亮度较高,可以将人脸和背景照亮;手机将在闪光灯补光的状态下通过前置摄像头进行拍摄,获取第二图像。也就是说,步骤S10和步骤S20,是在短时间内分别通过屏幕补光和闪光灯补光的状态下进行拍摄;先通过屏幕补光的方式完成第一图像的拍摄,再利用闪光灯补光的方式完成第二图像的拍摄,从而得到第一图像和第二图像;当然,在实际过程中,也可以先通过闪光灯补光的方式完成第二图像的拍摄,再通过屏幕补光的方式完成第一图像的拍摄,补光方式的先后并不构成对本实施例技术方案的限定。In this embodiment, when the mobile phone acquires the first image in the screen fill state, the photographing is not immediately stopped. At this time, the mobile phone will turn on the front flash and fill the light through the front flash; at this time, the flash fill light is similar to the point light source, and its center brightness is high, which can illuminate the face and background; the phone will fill the light in the flash In the state of the camera, the second image is acquired by the front camera. That is to say, step S10 and step S20 are performed in a state in which the screen fill light and the flash fill light are respectively performed in a short time; first, the first image is captured by the screen fill light, and then the flash is used to fill the light. The method completes the shooting of the second image to obtain the first image and the second image; of course, in the actual process, the second image may be captured by the flash fill light, and then the screen fill light is completed. The photographing of an image and the order of the filling modes do not constitute a limitation of the technical solution of the embodiment.

步骤S30,将所述第一图像和第二图像进行合成,获得目标图像。Step S30, synthesizing the first image and the second image to obtain a target image.

本实施例中,第一图像是在屏幕补光状态下拍摄得到的,而屏幕补光可以看做是面光源发光;在这样的面光源发光的状态下,手机前置摄像头前方的人脸将会被均匀照亮,实现了柔光的效果,从而清晰成像,同时由于屏幕的亮度相对闪光灯而言亮度降低,不会刺激到人眼,用户可以以更自然的表情在屏幕补光的情况下进行拍照,但是正由于屏幕补光时的亮度较低,补光的范围只限于人脸部分及周围,其它背景通常难以照亮,因此第一图像中除靠近靠近手机屏幕的人脸能清晰成像外,其它背景的亮度较暗。另一方面,第二图像是在闪光灯补光状态下拍摄得到的,而此时闪光灯补光类似于点光源发光,其中心亮度较高,可以将人脸和背景照亮,但是闪光灯亮度较高也容易造成过曝光,从而导致第二图像中背景清晰但人脸部分及周围的图像不清晰。In this embodiment, the first image is captured in the screen fill state, and the screen fill light can be regarded as the surface light source; in the state where the surface light source is illuminated, the face in front of the front camera of the mobile phone will It will be evenly illuminated, achieving a soft light effect for clear imaging, and because the brightness of the screen is reduced relative to the flash, it will not irritate the human eye, and the user can fill the screen with a more natural expression. Taking pictures, but because the brightness of the screen is low, the range of fill light is limited to the face and the surrounding area. Other backgrounds are usually difficult to illuminate, so the face in the first image can be clearly imaged except near the screen of the mobile phone. In addition, the brightness of other backgrounds is darker. On the other hand, the second image is taken in the flash fill state, and at this time, the flash fill light is similar to the point light source, and its center brightness is high, which can illuminate the face and the background, but the flash brightness is high. It is also easy to cause overexposure, resulting in a clear background in the second image but the image of the face and surrounding is not clear.

根据上述问题,本实施例中可将第一图像和第二图像进行合成,分别取第一图像和第二图像其中清晰的部分,从而获得整体清晰的目标图像。具体的,手机将获取第一图像中的人脸图像,并获取第二图像中的背景图像,并将该人脸图像和背景图像进行叠加合成处理,从而获得目标图像。正如上述分析,第一图像中的人脸图像时清晰的,而第二图像中的背景图像也是清晰的,因此所叠加合成的目标图像整体也是清晰的。According to the above problem, in the embodiment, the first image and the second image may be combined, and the clear portions of the first image and the second image are respectively taken, thereby obtaining an overall clear target image. Specifically, the mobile phone acquires the face image in the first image, acquires the background image in the second image, and superimposes the face image and the background image to obtain the target image. As with the above analysis, the face image in the first image is clear, and the background image in the second image is also clear, so the superimposed composite target image is also clear overall.

进一步地,对于第一图像中人脸图像的获取,可以是这样实现的:手机在获得第一图像和第二图像时,首先会对第一图像进行人脸检测,识别出第一图像中的人脸区域,其中人脸检测一般有下列几种方法:Further, the obtaining of the face image in the first image may be implemented by: when obtaining the first image and the second image, the mobile phone first performs face detection on the first image, and identifies the first image. Face area, in which face detection generally has the following methods:

①参考模板法:首先设计一个或数个标准人脸的模板,然后计算测试采集的样品与标准模板之间的匹配程度,并通过阈值来判断是否存在人脸;1 reference template method: first design one or several standard face templates, then calculate the degree of matching between the sample collected by the test and the standard template, and judge whether there is a human face through the threshold;

②人脸规则法:由于人脸具有一定的结构分布特征,所谓人脸规则的方法即提取这些特征生成相应的规则以判断测试样品是否包含人脸;2 face rule method: Since the face has a certain structural distribution feature, the method of the face rule is to extract these features to generate corresponding rules to determine whether the test sample contains a human face;

③样品学习法:这种方法即采用模式识别中人工神经网络的方法,即通过对面像样品集和非面像样品集的学习产生分类器;3 sample learning method: This method adopts the method of artificial neural network in pattern recognition, that is, the classifier is generated by learning the face image sample set and the non-image sample set;

④肤色模型法:这种方法是依据面貌肤色在色彩空间中分布相对集中的规律来进行检测;4 skin color model method: This method is based on the law that the skin color distribution is relatively concentrated in the color space;

⑤特征子脸法:这种方法是将所有面像集合视为一个面像子空间,并基于检测样品与其在子空间的投影之间的距离判断是否存在面像。5 feature sub-face method: This method treats all face image sets as one face image subspace and determines whether there is a face image based on the distance between the detected sample and its projection in the subspace.

其中具体的人脸识别过程可采用上述的人脸检测技术,当然也可采用其它的现有的人脸检测技术,本实施例不作具体限定。The specific face recognition process may adopt the above-mentioned face detection technology, and of course, other existing face detection technologies may be used, which are not specifically limited in this embodiment.

在识别出第一图像中的人脸区域时,手机将对该人脸区域进行边缘检测和切割,以将第一图像中的人脸区域与第一图像中的其它区域进行区分。在区分完成时,手机将对第一图像中人脸区域以外的其它区域进行透明化处理。在透明化处理完成时,原第一图像中除了人脸区域外,其它区域都是透明的,从而获得了人脸图像。Upon identifying the face region in the first image, the handset will perform edge detection and cutting on the face region to distinguish the face region in the first image from other regions in the first image. When the distinction is completed, the mobile phone will transparently process other areas than the face area in the first image. When the transparency processing is completed, all the areas except the face area in the original first image are transparent, thereby obtaining a face image.

再进一步地,对于第二图像的背景图像获取,可采用与人脸图像获取类似的方法。具体的,对第二图像进行人脸检测,识别出第二图像中的人脸区域;在识别出第二图像中的人脸区域时,人脸区域以外的其它区域即为第二图像中的背景区域;此时同样对人脸区域进行边缘检测和切割,以将第二图像的人脸区域与背景区域进行区分;在区分完成时,将第二图像中的人脸区域进行透明化处理;在透明化处理完成时,原第二图像中的人脸区域时透明的,从而获得了不含人脸区域的背景图像。Still further, for the background image acquisition of the second image, a method similar to the face image acquisition may be employed. Specifically, the second image is subjected to face detection to identify a face region in the second image; when the face region in the second image is recognized, the region other than the face region is in the second image a background area; at this time, edge detection and cutting are also performed on the face area to distinguish the face area of the second image from the background area; when the distinction is completed, the face area in the second image is transparently processed; When the transparency processing is completed, the face area in the original second image is transparent, thereby obtaining a background image without the face area.

在获得人脸图像和背景图像时,将人脸图像和背景图像进行叠加,即获得了目标图像。When the face image and the background image are obtained, the face image and the background image are superimposed, that is, the target image is obtained.

本实施例中,对于闪光灯补光状态下获得的第二图像,主要是要将人脸以外的背景拍摄下来,获取背景图像,因此对于人脸部分的要求较低,而又由于闪光灯的亮度较高,在闪光灯打闪时突然发出亮光对人眼有一定的刺激,因此在拍摄第二图像时,用户可闭眼拍照,避免闪光灯闪光对人眼的刺激。当然为了对用户进行提示,在拍摄的全过程手机可发出语音提示,以提示当前的补光模式。例如,在控制屏幕亮度进行补光时,手机可发出“当前为屏幕补光”的语音提示;在闪光灯补光模式时,手机可发出“当前为闪光灯补光”的语音提示,用户在听到该语音提示时,可将眼睛闭上,避免闪光灯闪光对人眼的刺激。In this embodiment, for the second image obtained in the flash fill state, the background other than the face is mainly photographed to obtain the background image, so the requirement for the face portion is lower, and the brightness of the flash is higher. High, when the flash is flashing, the sudden bright light has a certain stimulation to the human eye. Therefore, when taking the second image, the user can close the eye to take photos, avoiding the flashing of the flash to the human eye. Of course, in order to prompt the user, the mobile phone can issue a voice prompt during the whole process of shooting to prompt the current fill mode. For example, when controlling the brightness of the screen to fill the light, the mobile phone can issue a “currently fill light” voice prompt; in the flash fill mode, the mobile phone can issue a “current flash fill light” voice prompt, the user is hearing When the voice prompts, the eyes can be closed to avoid the stimulation of the flash by the flash.

本实施例中,在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像;开启所述前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;将所述第一图像和第二图像进行合成,获得目标图像。通过以上方式,本实施例分别通过屏幕补光和闪光灯补光的方式进行拍摄,并将两种补光方式下获得的照片进行合成,将各照片中的清晰部分提取并进行拼接融合,从而使得人像和四周环境都可以清晰呈现在照片上,从而提高了照片的亮度和清晰度;操作方法简单,在提升摄像性能和照片质量的同时,也未造成成本的上升。In this embodiment, when the pre-photographing instruction is received, the screen brightness of the mobile terminal is controlled to fill light, and the first image is acquired by the front camera when the screen is filled; the front flash is turned on. Filling light, and acquiring a second image through the front camera when the flash is filled; synthesizing the first image and the second image to obtain a target image. In the above manner, the embodiment performs shooting by means of screen fill light and flash fill light, and synthesizes the photos obtained by the two fill modes, extracts and clears the clear parts in each photo, thereby making Both the portrait and the surrounding environment can be clearly presented on the photo, which improves the brightness and clarity of the photo; the operation method is simple, and the camera performance and the photo quality are improved, and the cost is not increased.

参照图3,图3为图2中所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的细化流程示意图。Referring to FIG. 3, FIG. 3 is a diagram of controlling the screen brightness of the mobile terminal to fill light when receiving the pre-photographing instruction, and acquiring the first image through the front camera when the screen is filled. Refine the process diagram.

基于上述图2所示实施例,步骤S10包括:Based on the embodiment shown in FIG. 2 above, step S10 includes:

步骤S11,在接收到前置拍照指令时,获取当前的环境光线强度,并根据所述环境光线强度控制所述移动终端的屏幕亮度进行补光;Step S11, when receiving the pre-photographing instruction, acquiring the current ambient light intensity, and controlling the screen brightness of the mobile terminal according to the ambient light intensity to fill light;

步骤S12,在屏幕补光时通过所述前置摄像头获取第一图像。In step S12, the first image is acquired by the front camera when the screen is filled.

本实施例中,在通过屏幕亮度进行补光时,手机是根据当前的环境光线强度来控制屏幕亮度的。具体的,手机在接收到用户触发的前置拍照指令时,将会启动前置摄像头的拍照功能,进入前置拍摄模式;同时,手机将通过感光元件获取当前的环境光线强度,其中该感光元件可以是单独设置在手机中,也可以是集成在前置摄像头内部;在得到环境光线强度时,将该环境光线强度与预设的标准光线强度进行比较,判断环境光线强度是否小于预设的标准光线强度,其中该预设的标准光线强度为一预先设置的参数值,可理解前置摄像头能清晰成像的光线强度值,对于不同的前置摄像头可以具有不同的预设标准光线强度;若环境光线强度小于预设的标准光线强度,则说明此事环境光线强度较若,此时将计算预设标准光线强度与环境光线强度的差值,然后根据该差值在手机预设的屏幕亮度控制参数表上找到对应的屏幕亮度参数,并根据该亮度参数提高屏幕亮度进行补光,其中该预设的屏幕亮度控制参数表可理解为光线强度差值与屏幕亮度的关系表,通过该表可确定在某一光线强度差值情况下应如果调整屏幕亮度从而使得屏幕补光效果最佳;相对的,若环境光线强度大于或等于预设的标准光线强度,则此时手机会保持当前的屏幕亮度。In this embodiment, when the light is supplemented by the brightness of the screen, the mobile phone controls the brightness of the screen according to the current ambient light intensity. Specifically, when receiving the pre-shooting instruction triggered by the user, the mobile phone will activate the camera function of the front camera to enter the front shooting mode; at the same time, the mobile phone will obtain the current ambient light intensity through the photosensitive element, wherein the photosensitive element It can be set separately in the mobile phone, or it can be integrated inside the front camera; when the ambient light intensity is obtained, the ambient light intensity is compared with the preset standard light intensity to determine whether the ambient light intensity is less than the preset standard. Light intensity, wherein the preset standard light intensity is a preset parameter value, which can understand the light intensity value that the front camera can clearly image, and can have different preset standard light intensity for different front cameras; If the light intensity is less than the preset standard light intensity, it indicates that the ambient light intensity is relatively high. At this time, the difference between the preset standard light intensity and the ambient light intensity is calculated, and then the preset screen brightness control is controlled according to the difference. Find the corresponding screen brightness parameter on the parameter table, and increase the screen according to the brightness parameter. The brightness is complemented, wherein the preset screen brightness control parameter table can be understood as a relationship between the light intensity difference and the screen brightness. The table can be used to determine whether the screen brightness should be adjusted in the case of a certain light intensity difference. The screen fills the light best; if the ambient light intensity is greater than or equal to the preset standard light intensity, then the phone will maintain the current screen brightness.

在完成屏幕亮度的调整时,即可在屏幕补光的状态下进行拍摄,获取第一图像。When the adjustment of the screen brightness is completed, the image can be taken while the screen is being filled, and the first image is acquired.

参照图4,图4为本发明补光拍照方法第二实施例的流程示意图。Referring to FIG. 4, FIG. 4 is a schematic flow chart of a second embodiment of a photo-filling photographing method according to the present invention.

基于上述图2或图3所示实施例,步骤S30之后,还包括:Based on the embodiment shown in FIG. 2 or FIG. 3, after step S30, the method further includes:

步骤S40,在接收到图像调整指令时,根据所述图像调整指令调整所述目标图像的图像参数,其中所述图像参数至少包括对比度、饱和度、曝光度中的一种或多种。Step S40, when receiving the image adjustment instruction, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.

本实施例中,在将第一图像和第二图像进行合成,获得目标图像后,手机将会在屏幕上显示该目标图像,以方便用户进行查看;若用户认为该目标图像不满足要求,还可以对目标图像进行二次手动调整。具体的,手机在显示该目标图像时,还将显示图像参数调整选项,可供调整的图像参数包括图像的对比度、饱和度、曝光度、亮度、大小尺寸等。当然手机还可以调用原原第一图像和第二图像,并在同一界面中分别显示目标图像、第一图像和第二图像,以供用户对比查看;用户还可以用手动的方式在第一图像和第二图像中选取叠加区域,然后重新合成新的目标图像。当然,手机还可以支持其它一些常用的图像编辑操作,例如旋转、剪切、涂鸦等。In this embodiment, after the first image and the second image are combined to obtain the target image, the mobile phone will display the target image on the screen to facilitate the user to view; if the user thinks that the target image does not meet the requirement, The target image can be manually adjusted twice. Specifically, when the mobile phone displays the target image, an image parameter adjustment option is also displayed, and the image parameters that can be adjusted include image contrast, saturation, exposure, brightness, size, and the like. Of course, the mobile phone can also call the original first image and the second image, and display the target image, the first image and the second image respectively in the same interface for the user to compare and view; the user can also manually use the first image in the first image. And the overlapping area is selected in the second image, and then the new target image is re-synthesized. Of course, the phone can also support other common image editing operations, such as rotation, cutting, graffiti, and so on.

此外,本发明还提供一种移动终端。In addition, the present invention also provides a mobile terminal.

本发明移动终端包括前置摄像头和前置闪光灯;所述移动终端还包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的补光拍照程序,所述补光拍照程序被所述处理器执行时,实现以下步骤:The mobile terminal of the present invention includes a front camera and a front flash; the mobile terminal further includes a processor, a memory, and a fill light photographing program stored on the memory and executable by the processor, the fill light photographing When the program is executed by the processor, the following steps are implemented:

在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像;When receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled;

开启所述前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;Turning on the front flash to fill light, and acquiring a second image through the front camera when the flash is filled;

将所述第一图像和第二图像进行合成,获得目标图像。The first image and the second image are combined to obtain a target image.

进一步地,所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的步骤包括:Further, when receiving the pre-photographing instruction, the step of controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled, includes:

在接收到前置拍照指令时,获取当前的环境光线强度,并根据所述环境光线强度控制所述移动终端的屏幕亮度进行补光;Obtaining a current ambient light intensity when receiving the pre-photographing instruction, and controlling the screen brightness of the mobile terminal to fill light according to the ambient light intensity;

在屏幕补光时通过所述前置摄像头获取第一图像。The first image is acquired by the front camera when the screen is filled.

进一步地,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤包括:Further, the step of synthesizing the first image and the second image to obtain a target image includes:

获取所述第一图像中的人脸图像,并获取所述第二图像中的背景图像;Obtaining a face image in the first image, and acquiring a background image in the second image;

将所述人脸图像和背景图像进行叠加处理,获得目标图像。The face image and the background image are superimposed to obtain a target image.

进一步地,所述获取所述第一图像中的人脸图像的步骤包括:Further, the step of acquiring the face image in the first image includes:

对所述第一图像进行人脸检测,识别出所述第一图像中的人脸区域;Performing face detection on the first image to identify a face region in the first image;

对所述人脸区域的边缘进行切割,并将所述第一图像中所述人脸区域以外的区域透明化,得到人脸图像。Cutting an edge of the face region, and transparently defining an area other than the face region in the first image to obtain a face image.

进一步地,所述补光拍照程序被所述处理器执行时,还实现以下步骤:Further, when the fill photo taking program is executed by the processor, the following steps are also implemented:

以语音的方式提示当前的补光模式。The current fill mode is prompted by voice.

进一步地,所述补光拍照程序被所述处理器执行时,还实现以下步骤:Further, when the fill photo taking program is executed by the processor, the following steps are also implemented:

在接收到图像调整指令时,根据所述图像调整指令调整所述目标图像的图像参数,其中所述图像参数至少包括对比度、饱和度、曝光度中的一种或多种。And when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.

其中,补光拍照程序被执行时所实现的方法可参照本发明补光拍照方法的各个实施例,此处不再赘述。For the method implemented when the fill photo shooting program is executed, reference may be made to various embodiments of the fill light photographing method of the present invention, and details are not described herein again.

此外,本发明还提供一种计算机可读存储介质。Moreover, the present invention also provides a computer readable storage medium.

本发明计算机可读存储介质上存储有补光拍照程序,其中所述补光拍照程序被处理器执行时,实现以下步骤:The computer readable storage medium of the present invention stores a fill photo taking program, wherein when the fill photo taking program is executed by the processor, the following steps are implemented:

在接收到前置拍照指令时,控制移动终端的屏幕亮度进行补光,并在屏幕补光时通过前置摄像头获取第一图像;When receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled;

开启前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;Turning on the front flash to fill the light, and obtaining the second image through the front camera when the flash is filled;

将所述第一图像和第二图像进行合成,获得目标图像。The first image and the second image are combined to obtain a target image.

进一步地,所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的步骤包括:Further, when receiving the pre-photographing instruction, the step of controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled, includes:

在接收到前置拍照指令时,获取当前的环境光线强度,并根据所述环境光线强度控制所述移动终端的屏幕亮度进行补光;Obtaining a current ambient light intensity when receiving the pre-photographing instruction, and controlling the screen brightness of the mobile terminal to fill light according to the ambient light intensity;

在屏幕补光时通过所述前置摄像头获取第一图像。The first image is acquired by the front camera when the screen is filled.

进一步地,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤包括:Further, the step of synthesizing the first image and the second image to obtain a target image includes:

获取所述第一图像中的人脸图像,并获取所述第二图像中的背景图像;Obtaining a face image in the first image, and acquiring a background image in the second image;

将所述人脸图像和背景图像进行叠加处理,获得目标图像。The face image and the background image are superimposed to obtain a target image.

进一步地,所述获取所述第一图像中的人脸图像的步骤包括:Further, the step of acquiring the face image in the first image includes:

对所述第一图像进行人脸检测,识别出所述第一图像中的人脸区域;Performing face detection on the first image to identify a face region in the first image;

对所述人脸区域的边缘进行切割,并将所述第一图像中所述人脸区域以外的区域透明化,得到人脸图像。Cutting an edge of the face region, and transparently defining an area other than the face region in the first image to obtain a face image.

进一步地,所述补光拍照程序被所述处理器执行时,还实现以下步骤:Further, when the fill photo taking program is executed by the processor, the following steps are also implemented:

以语音的方式提示当前的补光模式。The current fill mode is prompted by voice.

进一步地,所述补光拍照程序被所述处理器执行时,还实现以下步骤:Further, when the fill photo taking program is executed by the processor, the following steps are also implemented:

在接收到图像调整指令时,根据所述图像调整指令调整所述目标图像的图像参数,其中所述图像参数至少包括对比度、饱和度、曝光度中的一种或多种。And when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure.

其中,补光拍照程序被执行时所实现的方法可参照本发明补光拍照方法的各个实施例,此处不再赘述。For the method implemented when the fill photo shooting program is executed, reference may be made to various embodiments of the fill light photographing method of the present invention, and details are not described herein again.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, item, or system. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in a process, method, article, or system that includes the element, without further limitation.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, portions of the technical solution of the present invention that contribute substantially or to the prior art may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (10)

一种补光拍照方法,其特征在于,所述补光拍照方法应用于移动终端,所述移动终端包括前置摄像头和前置闪光灯,所述补光拍照方法包括以下步骤: A fill light photographing method is characterized in that the fill light photographing method is applied to a mobile terminal, and the mobile terminal comprises a front camera and a front flash, and the fill light photographing method comprises the following steps: 在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像;When receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled; 开启所述前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;Turning on the front flash to fill light, and acquiring a second image through the front camera when the flash is filled; 将所述第一图像和第二图像进行合成,获得目标图像。The first image and the second image are combined to obtain a target image. 如权利要求1所述的补光拍照方法,其特征在于,所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的步骤包括:The fill light photographing method according to claim 1, wherein the screen brightness of the mobile terminal is controlled to fill light when receiving a pre-photographing instruction, and the front side is passed when the screen is filled light The step of the camera acquiring the first image includes: 在接收到前置拍照指令时,获取当前的环境光线强度,并根据所述环境光线强度控制所述移动终端的屏幕亮度进行补光;Obtaining a current ambient light intensity when receiving the pre-photographing instruction, and controlling the screen brightness of the mobile terminal to fill light according to the ambient light intensity; 在屏幕补光时通过所述前置摄像头获取第一图像。The first image is acquired by the front camera when the screen is filled. 如权利要求1所述的补光拍照方法,其特征在于,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤包括:The method of photographing a fill light according to claim 1, wherein the step of synthesizing the first image and the second image to obtain a target image comprises: 获取所述第一图像中的人脸图像,并获取所述第二图像中的背景图像;Obtaining a face image in the first image, and acquiring a background image in the second image; 将所述人脸图像和背景图像进行叠加处理,获得目标图像。The face image and the background image are superimposed to obtain a target image. 如权利要求3所述的补光拍照方法,其特征在于,所述获取所述第一图像中的人脸图像的步骤包括:The method of photographing a fill light according to claim 3, wherein the step of acquiring a face image in the first image comprises: 对所述第一图像进行人脸检测,识别出所述第一图像中的人脸区域;Performing face detection on the first image to identify a face region in the first image; 对所述人脸区域的边缘进行切割,并将所述第一图像中所述人脸区域以外的区域透明化,得到人脸图像。Cutting an edge of the face region, and transparently defining an area other than the face region in the first image to obtain a face image. 如权利要求1所述的补光拍照方法,其特征在于,所述补光拍照方法还包括:The fill light photographing method according to claim 1, wherein the fill light photographing method further comprises: 以语音的方式提示当前的补光模式。The current fill mode is prompted by voice. 如权利要求1所述的补光拍照方法,其特征在于,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤之后,还包括:The method of photographing a fill light according to claim 1, wherein the step of synthesizing the first image and the second image to obtain a target image further comprises: 在接收到图像调整指令时,根据所述图像调整指令调整所述目标图像的图像参数,其中所述图像参数至少包括对比度、饱和度、曝光度中的一种或多种。And when the image adjustment instruction is received, adjusting an image parameter of the target image according to the image adjustment instruction, wherein the image parameter includes at least one or more of contrast, saturation, and exposure. 一种移动终端,其特征在于,所述移动终端包括前置摄像头和前置闪光灯;所述移动终端还包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的补光拍照程序,所述补光拍照程序被所述处理器执行时,实现以下步骤:A mobile terminal, characterized in that the mobile terminal comprises a front camera and a front flash; the mobile terminal further comprises a processor, a memory, and a complement stored on the memory and executable by the processor The photo taking program, when the fill photo taking program is executed by the processor, implements the following steps: 在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像;When receiving the pre-photographing instruction, controlling the screen brightness of the mobile terminal to fill light, and acquiring the first image through the front camera when the screen is filled; 开启所述前置闪光灯进行补光,并在闪光灯补光时通过所述前置摄像头获取第二图像;Turning on the front flash to fill light, and acquiring a second image through the front camera when the flash is filled; 将所述第一图像和第二图像进行合成,获得目标图像。The first image and the second image are combined to obtain a target image. 如权利要求7所述的移动终端,其特征在于,所述在接收到前置拍照指令时,控制所述移动终端的屏幕亮度进行补光,并在屏幕补光时通过所述前置摄像头获取第一图像的步骤包括:The mobile terminal according to claim 7, wherein when the pre-photographing instruction is received, the screen brightness of the mobile terminal is controlled to fill light, and is acquired by the front camera when the screen is filled light The steps of the first image include: 在接收到前置拍照指令时,获取当前的环境光线强度,并根据所述环境光线强度控制所述移动终端的屏幕亮度进行补光;Obtaining a current ambient light intensity when receiving the pre-photographing instruction, and controlling the screen brightness of the mobile terminal to fill light according to the ambient light intensity; 在屏幕补光时通过所述前置摄像头获取第一图像。The first image is acquired by the front camera when the screen is filled. 如权利要求7所述的移动终端,其特征在于,所述将所述第一图像和第二图像进行合成,获得目标图像的步骤包括:The mobile terminal according to claim 7, wherein the step of synthesizing the first image and the second image to obtain a target image comprises: 获取所述第一图像中的人脸图像,并获取所述第二图像中的背景图像;Obtaining a face image in the first image, and acquiring a background image in the second image; 将所述人脸图像和背景图像进行叠加处理,获得目标图像。The face image and the background image are superimposed to obtain a target image. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有拍照补光程序,其中所述拍照补光程序被处理器执行时,实现如权利要求1至6中任一项所述的补光拍照方法的步骤。 A computer readable storage medium, wherein the computer readable storage medium stores a photo fill light program, wherein when the photo fill light program is executed by a processor, implementing any one of claims 1 to 6 The step of the fill light photographing method described in the item.
PCT/CN2017/101627 2017-09-13 2017-09-13 Fill light photography method, mobile terminal and computer-readable storage medium Ceased WO2019051683A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780096693.0A CN111480333B (en) 2017-09-13 2017-09-13 Fill-light photographing method, mobile terminal and computer-readable storage medium
PCT/CN2017/101627 WO2019051683A1 (en) 2017-09-13 2017-09-13 Fill light photography method, mobile terminal and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/101627 WO2019051683A1 (en) 2017-09-13 2017-09-13 Fill light photography method, mobile terminal and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2019051683A1 true WO2019051683A1 (en) 2019-03-21

Family

ID=65722258

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/101627 Ceased WO2019051683A1 (en) 2017-09-13 2017-09-13 Fill light photography method, mobile terminal and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN111480333B (en)
WO (1) WO2019051683A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110046488A (en) * 2019-04-19 2019-07-23 努比亚技术有限公司 Unlocking method, mobile terminal and computer readable storage medium
CN111654636A (en) * 2020-06-30 2020-09-11 西安易朴通讯技术有限公司 Shooting method and device, electronic equipment and storage medium
CN111767762A (en) * 2019-04-01 2020-10-13 深圳兆日科技股份有限公司 Mobile terminal, light control method, system and readable storage medium
CN112052827A (en) * 2020-09-21 2020-12-08 陕西科技大学 Screen hiding method based on artificial intelligence technology
CN112702531A (en) * 2020-12-29 2021-04-23 维沃移动通信有限公司 Shooting method and device and electronic equipment
CN113376931A (en) * 2021-06-10 2021-09-10 复旦大学 Fluorescence area light intensity supplementary lighting method, device and system for parathyroid gland detection
CN114279679A (en) * 2021-04-15 2022-04-05 上海商米科技集团股份有限公司 Automated testing method and system, testing device and computer readable storage medium
CN114764927A (en) * 2020-12-31 2022-07-19 合肥君正科技有限公司 Method for making regionally enhanced face backlight picture
CN115802133A (en) * 2021-09-10 2023-03-14 Oppo广东移动通信有限公司 Camera module, electronic equipment, image acquisition method and device and storage medium
WO2023240898A1 (en) * 2022-06-16 2023-12-21 昆山国显光电有限公司 Display apparatus and under-display photographing processing method

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291471B (en) * 2020-10-28 2022-06-10 维沃移动通信有限公司 Shooting control method, shooting control device, electronic device and readable storage medium
CN115278092B (en) * 2021-04-29 2024-10-15 北京小米移动软件有限公司 Image acquisition method, image acquisition device and storage medium
CN114051067B (en) * 2021-11-03 2023-11-03 北京百度网讯科技有限公司 Image acquisition method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245790A (en) * 2015-10-15 2016-01-13 广东欧珀移动通信有限公司 A light supplement method, device and mobile terminal
CN105554411A (en) * 2016-02-15 2016-05-04 广东欧珀移动通信有限公司 Photographing method and device based on screen light compensation and mobile terminal
CN105744175A (en) * 2016-02-15 2016-07-06 广东欧珀移动通信有限公司 Screen light fill method and device and mobile terminal

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220421B (en) * 2013-04-03 2015-01-14 广东欧珀移动通信有限公司 Method and device for using mobile terminal to carry out self photographing
CN104483806B (en) * 2014-11-21 2017-06-16 广东欧珀移动通信有限公司 The method and apparatus for facilitating user to autodyne
CN104580922B (en) * 2014-12-02 2018-03-02 广东欧珀移动通信有限公司 A kind of control method and device for shooting light filling
US20170134625A1 (en) * 2015-11-09 2017-05-11 Qualcomm Incorporated Dedicated illumination element and display based flash illumination for image capture
CN105872321A (en) * 2015-12-10 2016-08-17 乐视移动智能信息技术(北京)有限公司 Front-mounted camera brightness compensation method and device, and mobile terminal
CN106303280A (en) * 2016-09-09 2017-01-04 广东欧珀移动通信有限公司 A method, device and terminal for supplementary light for photographing
CN106338875A (en) * 2016-10-21 2017-01-18 上海传英信息技术有限公司 Light supplementing apparatus and mobile terminal
CN106454117A (en) * 2016-11-15 2017-02-22 上海传英信息技术有限公司 Light supplementing method and user terminal
CN106604010A (en) * 2016-12-15 2017-04-26 北京小米移动软件有限公司 Method and device for controlling lighting of screen
CN106803896B (en) * 2017-02-28 2019-02-05 东莞市步步高通信软件有限公司 A kind of photographing method of mobile terminal and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245790A (en) * 2015-10-15 2016-01-13 广东欧珀移动通信有限公司 A light supplement method, device and mobile terminal
CN105554411A (en) * 2016-02-15 2016-05-04 广东欧珀移动通信有限公司 Photographing method and device based on screen light compensation and mobile terminal
CN105744175A (en) * 2016-02-15 2016-07-06 广东欧珀移动通信有限公司 Screen light fill method and device and mobile terminal

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767762A (en) * 2019-04-01 2020-10-13 深圳兆日科技股份有限公司 Mobile terminal, light control method, system and readable storage medium
CN110046488A (en) * 2019-04-19 2019-07-23 努比亚技术有限公司 Unlocking method, mobile terminal and computer readable storage medium
CN110046488B (en) * 2019-04-19 2024-04-26 努比亚技术有限公司 Unlocking method, mobile terminal and computer readable storage medium
CN111654636A (en) * 2020-06-30 2020-09-11 西安易朴通讯技术有限公司 Shooting method and device, electronic equipment and storage medium
CN112052827B (en) * 2020-09-21 2024-02-27 陕西科技大学 Screen hiding method based on artificial intelligence technology
CN112052827A (en) * 2020-09-21 2020-12-08 陕西科技大学 Screen hiding method based on artificial intelligence technology
CN112702531A (en) * 2020-12-29 2021-04-23 维沃移动通信有限公司 Shooting method and device and electronic equipment
CN114764927B (en) * 2020-12-31 2024-05-28 合肥君正科技有限公司 A method for producing a backlit face image with regional enhancement
CN114764927A (en) * 2020-12-31 2022-07-19 合肥君正科技有限公司 Method for making regionally enhanced face backlight picture
CN114279679A (en) * 2021-04-15 2022-04-05 上海商米科技集团股份有限公司 Automated testing method and system, testing device and computer readable storage medium
CN113376931A (en) * 2021-06-10 2021-09-10 复旦大学 Fluorescence area light intensity supplementary lighting method, device and system for parathyroid gland detection
CN115802133A (en) * 2021-09-10 2023-03-14 Oppo广东移动通信有限公司 Camera module, electronic equipment, image acquisition method and device and storage medium
WO2023240898A1 (en) * 2022-06-16 2023-12-21 昆山国显光电有限公司 Display apparatus and under-display photographing processing method

Also Published As

Publication number Publication date
CN111480333A (en) 2020-07-31
CN111480333B (en) 2021-09-24

Similar Documents

Publication Publication Date Title
WO2019051683A1 (en) Fill light photography method, mobile terminal and computer-readable storage medium
WO2019216593A1 (en) Method and apparatus for pose processing
WO2017039348A1 (en) Image capturing apparatus and operating method thereof
WO2017164716A1 (en) Method and device for processing multimedia information
EP3740936A1 (en) Method and apparatus for pose processing
WO2019029261A1 (en) Micro-expression recognition method, device and storage medium
WO2016072749A1 (en) Electronic device, and method for analyzing face information in electronic device
WO2017213365A1 (en) Moving picture capturing apparatus having dual camera
WO2019205323A1 (en) Air conditioner and parameter adjusting method and device therefor, and readable storage medium
WO2015030411A1 (en) Mobile terminal and method of controlling the same
WO2015184760A1 (en) Air gesture input method and apparatus
WO2018166224A1 (en) Target tracking display method and apparatus for panoramic video, and storage medium
WO2019061546A1 (en) Mobile terminal photographing method, device and computer readable storage medium
WO2021162295A1 (en) Method and apparatus for operating electronic device including flexible display
WO2017111268A1 (en) Deformable display device and image display method using same
WO2018074872A1 (en) Electronic device and computer-readable recording medium for displaying images
WO2017215116A1 (en) Photographing method and system for smart television
WO2019051895A1 (en) Terminal control method, device and storage medium
WO2017088437A1 (en) Method and device for controlling switching of cameras of terminal by means of smart television
WO2016190484A1 (en) Mobile terminal and control method therefor
WO2017181504A1 (en) Method and television set for intelligently adjusting subtitle size
WO2019061545A1 (en) Method and device for rapidly adjusting white balance of camera and computer-readable storage medium
EP4097964A1 (en) Electronic device and controlling method of electronic device
WO2017090833A1 (en) Photographing device and method of controlling the same
WO2020017936A1 (en) Electronic device and method for correcting image on basis of image transmission state

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17924994

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17924994

Country of ref document: EP

Kind code of ref document: A1