This application is based on and claims priority to Chinese Patent Application Serial No. 201610101967.8, filed with the State Intellectual Property Office of P.R. China on Feb. 24, 2016, the entire content of which is incorporated herein by reference.
The present disclosure relates to a terminal technology field, and more particularly, to a method for automatically capturing a photograph, an electronic device and a medium.
With the growing popularity of shooting photographs, it becomes a point of interest for a user to evaluate an appearance value when shooting photographs. A facial appearance value will be calculated by an appearance value evaluation algorithm after a face of the user is recognized, so as to ensure that the user may be shot at such an angle that a higher appearance value is obtained. Typically, the user finds such angle by trying at different angles when shooting photographs and then manually triggers a photograph-shooting operation, which however easily results in an angle change of the face of the user within a photograph-shooting range, thus missing a scene where a high appearance value may be obtained.
Embodiments of the present disclosure provide a method for automatically capturing a photograph, an electronic device and a medium.
According to a first aspect of embodiments of the present disclosure, there is provided a method for automatically capturing a photograph, and the method includes:determining a facial feature in the photograph on a current display interface; calculating a facial appearance value corresponding to the facial feature, if it is determined to trigger an appearance value calculation; determining whether the facial appearance value is greater than a preset threshold corresponding to the facial feature; and acquiring and storing the photograph on the display interface, if the facial appearance value is greater than the preset threshold.
According to a second aspect of embodiments of the present disclosure, there is provided an electronic device, and the electronic device includes: a processor; and a memory, configured to store an instruction executable by the processor; in which the processor is configured to: determine a facial feature in the photograph on a current display interface; calculate a facial appearance value corresponding to the facial feature, if it is determined to trigger an appearance value calculation; determine whether the facial appearance value is greater than a preset threshold corresponding to the facial feature; and acquire and store the photograph on the display interface, if the facial appearance value is greater than the preset threshold.
According to a third aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor of an electronic device, cause the electronic device to perform the method for automatically capturing a photograph, and the method includes: determining a facial feature in the photograph on a current display interface; calculating a facial appearance value corresponding to the facial feature, if it is determined to trigger an appearance value calculation; determining whether the facial appearance value is greater than a preset threshold corresponding to the facial feature; and acquiring and storing the photograph on the display interface, if the facial appearance value is greater than the preset threshold.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only, and shall not be construed to limit the present disclosure.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
Example embodiments will be described in detail herein, and examples thereof are illustrated in accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise represented. The implementations set forth in the following description of example embodiments do not represent all implementations consistent with the invention. Instead, they are merely examples of apparatuses and methods consistent with aspects related to the invention as recited in the appended claims.
In step S101, a facial feature in the photograph on a current display interface is determined and a facial appearance value corresponding to the facial feature is calculated, if it is determined to trigger an appearance value calculation.
In an embodiment, with respect to how to determine a condition for triggering an appearance value calculation, reference can be made to the following description of an embodiment shown in
In step S102, it is determined whether the facial appearance value is greater than a preset threshold corresponding to the facial feature. If the facial appearance value is greater than the preset threshold, step S103 is executed, if the facial appearance value is lower than or equal to the preset threshold, step S101 is re-executed.
In an embodiment, with respect to a method for determining the preset threshold, reference can be made to the following description of an embodiment shown in
In step S103, if the facial appearance value is greater than the preset threshold, the photograph on the display interface is acquired and stored.
As an example scene, as shown in
As another example scene, as shown in
In this embodiment, a photograph-shooting quality is quantized by the facial appearance value, which avoids a subjective evaluation of the user for obtaining a photograph with a higher appearance value from photographs shot at different shooting angles. If the facial appearance value is greater than the preset threshold, the photograph on the display interface is acquired and stored, which avoids a change of shooting angle due to a manual trigger of a shutter button and thus avoids missing a scene where a high appearance value may be obtained, thereby leaving more exciting moments for the user.
In an embodiment, the method further includes: determining whether an appearance value calculating period is reached according to a preset calculating frequency;determining to trigger the appearance value calculation if the appearance value calculating period is reached; or determining whether the photograph on the current display interface changes; determining to trigger the appearance value calculation if it is determined that the photograph on the current display interface changes.
In an embodiment, if there are a plurality of facial features in the photograph on the current display interface and the plurality of facial features correspond to a same preset threshold, determining whether the facial appearance value is greater than a preset threshold corresponding to the facial feature may include: determining whether each of facial appearance values corresponding to the plurality of facial features is greater than the same preset threshold; storing a pre-shot picture if the facial appearance value is greater than the preset threshold includes: shooting the photograph on the current display interface as a picture and storing the picture, if each of the facial appearance values corresponding to the plurality of facial features is greater than the same preset threshold.
In an embodiment, if there are a plurality of facial features in the photograph on the current display interface and each of the plurality of facial features corresponds to a respective preset threshold, determining whether the facial appearance value is greater than a preset threshold corresponding to the facial feature may include: determining for each facial feature whether the facial appearance value of the facial feature is greater than the preset threshold corresponding to the facial feature; storing a pre-shot picture if the facial appearance value is greater than the preset threshold includes: shooting the photograph on the current display interface as a picture and storing the picture, if the facial appearance value of each facial feature is greater than the preset threshold corresponding to the facial feature.
In an embodiment, the method may further include: determining a first preset number of facial appearance values of a user corresponding to the facial feature at different angles; determining a second preset number of facial appearance values from the first preset number of facial appearance values, in which the second preset number of facial appearance values are top ranked; determining the preset threshold according to the second preset number of facial appearance values.
In an embodiment, the method may further include: determining to trigger the preset threshold corresponding to the facial feature, if it is determined to activate an mode for determining a facial appearance threshold; or determining to trigger the preset threshold corresponding to the facial feature, if it is determined to activate a camera to start capturing a photograph; or searching whether the preset threshold corresponding to the facial feature is stored after a facial appearance value of the facial feature is calculated, and determining to trigger the preset threshold corresponding to the facial feature, if it is determined that the preset threshold corresponding to the facial feature is not stored.
In an embodiment, acquiring and storing the photograph on the display interface may include: determining a type of the photograph on the display interface;acquiring the photograph on the display interface by triggering a shooting module, if the type of the photograph is an image captured by the shooting module; acquiring the photograph on the display interface by triggering a screenshot operation of a video decoding module, if the type of the photograph is a video played by the video decoding module.
Specifically, with respect to how to automatically acquire the photograph, reference can be made to embodiments hereinafter.
To the end, the above method provided in embodiments of the present disclosure may avoid a subjective evaluation of the user for obtaining a photograph with a higher appearance value from photographs shot at different shooting angles, and avoid a change of shooting angle due to a manual trigger of a shutter button and thus avoid missing a scene where a high appearance value may be obtained, thereby leaving more exciting moments for the user.
The present disclosure will be explained by specific embodiments that follow.
In step S201, it is determined whether an appearance value calculating period is reached according to a preset calculating frequency.
In an embodiment, the preset calculating frequency may be lower than an image capturing frequency of a camera of an electronic device. For example, if the camera captures 20 images per second, the preset calculating frequency may be set as calculating 10 facial appearance values per second. It will be appreciated to those skilled in the art that, number values of 20 or 10 in the present disclosure is exemplary and explanatory only, and shall not be construed to limit the technical solution of the present disclosure.
In step S202, it is determined to trigger the appearance value calculation if the appearance value calculating period is reached.
As the camera of the electronic device captures images in real time, the photograph on the current display interface of the electronic device will change with a movement or angle change of the electronic device. If the appearance value calculating period is reached, it is determined to trigger the appearance value calculation, which may ensure updating the facial appearance value of the photograph on the current display interface in time.
As shown in
In step S211, it is determined whether the photograph on the current display interface changes.
In an embodiment, whether the photograph on the current display interface changes may be determined by detecting whether a reference feature of the photograph on the current display interface changes, in which the reference feature may be, for example, a light intensity value, the facial feature, or a shooting angle of the face of the same user.
In step S212, it is determined to trigger the appearance value calculation, if it is determined that the photograph on the current display interface changes.
As an example, if a change of the light intensity value exceeds a threshold, it indicates that illumination in environment where the electronic device is changes. In this case, the facial appearance value will change, and thus it is required to trigger the appearance value calculation, so as to ensure real-time of the facial appearance value. As another example, the electronic device determines whether there is a need to retrigger the appearance value calculation by detecting a matching degree between image contents of the image currently detected by the camera and a last image, thus avoiding unnecessary triggering of the appearance value calculation, and reducing calculation complexity of the electronic device.
In step S301, a facial feature in the photograph on a current display interface is determined and a facial appearance value corresponding to the facial feature is calculated, if it is determined to trigger an appearance value calculation.
In step S302, it is determined whether each of facial appearance values corresponding to the plurality of facial features is greater than the same preset threshold.
In step S303, the photograph on the current display interface is shot and stored as a picture, if each of the facial appearance values corresponding to the plurality of facial features is greater than the same preset threshold.
As shown in
In this embodiment, when each of facial appearance values corresponding to the plurality of facial features is greater than the same preset threshold, the photograph on the current display interface is shot and stored as a picture, which may ensure a higher facial appearance value is achieved for each face in the photograph on the display interface, and avoid the user to store the photograph with higher facial appearance values by manual screenshot or manually triggering a shutter button, thus leaving more exciting moments for the user, and improving user experience.
In step S401, a facial feature in the photograph on a current display interface is determined and a facial appearance value corresponding to the facial feature is calculated, if it is determined to trigger an appearance value calculation.
In step S402, it is determined for each facial feature whether the facial appearance value of the facial feature is greater than the preset threshold corresponding to the facial feature.
In step S403, the photograph on the current display interface is shot and stored as a picture, if the facial appearance value of each facial feature is greater than the preset threshold corresponding to the facial feature.
As shown in
In this embodiment, as different users have different appearance values, different preset thresholds are set for the plurality of facial features. If each of the facial appearance values of the plurality of users reaches a respective one of corresponding preset thresholds, the photograph on the current display interface is shot and stored as a picture, which may ensure that each user has an optimum appearance state and the most exciting moment is left for each user, thus improving user experience.
In step S501, a first preset number of facial appearance values of a user corresponding to the facial feature at different angles are determined.
In step S502, a second preset number of facial appearance values are determined from the first preset number of facial appearance values, in which the second preset number of facial appearance values are top ranked.
In step S503, the preset threshold is determined according to the second preset number of facial appearance values.
As an example, if there is a need to shoot photographs for user A, a statistics is needed to be performed on a first preset number of facial appearance values of user A at different angles. For example, user A is shot at four different angles with 20 photographs for each angle, in particular, 20 photographs with the face of the user turning 30 degrees to the left side, 20 photographs with the face of the user turning 30 degrees to the right side, 20 photographs with raising the user's head by 20 degrees and 20 photographs with lowering the user's head by 20 degrees. That is, a total of 80 photographs are shot for user A, which correspond to 80 (example of the first preset number of the present disclosure) facial appearance values, from which first 10 (example of the second preset number of the present disclosure) facial appearance values are selected based on an order of the appearance values from top to low, and an average value of the first 10 facial appearance values is used as a preset threshold of user A. When photograph-shooting or screenshot is to be performed for user A according to embodiments of the present disclosure, the photograph-shooting or screenshot is automatically triggered if the facial appearance value of user A is calculated to be greater than the preset threshold.
In this embodiment, by performing a statistics on the facial appearance values of the user corresponding to the facial feature at different angles to acquire the preset threshold corresponding to the user, it is possible to ensure that different users correspond to different preset thresholds, and thus ensure that photograph-shooting or screenshot is triggered by different appearance values for different users, thereby ensuring that photograph-shooting or screenshot may be triggered with each user reaching an optimum appearance value thereof.
In step S601, a facial feature in the photograph on a current display interface is determined and a facial appearance value corresponding to the facial feature is calculated, if it is determined to trigger an appearance value calculation.
In step S602, it is determined whether the facial appearance value is greater than a preset threshold corresponding to the facial feature. If the facial appearance value is greater than the preset threshold, step S603 is executed. If the facial appearance value is lower than or equal to the preset threshold, step S601 is re-executed.
With respect to the description related to step S601 and step S602, reference may be made to the above description related to
In step S603, if the facial appearance value is greater than the preset threshold, a type of the photograph on the display interface is determined. If the type of the photograph is an image captured by the shooting module, step S604 is executed, and if the type of the photograph is a video played by the video decoding module, step S605 is executed.
In step S604, if the type of the photograph is an image captured by the shooting module, the photograph on the display interface is acquired by triggering a shooting module.
In step S605, if the type of the photograph is a video played by the video decoding module, the photograph on the display interface is acquired by triggering a screenshot operation of the video decoding module.
In an example scene, as shown in
In another example scene, as shown in
In this embodiment, by determining a type of the photograph on the display interface, acquiring the photograph on the display interface by triggering a shooting module if the type of the photograph is an image captured by the shooting module or acquiring the photograph on the display interface by triggering a screenshot operation of a video decoding module if the type of the photograph is a video played by the video decoding module, it is possible to ensure that the electronic device automatically keep a photograph with a higher appearance value or perform a screenshot operation in a beauty mode, which is convenient to leave a wonderful moment for the user.
In an embodiment, if there are a plurality of facial features in the photograph on the current display interface and the plurality of facial features correspond to a same preset threshold, the second determining module 72 may include: a fifth determining sub-module 721, configured to determine whether each of facial appearance values corresponding to the plurality of facial features is greater than the same preset threshold; the acquiring module 73 may include: a first shooting sub-module 731, configured to shoot the photograph on the current display interface as a picture and storing the picture, if it is determined by the fifth determining sub-module 721 that each of the facial appearance values corresponding to the plurality of facial features is greater than the same preset threshold.
In an embodiment, the device further include: a third determining module 74, configured to determine a first preset number of facial appearance values of a user corresponding to the facial feature determined by the first determining module 71 at different angles; a fourth determining module 75, configured to determine a second preset number of facial appearance values from the first preset number of facial appearance values determined by the third determining module 74, in which the second preset number of facial appearance values are top ranked; a fifth determining module 76, configured to determine the preset threshold according to the second preset number of facial appearance values determined by the fourth determining module 75.
In an embodiment, the acquiring module 73 may include: a seventh determining sub-module 733, configured to determine a type of the photograph on the display interface; a first triggering sub-module 734, configured to trigger a shooting module for acquiring the photograph on the display interface, if it is determined by the seventh determining sub-module 733 that the type of the photograph is an image captured by the shooting module; and a second triggering sub-module 735, configured to trigger a screenshot operation of the video decoding module for acquiring the photograph on the display interface, if it is determined by the seventh determining sub-module 733 that the type of the photograph is a video played by the video decoding module.
Referring to
The processing component 1102 typically controls overall operations of the device 1100, such as the operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps in the above described methods. Moreover, the processing component 1102 may include one or more modules which facilitate the interaction between the processing component 1102 and other components. For instance, the processing component 1102 may include a multimedia module to facilitate the interaction between the multimedia component 1108 and the processing component 1102.
The memory 1104 is configured to store various types of data to support the operation of the device 1100. Examples of such data include instructions for any applications or methods operated on the device 1100, contact data, phonebook data, messages, pictures, video, etc. The memory 1104 may be implemented using any type of volatile or non-volatile memory devices, or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic or optical disk.
The power component 1106 provides power to various components of the device 1100. The power component 1106 may include a power management system, one or more power sources, and any other components associated with the generation, management, and distribution of power in the device 1100.
The multimedia component 1108 includes a screen providing an output interface between the device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may not only sense a boundary of a touch or swipe action, but also sense a period of time and a pressure associated with the touch or swipe action. In some embodiments, the multimedia component 1108 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive an external multimedia datum while the device 1100 is in an operation mode, such as a photographing mode or a video mode. Each of the front camera and the rear camera may be a fixed optical lens system or have focus and optical zoom capability.
The audio component 1110 is configured to output and/or input audio signals. For example, the audio component 1110 includes a microphone (MIC) configured to receive an external audio signal when the device 1100 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may be further stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, the audio component 1110 further includes a speaker to output audio signals.
The I/O interface 1112 provides an interface between the processing component 1102 and peripheral interface modules, such as a keyboard, a click wheel, buttons, and the like. The buttons may include, but are not limited to, a home button, a volume button, a starting button, and a locking button.
The sensor component 1114 includes one or more sensors to provide status assessments of various aspects of the device 1100. For instance, the sensor component 1114 may detect an open/closed status of the device 1100, relative positioning of components, e.g., the display and the keypad, of the device 1100, a change in position of the device 1100 or a component of the device 1100, a presence or absence of user contact with the device 1100, an orientation or an acceleration/deceleration of the device 1100, and a change in temperature of the device 1100. The sensor component 1114 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 1114 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 1114 may also include an accelerometer sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1116 is configured to facilitate communication, wired or wirelessly, between the device 1100 and other devices. The device 1100 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof In one example embodiment, the communication component 1116 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In one example embodiment, the communication component 1116 further includes a near field communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on a radio frequency identification (RFID) technology, an infrared data association (IrDA) technology, an ultra-wideband (UWB) technology, a Bluetooth (BT) technology, and other technologies.
In example embodiments, the device 1100 may be implemented with one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components, for performing the above described methods.
In example embodiments, there is also provided a non-transitory computer-readable storage medium including instructions, such as included in the memory 1104, executable by the processor 1120 in the device 1100, for performing the above-described methods. For example, the non-transitory computer-readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disc, an optical data storage device, and the like.
Other embodiments will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed here. This application is intended to cover any variations, uses, or adaptations of the invention following the general principles thereof and including such departures from the present disclosure as come within known or customary practice in the art. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be appreciated that the present disclosure is not limited to the exact construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made without departing from the scope thereof. It is intended that the scope of the invention only be limited by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
201610101967.8 | Feb 2016 | CN | national |