CN109194879B - Photographing method, photographing device, storage medium and mobile terminal - Google Patents

Photographing method, photographing device, storage medium and mobile terminal Download PDF

Info

Publication number
CN109194879B
CN109194879B CN201811377410.2A CN201811377410A CN109194879B CN 109194879 B CN109194879 B CN 109194879B CN 201811377410 A CN201811377410 A CN 201811377410A CN 109194879 B CN109194879 B CN 109194879B
Authority
CN
China
Prior art keywords
target
preview image
human body
snapshot
key point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811377410.2A
Other languages
Chinese (zh)
Other versions
CN109194879A (en
Inventor
朱豪
刘耀勇
陈岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811377410.2A priority Critical patent/CN109194879B/en
Publication of CN109194879A publication Critical patent/CN109194879A/en
Application granted granted Critical
Publication of CN109194879B publication Critical patent/CN109194879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body

Abstract

The embodiment of the application discloses a photographing method, a photographing device, a storage medium and a mobile terminal. The method comprises the following steps: when the fact that a character snapshot event is triggered is detected, determining a target posture; identifying key points of a target figure in the preview image to obtain corresponding key point information of the human body; and matching the obtained human body key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when the matching result meets the preset requirement, wherein the target standard model corresponds to the target posture and comprises a model constructed based on the human body key points. By adopting the technical scheme, the embodiment of the application can add the figure snapshot function in the mobile terminal, accurately identify the standard posture in the preview image based on the key points of the human body, further realize automatic snapshot and enrich the shooting function of the mobile terminal.

Description

Photographing method, photographing device, storage medium and mobile terminal
Technical Field
The embodiment of the application relates to the technical field of mobile terminals, in particular to a photographing method, a photographing device, a storage medium and a mobile terminal.
Background
At present, the photographing function has become a standard configuration of most mobile terminals, and a terminal user can record the good moment around the user at any time through the portable mobile terminal.
With the rapid development of the intellectualization of the mobile terminal, the user can be supported to independently set the shooting mode and the like under the shooting function of a plurality of mobile terminals, and the user can be helped to shoot a satisfactory photo. However, for some fast-changing shooting scenes, such as the motion of a person at a moment, the effect of the shot picture is not ideal and needs to be improved because the best shooting opportunity is often missed.
Disclosure of Invention
The embodiment of the application provides a photographing method, a photographing device, a storage medium and a mobile terminal, which can optimize a photographing scheme in the mobile terminal.
In a first aspect, an embodiment of the present application provides a photographing method, including:
when the fact that a character snapshot event is triggered is detected, determining a target posture;
identifying key points of a target figure in the preview image to obtain corresponding key point information of the human body;
and matching the obtained human key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, wherein the target standard model corresponds to the target posture, and the target standard model comprises a model constructed based on human key points.
In a second aspect, an embodiment of the present application provides a photographing apparatus, including:
the target posture determining module is used for determining a target posture when the fact that a character snapshot event is triggered is detected;
the human body key point identification module is used for identifying human body key points of target characters in the preview image to obtain corresponding human body key point information;
and the snapshot generating module is used for matching the obtained human key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, wherein the target standard model corresponds to the target posture, and the target standard model comprises a model constructed based on human key points.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements a photographing method according to an embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a mobile terminal, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the photographing method according to the embodiment of the present application.
According to the photographing scheme provided by the embodiment of the application, when a character snapshot event is triggered, the target posture is determined, human key point identification is carried out on a target character in a preview image, corresponding human key point information is obtained, the obtained human key point information is matched with a target standard model, and when a matching result meets a preset requirement, a snapshot corresponding to the target posture is generated according to the preview image, wherein the target standard model corresponds to the target posture and comprises a model constructed based on the human key points. By adopting the technical scheme, the figure snapshot function can be added in the mobile terminal, the standard posture in the preview image is accurately identified based on the human key points, so that automatic snapshot is realized, and the shooting function of the mobile terminal is enriched.
Drawings
Fig. 1 is a schematic flowchart of a photographing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another photographing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another photographing method provided in the embodiment of the present application;
fig. 4 is a block diagram of a photographing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application.
Detailed Description
The technical scheme of the application is further explained by the specific implementation mode in combination with the attached drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart illustrating a photographing method according to an embodiment of the present disclosure, where the photographing method may be executed by a photographing apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a mobile terminal. As shown in fig. 1, the method includes:
step 101, determining a target posture when detecting that a character snapshot event is triggered.
For example, the mobile terminal in the embodiment of the present application may include mobile devices such as a mobile phone, a tablet computer, and a camera.
In the embodiment of the application, a photographing function for people snapshot can be added in the mobile terminal, and when the situation that people snapshot events are detected to enter the photographing function is detected, people snapshot events are considered to be triggered. For example, the character capture function may be entered under active triggering by the user. For example, a switch icon corresponding to a character snapshot mode is added to an interface of a camera application, and when a user clicks the switch icon, a character snapshot function is entered. For example, the mobile terminal may also automatically detect a current shooting scene, and automatically enter the character capturing function when the character capturing function is satisfied.
When people are shot by using the mobile terminal, the shot people can change the postures at any time, and the postures which the users want to shoot can be passed and cannot be easily shot. For example, if the subject person is in motion, such as playing basketball, the user may want to capture a certain instantaneous posture during a jump shot or an accelerated break, and the motion of the subject person is continuously and rapidly changed, so that it is difficult to capture the desired instantaneous posture. In the embodiment of the application, before shooting, the gesture to be shot, namely the target gesture, can be determined.
For example, a plurality of gestures may be preset in the mobile terminal, and the gestures may be ideal gestures or optimal gestures determined in advance by investigating aesthetic requirements of a specified user group (such as a certain number of common users, common users of a certain age group, a human photographer or a sports photographer, and the like), or ideal gestures or optimal gestures determined by collecting shooting habits or shooting preferences of users. These gestures may be stored in the mobile terminal in the form of a gesture name (e.g., a jump shot), a gesture code, a gesture diagram, or a photographic proof.
For example, when determining the target posture, the user may perform an autonomous selection according to the current shooting requirement, or the target posture may be automatically determined by the mobile terminal. The target gesture may be one or more, and the embodiment of the present application is not limited.
And 102, identifying key points of a human body of the target person in the preview image to obtain corresponding key point information of the human body.
For example, when the person photographing is performed, the mobile terminal may automatically recognize the person included in the preview image. When only one person is recognized, the person can be automatically determined as a target person; when a plurality of persons are identified, one of the target persons can be selected by the user, or the target person can be automatically determined by the mobile terminal according to a preset person selection rule. The preset person selection rule may be, for example, to determine the person with the largest display ratio in the preview image as the target person, or to determine the person at the center of the preview image as the target person, or the like.
In the embodiment of the present application, the human body key points may also be referred to as human body key feature points, and may include human body skeleton key points or human body joint key points, such as a nose, a neck, a right shoulder, a right elbow, a right wrist, a left shoulder, a left elbow, a left wrist, a right hip, a right knee, a right ankle, a left hip, a left knee, a left ankle, a left eye, a right eye, a left ear, a right ear, and the like, or some key points therein. For example, a human body gesture algorithm, such as an openpos technique or other similar techniques, may be used to identify the human body key points, which is not limited in the embodiment of the present application.
For example, after the human body key point identification is performed, corresponding human body key point information may be obtained. The human body key point information may include, for example, coordinate data information of the human body key points; the distance, the azimuth relation and the included angle of the connecting line among all the human body key points can be further included; the method can also comprise the angle and position relation and the like of a certain human body key point relative to a reference point.
And 103, matching the obtained human body key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement.
Wherein the target standard model corresponds to the target pose, and the target standard model comprises a model constructed based on human body key points.
For example, a standard model corresponding to each gesture may be stored in a local or background server of the mobile terminal, and the standard model may describe the optimal gesture based on the key points of the human body. When the character in the current preview image is required to be judged whether to accord with the target posture, the standard model corresponding to the target posture can be obtained and is used for matching with the obtained human body key point information.
Illustratively, when the obtained human body key point information is matched with the target standard model, similarity comparison can be carried out to obtain corresponding matching degree, when the matching degree is greater than a preset matching degree threshold value, a matching result is considered to meet a preset requirement, a preview image is considered to meet the snapshot requirement of a user, and a snapshot corresponding to the target posture is generated according to the preview image.
According to the photographing method provided by the embodiment of the application, when a character snapshot event is triggered, the target posture is determined, human key point identification is carried out on a target character in a preview image, corresponding human key point information is obtained, the obtained human key point information is matched with a target standard model, and when a matching result meets a preset requirement, a snapshot corresponding to the target posture is generated according to the preview image, wherein the target standard model corresponds to the target posture and comprises a model constructed based on the human key points. By adopting the technical scheme, the figure snapshot function can be added in the mobile terminal, the standard posture in the preview image is accurately identified based on the human key points, so that automatic snapshot is realized, and the shooting function of the mobile terminal is enriched.
In some embodiments, the preview image includes a plurality; the method for identifying the key points of the target character in the preview image to obtain the corresponding key point information of the human body comprises the following steps: and for each preview image in the plurality of preview images, identifying the key points of the human body of the target person in the current preview image to obtain the key point information of the human body corresponding to the current preview image. Matching the obtained human body key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, wherein the snapshot comprises the following steps: for each preview image in the plurality of preview images, matching the human key point information corresponding to the current preview image with a target standard model to obtain the matching degree corresponding to the current preview image; sorting the matching degrees corresponding to the plurality of preview images respectively, and determining a preset number of preview images with higher matching degrees as target preview images; and generating a snapshot corresponding to the target posture according to the target preview image. The advantage that sets up like this lies in, can track the human gesture of detection shot personage in real time under the preview state, knows the change state of human key point, then matches with the target standard model respectively, picks out the preview image that a certain amount is the most close to optimum gesture, and regeneration becomes many candid photograph, can supply the user to select, and convenience of customers picks out the most satisfied candid photograph. The preset number may be recorded as N, where N may be set by default or set by the user, for example, N is 3 sheets.
In some embodiments, the determining the target pose when the human capture event is triggered comprises: and when the fact that the character snapshot event is triggered is detected, determining the target posture according to snapshot setting information input by a user. The advantage of setting up like this lies in, can be by the autonomic target gesture of user for the target gesture more conforms to the user demand of taking a candid photograph under the current situation. For example, a plurality of snapshot modes, such as a basketball mode, a soccer mode, a beach mode, a running mode, a golf mode, and the like, may be set in the mobile terminal, and the user may select a snapshot mode that corresponds to the current scene. Subsequently, after determining the snap-shot mode, the user may also continue to select the target pose. Optionally, the snapshot setting information includes snapshot mode selection information and target posture selection information.
In some embodiments, the determining the target pose when the human capture event is triggered comprises: and when the fact that the figure snapshot event is triggered is detected, recognizing the current shooting scene, and determining the corresponding target posture according to the recognition result. The method has the advantages that the scene recognition can be automatically carried out by the mobile terminal, the corresponding target posture is determined, the user operation is saved, and the snapshot efficiency is improved. Optionally, the mobile terminal may detect the shot content in the preview picture in real time, determine which scene belongs to, further determine a corresponding snapshot mode, and determine the gesture in the snapshot mode as the target gesture. Optionally, after the snapshot mode is determined according to the scene recognition result, all the gestures corresponding to the determined snapshot mode may also be presented to the user for selection by the user, so that the selection range of the user may be reduced under the condition of considering the personal desire of the user, and the target gesture may be determined more quickly and accurately.
In some embodiments, the determining the target pose when the human capture event is triggered comprises: and identifying the shooting scene, triggering a character snapshot event if the shooting scene is determined to be in accordance with the character snapshot scene according to the identification result, and determining the corresponding target posture according to the identification result. The mobile terminal has the advantages that the mobile terminal can automatically trigger the people snapshot event, active operation of a user is reduced, and the mobile terminal is more intelligent. For example, after a user opens a camera application, the user enters a shooting preview state, the mobile terminal detects shooting contents in a preview picture in real time, if the current scene is judged to belong to a character snapshot scene, and if the shooting contents are characters in motion, a corresponding snapshot mode can be automatically determined according to the motion conditions of the characters, the surrounding environment (such as a basketball court, a football court, a beach or a golf course) or objects (such as a basketball, a football, a volleyball and a golf club), and then the corresponding target posture is automatically determined.
In some embodiments, before determining the target pose when the detection of the human capture event is triggered, the method further comprises: acquiring an image sample set corresponding to the first posture; identifying human key points of people contained in the image sample set to obtain sample human key point information; and performing model training by using the sample human body key point information based on a preset machine learning method to obtain a standard model corresponding to the first posture. The method has the advantages that some pictures meeting the requirements of the optimal posture can be screened out firstly, and model training is carried out by utilizing the screened image sample set based on a machine learning method, so that the obtained standard model can describe the optimal posture more accurately. The preset machine learning method may be a deep learning method, and may be OpenPose, for example.
Optionally, the process of model training may also be performed in a server, and then the server issues the trained standard model to the mobile terminal. The method has the advantages that the computing resources of the mobile terminal are saved, and the model with complex posture is convenient to train.
In some embodiments, before determining the target pose when the detection of the human capture event is triggered, the method further comprises: acquiring an example picture corresponding to a second gesture input by a user; identifying human key points of people in the example pictures to obtain corresponding example human key point information; and generating a standard model corresponding to the second posture according to the example human body key point information. The method has the advantages that the user can be supported to customize a standard model for a certain gesture, and gesture types and the corresponding standard model in the mobile terminal are enriched. An example picture may be one or more, typically one. By identifying the human key points in the example picture and constructing the standard model according to the human key point information obtained by identification, the standard model can be simply and quickly obtained, and the generation efficiency of the standard model is improved.
Optionally, the example pictures include album pictures, pictures acquired through a network, or currently-taken pictures. The advantage of this arrangement is that the source of the example picture can be enriched and the flexibility of obtaining the example picture can be improved. For example, a user may find a picture containing a satisfactory gesture from pictures stored in an album of the mobile terminal, where the picture may be a picture that the user has taken, may be downloaded from a network, or may be sent to the user by another person; the user can browse the pictures containing the satisfied postures through the network and directly build the standard model after downloading; the user may also take a picture of a book or a magazine, or a picture taken by a photographer in the field, that is, the mobile terminal takes a picture of a book or a magazine, or a picture taken by a photographer under the operation of the user, as an example picture.
Fig. 2 is a schematic flowchart of another photographing method provided in an embodiment of the present application, where the method includes the following steps:
step 201, opening a camera application program, and entering a shooting preview state.
Step 202, when the fact that the people snapshot option is triggered is detected, a target snapshot mode set by a user is received.
For example, a character capture option button may be added to the shooting preview interface of the camera, and when the user wants to enter the character capture function, the user clicks the button to trigger a character capture event. Subsequently, a snapshot mode selection interface may be displayed, providing the snapshot modes supported in the mobile terminal for selection by the user.
For example, a friend of a user performs basketball training in a basketball court, the user wants to snapshot the action of the friend, then a character snapshot button can be clicked, the mobile terminal opens a character snapshot function, and the user selects a basketball mode from a snapshot mode selection interface.
And step 203, providing the candidate gesture corresponding to the target snapshot mode to the user.
For example, the candidate poses for the basketball mode may include jumping shots, speeding breaks, dribbling, capping, and dunking, among others. The names of the candidate gestures, the gesture schematic diagrams or the shooting samples can be displayed, and the user can conveniently select the candidate gestures.
And step 204, determining a target gesture from the candidate gestures according to the selection operation of the user.
For example, if the user wants to capture the action of the friend when shooting, the user can click the jump shooting in the gesture selection interface corresponding to the basketball mode, and then the target gesture is determined to be the jump shooting.
Step 205, acquiring a plurality of preview images in real time.
The user holds the mobile terminal, the camera is aimed at the friend, and the mobile terminal can acquire the preview image in real time by using the camera.
And step 206, for each preview image in the plurality of preview images, performing human key point identification on the target character in the current preview image to obtain human key point information corresponding to the current preview image.
For example, the openpos technology may be used to perform human key point recognition on the target person in each preview image. OpenPose is a technology which is introduced by university of kaki-meilong perception and calculation laboratories and can read human body languages, and can identify and mark the parts of body characteristics by using a key point detection module, help a body tracking algorithm to know the performance of each posture at different angles, and present the body in the form of a 3D color matchmaker. The human body key point information in the embodiment of the application can comprise coordinate data information of the human body key points, and can reflect the relative positions of all joints of the human body, so that the posture of the human body is described.
And step 207, acquiring a target standard model corresponding to the target posture.
Illustratively, the standard models corresponding to different postures can be obtained in advance through model training, and the process can be completed in the mobile terminal or the server. The standard models corresponding to different postures can be stored in the mobile terminal or the server and acquired from corresponding equipment when needed. In the embodiment of the application, in order to ensure timeliness of obtaining the target standard model, the standard model corresponding to each posture can be stored in the mobile terminal.
Illustratively, before step 201, the method may further include: the method comprises the steps of obtaining an image sample set corresponding to a first posture, carrying out human body key point identification on characters contained in the image sample set to obtain sample human body key point information, and carrying out model training by utilizing the sample human body key point information based on an OpenPose method to obtain a standard model corresponding to the first posture. The first posture can be any posture needing to be provided with a standard model, and the standard model corresponding to all postures can be obtained by adopting the method.
And 208, matching the human key point information corresponding to the current preview image with the target standard model to obtain the matching degree corresponding to the current preview image for each preview image in the plurality of preview images.
Illustratively, the human body key point information and the target standard model can be matched by adopting a key point registration method, the similarity is calculated, and the similarity is used as the matching degree.
And 209, when the fact that the figure snapshot quit option is triggered is detected, sorting the matching degrees corresponding to the preview images respectively, and determining the preset number of preview images with higher matching degrees as target preview images.
Illustratively, before the character capturing function is not closed, the mobile terminal can continuously acquire the images and calculate the corresponding matching degree, so as to avoid missing the images meeting the requirements. And when the character snapshot quitting option is triggered, quitting the character snapshot mode, sequencing the matching degrees corresponding to the preview images, and selecting the top N (such as 3) optimal (namely the top matching degree) preview images as the target preview images.
And step 210, generating a snapshot corresponding to the target posture according to the target preview image.
And step 211, displaying the snap photos, determining target photos according to selection operations of the user aiming at the snap photos, and storing the target photos in an album.
Illustratively, the snapshot not selected by the user may be deleted to save the storage space of the mobile terminal.
According to the photographing method provided by the embodiment of the application, the character snapshot function can be opened according to the setting of the user in the photographing preview state, the target gesture which the user wants to snapshot is determined, the human key points in the preview pictures are automatically tracked and identified, and the standard models corresponding to the target gesture are matched, so that the preview pictures closest to the target gesture are screened out, the photos are generated, the automatic snapshot of the character gesture is realized, the user operation is saved, and the snapshot requirements of the user are met.
Fig. 3 is a schematic flowchart of another photographing method provided in the embodiment of the present application, and as shown in fig. 3, the method includes:
step 301, acquiring a gesture name and a corresponding example picture input by a user.
For example, when a user sees a snapshot taken by a photographer, the user wants to shoot the same gesture through the mobile terminal, and the snapshot taken by the photographer can be photographed through the mobile terminal. Before taking a picture, the gestures in the picture can be named, so that the mobile terminal can subsequently establish the corresponding relation between the gestures and the corresponding standard model.
Step 302, performing human key point identification on the people in the example picture to obtain corresponding example human key point information.
Illustratively, the openpos technology may be utilized for human keypoint identification of people in the example pictures.
And 303, generating a standard model corresponding to the posture name according to the example human body key point information, and storing the standard model and the corresponding relation between the standard model and the posture name into a standard posture library in the mobile terminal.
And step 304, opening the camera application program and entering a shooting preview state.
And 305, recognizing the shooting scene, triggering a character snapshot event if the shooting scene is determined to be in accordance with the character snapshot scene according to the recognition result, and determining the corresponding target posture according to the recognition result.
For example, after a user opens a camera application, the user enters a shooting preview state, the mobile terminal detects shooting contents in a preview picture in real time, if the current scene is judged to belong to a character snapshot scene, and if the shooting contents are characters in motion, a corresponding snapshot mode can be automatically determined according to the motion conditions of the characters, the surrounding environment (such as a basketball court, a football court, a beach or a golf course) or objects (such as a basketball, a football, a volleyball and a golf club), and then the corresponding target posture is automatically determined.
Step 306, acquiring a plurality of preview images in real time.
And 307, for each preview image in the plurality of preview images, performing human key point identification on the target character in the current preview image to obtain human key point information corresponding to the current preview image.
And 308, acquiring a target standard model corresponding to the target posture from a standard posture library of the mobile terminal.
Step 309, for each preview image in the plurality of preview images, matching the human body key point information corresponding to the current preview image with the target standard model to obtain the matching degree corresponding to the current preview image.
And 310, sequencing the matching degrees corresponding to the plurality of preview images respectively, and determining a preset number of preview images with higher matching degrees as target preview images.
And 311, generating a snapshot corresponding to the target posture according to the target preview image.
And step 312, displaying the snap photos, determining target photos according to selection operations of the user on the snap photos, and storing the target photos in an album.
The photographing method provided by the embodiment of the application can support a user to define a standard model for a certain gesture, enrich gesture types and the corresponding standard models in the mobile terminal, automatically recognize a snapshot scene in a shooting preview state, determine the corresponding target gesture according to a recognition result, automatically track and recognize key points of human bodies in a plurality of preview pictures and match the standard model corresponding to the target gesture, screen out the preview pictures closest to the target gesture and generate photos, realize automatic snapshot of the character gesture, save user operation and improve the snapshot efficiency and accuracy of the mobile terminal.
Fig. 4 is a block diagram of a photographing apparatus according to an embodiment of the present disclosure, where the photographing apparatus may be implemented by software and/or hardware, and is generally integrated in a terminal, and can perform a snapshot by executing a photographing method. As shown in fig. 4, the apparatus includes:
a target posture determination module 401, configured to determine a target posture when it is detected that a human snapshot event is triggered;
a human key point recognition module 402, configured to perform human key point recognition on a target person in the preview image to obtain corresponding human key point information;
and a snapshot generating module 403, configured to match the obtained human key point information with a target standard model, and generate a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, where the target standard model corresponds to the target posture, and the target standard model includes a model constructed based on human key points.
The photographing device provided in the embodiment of the application determines a target posture when detecting that a character snapshot event is triggered, performs human key point recognition on a target character in a preview image to obtain corresponding human key point information, matches the obtained human key point information with a target standard model, and generates a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, wherein the target standard model corresponds to the target posture and comprises a model constructed based on human key points. By adopting the technical scheme, the figure snapshot function can be added in the mobile terminal, the standard posture in the preview image is accurately identified based on the human key points, so that automatic snapshot is realized, and the shooting function of the mobile terminal is enriched.
Optionally, the preview image includes a plurality of images;
the method for identifying the key points of the target character in the preview image to obtain the corresponding key point information of the human body comprises the following steps:
for each preview image in the plurality of preview images, identifying human key points of a target character in the current preview image to obtain human key point information corresponding to the current preview image;
matching the obtained human body key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, wherein the snapshot comprises the following steps:
for each preview image in the plurality of preview images, matching the human key point information corresponding to the current preview image with a target standard model to obtain the matching degree corresponding to the current preview image;
sorting the matching degrees corresponding to the plurality of preview images respectively, and determining a preset number of preview images with higher matching degrees as target preview images;
and generating a snapshot corresponding to the target posture according to the target preview image.
Optionally, when the event of capturing the image of the person is triggered, determining the target posture includes:
when the fact that a character snapshot event is triggered is detected, determining a target posture according to snapshot setting information input by a user; or the like, or, alternatively,
when the fact that a character snapshot event is triggered is detected, recognizing a current shooting scene, and determining a corresponding target posture according to a recognition result; or the like, or, alternatively,
and identifying the shooting scene, triggering a character snapshot event if the shooting scene is determined to be in accordance with the character snapshot scene according to the identification result, and determining the corresponding target posture according to the identification result.
Optionally, the apparatus further comprises:
the image sample set acquisition module is used for acquiring an image sample set corresponding to a first posture before determining a target posture when the character snapshot event is triggered;
the first key point identification module is used for identifying human key points of people contained in the image sample set to obtain sample human key point information;
and the model training module is used for performing model training by using the sample human body key point information based on a preset machine learning method to obtain a standard model corresponding to the first posture.
Optionally, the apparatus further comprises:
the example image acquisition module is used for acquiring an example image corresponding to a second gesture input by a user before determining a target gesture when the character snapshot event is triggered;
the second key point identification module is used for identifying human key points of people in the example picture to obtain corresponding example human key point information;
and the model generation module is used for generating a standard model corresponding to the second posture according to the example human body key point information.
Optionally, the example pictures include album pictures, pictures acquired through a network, or currently-taken pictures.
Optionally, an openpos technique is used to identify the human key points, where the human key point information includes coordinate data information of the human key points.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method of taking a picture, the method including:
when the fact that a character snapshot event is triggered is detected, determining a target posture;
identifying key points of a target figure in the preview image to obtain corresponding key point information of the human body;
and matching the obtained human key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, wherein the target standard model corresponds to the target posture, and the target standard model comprises a model constructed based on human key points.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDRRAM, SRAM, EDORAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application and containing the computer-executable instructions is not limited to the photographing operation described above, and may also perform related operations in the photographing method provided in any embodiment of the present application.
The embodiment of the application provides a mobile terminal, and the photographing device provided by the embodiment of the application can be integrated in the mobile terminal. Fig. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. The mobile terminal 500 may include: the system comprises a memory 501, a processor 502 and a computer program stored on the memory 501 and capable of being executed by the processor, wherein the processor 502 executes the computer program to realize the photographing method according to the embodiment of the application.
The mobile terminal provided by the embodiment of the application can be added with a character snapshot function in the mobile terminal, and the standard posture in the preview image is accurately identified based on the human key points, so that automatic snapshot is realized, and the shooting function of the mobile terminal is enriched.
Fig. 6 is a schematic structural diagram of another mobile terminal provided in an embodiment of the present application, where the mobile terminal may include: a housing (not shown), a memory 601, a Central Processing Unit (CPU) 602 (also called a processor, hereinafter referred to as CPU), a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU602 and the memory 601 are disposed on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the mobile terminal; the memory 601 is used for storing executable program codes; the CPU602 executes a computer program corresponding to the executable program code by reading the executable program code stored in the memory 601 to implement the steps of:
when the fact that a character snapshot event is triggered is detected, determining a target posture;
identifying key points of a target figure in the preview image to obtain corresponding key point information of the human body;
and matching the obtained human key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, wherein the target standard model corresponds to the target posture, and the target standard model comprises a model constructed based on human key points.
The mobile terminal further includes: peripheral interface 603, RF (Radio Frequency) circuitry 605, audio circuitry 606, speakers 611, power management chip 608, input/output (I/O) subsystem 609, other input/control devices 610, touch screen 612, other input/control devices 610, and external port 604, which communicate via one or more communication buses or signal lines 607.
It should be understood that the illustrated mobile terminal 600 is merely one example of a mobile terminal and that the mobile terminal 600 may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes the mobile terminal for taking a picture provided in this embodiment in detail, and the mobile terminal is a mobile phone as an example.
A memory 601, the memory 601 being accessible by the CPU602, the peripheral interface 603, and the like, the memory 601 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 603, said peripheral interface 603 may connect input and output peripherals of the device to the CPU602 and the memory 601.
An I/O subsystem 609, the I/O subsystem 609 may connect input and output peripherals on the device, such as a touch screen 612 and other input/control devices 610, to the peripheral interface 603. The I/O subsystem 609 may include a display controller 6091 and one or more input controllers 6092 for controlling other input/control devices 610. Where one or more input controllers 6092 receive electrical signals from or transmit electrical signals to other input/control devices 610, the other input/control devices 610 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 6092 may be connected to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 612, which touch screen 612 is an input interface and an output interface between the user's mobile terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 6091 in the I/O subsystem 609 receives electrical signals from the touch screen 612 or transmits electrical signals to the touch screen 612. The touch screen 612 detects a contact on the touch screen, and the display controller 6091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 612, that is, to implement a human-computer interaction, where the user interface object displayed on the touch screen 612 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 605 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, RF circuitry 605 receives and transmits RF signals, also referred to as electromagnetic signals, through which RF circuitry 605 converts electrical signals to or from electromagnetic signals and communicates with a communication network and other devices. RF circuitry 605 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 606 is mainly used to receive audio data from the peripheral interface 603, convert the audio data into an electric signal, and transmit the electric signal to the speaker 611.
The speaker 611 is used to convert the voice signal received by the handset from the wireless network through the RF circuit 605 into sound and play the sound to the user.
And a power management chip 608 for supplying power and managing power to the hardware connected to the CPU602, the I/O subsystem, and the peripheral interface.
The photographing device, the storage medium and the mobile terminal provided in the above embodiments can execute the photographing method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. Technical details that are not described in detail in the above embodiments can be referred to a photographing method provided in any embodiments of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (5)

1. A method of taking a picture, comprising:
acquiring a gesture name input by a user and a corresponding example picture;
identifying human key points of people in the example picture by utilizing an OpenPose technology to obtain corresponding example human key point information; the human body key point information comprises coordinate data information of human body key points, distances, orientation relations and connecting line included angles among the human body key points, and the angles and position relations of other human body key points relative to a certain human body key point serving as a reference point;
generating a standard model corresponding to the posture name according to example human body key point information, and storing the standard model and the corresponding relation between the standard model and the posture name into a standard posture library in the mobile terminal;
detecting shooting contents in a preview picture in real time in a shooting preview state;
if the shooting content is a moving person, detecting that a person snapshot event is triggered, and determining a corresponding snapshot mode according to the movement condition of the person, the surrounding environment or the object;
providing the candidate gesture corresponding to the snapshot mode to a user in a form of shooting a sample, and determining a target gesture from the candidate gestures according to the selection operation of the user;
identifying key points of a target figure in the preview image by utilizing an OpenPose technology to obtain corresponding key point information of the human body, wherein the target figure is automatically determined according to a preset figure selection rule, and the preset figure selection rule is used for determining the figure occupying the largest display proportion in the preview image as the target figure;
acquiring a target standard model corresponding to the target posture from the standard posture library;
matching the obtained human body key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement;
the method for recognizing the key points of the target character in the preview image to obtain the corresponding key point information of the human body comprises the following steps:
for each preview image in the plurality of preview images, identifying human key points of a target character in the current preview image to obtain human key point information corresponding to the current preview image;
matching the obtained human body key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, wherein the snapshot comprises the following steps:
for each preview image in the plurality of preview images, matching the human key point information corresponding to the current preview image with a target standard model to obtain the matching degree corresponding to the current preview image;
sorting the matching degrees corresponding to the plurality of preview images respectively, and determining a preset number of preview images with higher matching degrees as target preview images;
and generating a snapshot corresponding to the target posture according to the target preview image.
2. The method of claim 1, wherein the example picture comprises an album picture, a picture taken over a network, or a currently taken picture.
3. A photographing apparatus, comprising:
the target posture determining module is used for acquiring a posture name input by a user and a corresponding example picture; identifying human key points of people in the example picture by utilizing an OpenPose technology to obtain corresponding example human key point information; the human body key point information comprises coordinate data information of human body key points, distances, orientation relations and connecting line included angles among the human body key points, and the angles and position relations of other human body key points relative to a certain human body key point serving as a reference point; generating a standard model corresponding to the posture name according to example human body key point information, and storing the standard model and the corresponding relation between the standard model and the posture name into a standard posture library in the mobile terminal; detecting shot contents in a preview picture in real time in a shot preview state, if the shot contents are moving characters, detecting that a character snapshot event is triggered, determining a corresponding snapshot mode according to the motion condition of the characters, the surrounding environment or objects, providing candidate postures corresponding to the snapshot mode to a user in a shot specimen form, and determining a target posture from the candidate postures according to the selection operation of the user;
the human body key point identification module is used for identifying human body key points of a target person in the preview image by utilizing an OpenPose technology to obtain corresponding human body key point information, wherein the target person is automatically determined according to a preset person selection rule, and the preset person selection rule is used for determining the person occupying the largest display proportion in the preview image as the target person;
the snapshot generating module is used for acquiring a target standard model corresponding to the target posture from the standard posture library, matching the acquired human body key point information with the target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement;
the method for recognizing the key points of the target character in the preview image to obtain the corresponding key point information of the human body comprises the following steps:
for each preview image in the plurality of preview images, identifying human key points of a target character in the current preview image to obtain human key point information corresponding to the current preview image;
matching the obtained human body key point information with a target standard model, and generating a snapshot corresponding to the target posture according to the preview image when a matching result meets a preset requirement, wherein the snapshot comprises the following steps:
for each preview image in the plurality of preview images, matching the human key point information corresponding to the current preview image with a target standard model to obtain the matching degree corresponding to the current preview image;
sorting the matching degrees corresponding to the plurality of preview images respectively, and determining a preset number of preview images with higher matching degrees as target preview images;
and generating a snapshot corresponding to the target posture according to the target preview image.
4. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the photographing method according to any one of claims 1-2.
5. A mobile terminal, characterized in that it comprises a memory, a processor and a computer program stored on the memory and executable on the processor, said processor implementing the photographing method according to any one of claims 1-2 when executing said computer program.
CN201811377410.2A 2018-11-19 2018-11-19 Photographing method, photographing device, storage medium and mobile terminal Active CN109194879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811377410.2A CN109194879B (en) 2018-11-19 2018-11-19 Photographing method, photographing device, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811377410.2A CN109194879B (en) 2018-11-19 2018-11-19 Photographing method, photographing device, storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN109194879A CN109194879A (en) 2019-01-11
CN109194879B true CN109194879B (en) 2021-09-07

Family

ID=64939915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811377410.2A Active CN109194879B (en) 2018-11-19 2018-11-19 Photographing method, photographing device, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN109194879B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110113523A (en) * 2019-03-15 2019-08-09 深圳壹账通智能科技有限公司 Intelligent photographing method, device, computer equipment and storage medium
CN111787215A (en) * 2019-04-03 2020-10-16 阿里巴巴集团控股有限公司 Shooting method and device, electronic equipment and storage medium
CN110070029B (en) * 2019-04-17 2021-07-16 北京易达图灵科技有限公司 Gait recognition method and device
CN110399794A (en) * 2019-06-20 2019-11-01 平安科技(深圳)有限公司 Gesture recognition method, device, equipment and storage medium based on human body
CN110472476A (en) * 2019-06-24 2019-11-19 平安科技(深圳)有限公司 Attitude matching degree acquisition methods, device, computer and storage medium
CN111182207B (en) * 2019-12-31 2021-08-24 Oppo广东移动通信有限公司 Image shooting method and device, storage medium and electronic equipment
CN113114924A (en) * 2020-01-13 2021-07-13 北京地平线机器人技术研发有限公司 Image shooting method and device, computer readable storage medium and electronic equipment
CN111277752B (en) * 2020-01-22 2021-08-31 Oppo广东移动通信有限公司 Prompting method and device, storage medium and electronic equipment
CN112752016B (en) * 2020-02-14 2023-06-16 腾讯科技(深圳)有限公司 Shooting method, shooting device, computer equipment and storage medium
CN111327828B (en) * 2020-03-06 2021-08-24 Oppo广东移动通信有限公司 Photographing method and device, electronic equipment and storage medium
CN113364971B (en) * 2020-03-07 2023-04-18 华为技术有限公司 Image processing method and device
CN111770268A (en) * 2020-06-23 2020-10-13 维沃移动通信有限公司 Photographing method and device and electronic equipment
CN112487946A (en) * 2020-11-26 2021-03-12 努比亚技术有限公司 Human body moving target removing method and device, mobile terminal and storage medium
CN112511748A (en) * 2020-11-30 2021-03-16 努比亚技术有限公司 Lens target intensified display method and device, mobile terminal and storage medium
CN112843722B (en) * 2020-12-31 2023-05-12 上海米哈游天命科技有限公司 Shooting method, shooting device, shooting equipment and storage medium
CN112906646A (en) * 2021-03-23 2021-06-04 中国联合网络通信集团有限公司 Human body posture detection method and device
CN113395452B (en) * 2021-06-24 2023-02-03 上海卓易科技股份有限公司 Automatic shooting method
CN114519866A (en) * 2022-01-29 2022-05-20 阿里巴巴(中国)有限公司 Method and equipment for acquiring and processing human body measurement data
CN117156260A (en) * 2023-10-30 2023-12-01 荣耀终端有限公司 Photographing method and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107370942A (en) * 2017-06-30 2017-11-21 广东欧珀移动通信有限公司 Photographic method, device, storage medium and terminal
CN108307116A (en) * 2018-02-07 2018-07-20 腾讯科技(深圳)有限公司 Image capturing method, device, computer equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125396B (en) * 2014-06-24 2018-06-08 小米科技有限责任公司 Image capturing method and device
CN105635567A (en) * 2015-12-24 2016-06-01 小米科技有限责任公司 Shooting method and device
CN106202362A (en) * 2016-07-07 2016-12-07 Tcl集团股份有限公司 Image recommendation method and image recommendation device
CN107734251A (en) * 2017-09-29 2018-02-23 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN107622134B (en) * 2017-10-16 2021-02-19 杭州时间线信息科技有限公司 Method for manufacturing automatic design layout type detail page by combining visual identification and artificial intelligence
CN107566529B (en) * 2017-10-18 2020-08-14 维沃移动通信有限公司 Photographing method, mobile terminal and cloud server

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107370942A (en) * 2017-06-30 2017-11-21 广东欧珀移动通信有限公司 Photographic method, device, storage medium and terminal
CN108307116A (en) * 2018-02-07 2018-07-20 腾讯科技(深圳)有限公司 Image capturing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109194879A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN109194879B (en) Photographing method, photographing device, storage medium and mobile terminal
CN108833818B (en) Video recording method, device, terminal and storage medium
US9788065B2 (en) Methods and devices for providing a video
WO2019120032A1 (en) Model construction method, photographing method, device, storage medium, and terminal
CN110222789B (en) Image recognition method and storage medium
CN111726536A (en) Video generation method and device, storage medium and computer equipment
CN110865754B (en) Information display method and device and terminal
CN109348135A (en) Photographic method, device, storage medium and terminal device
CN107635095A (en) Shoot method, apparatus, storage medium and the capture apparatus of photo
CN110650379B (en) Video abstract generation method and device, electronic equipment and storage medium
CN109729372B (en) Live broadcast room switching method, device, terminal, server and storage medium
CN110572716B (en) Multimedia data playing method, device and storage medium
CN111629247B (en) Information display method and device and electronic equipment
CN110933468A (en) Playing method, playing device, electronic equipment and medium
CN113727012A (en) Shooting method and terminal
CN112115282A (en) Question answering method, device, equipment and storage medium based on search
CN112052897A (en) Multimedia data shooting method, device, terminal, server and storage medium
CN108462826A (en) A kind of method and mobile terminal of auxiliary photo-taking
CN111031391A (en) Video dubbing method, device, server, terminal and storage medium
CN109618218A (en) A kind of method for processing video frequency and mobile terminal
CN112511889B (en) Video playing method, device, terminal and storage medium
CN108600609A (en) The method and device of auxiliary photo-taking
CN111611414B (en) Vehicle searching method, device and storage medium
CN112148899A (en) Multimedia recommendation method, device, equipment and storage medium
CN111782950A (en) Sample data set acquisition method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant