[go: up one dir, main page]

CN116320711A - Image shooting method and device - Google Patents

Image shooting method and device Download PDF

Info

Publication number
CN116320711A
CN116320711A CN202111562421.XA CN202111562421A CN116320711A CN 116320711 A CN116320711 A CN 116320711A CN 202111562421 A CN202111562421 A CN 202111562421A CN 116320711 A CN116320711 A CN 116320711A
Authority
CN
China
Prior art keywords
human
gesture
standard
preview image
determining
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.)
Pending
Application number
CN202111562421.XA
Other languages
Chinese (zh)
Inventor
禹星
钟桂林
陆春意
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202111562421.XA priority Critical patent/CN116320711A/en
Publication of CN116320711A publication Critical patent/CN116320711A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The disclosure relates to an image shooting method and device, wherein the method comprises the following steps: in the process of image shooting, setting a posture reference template for a shot object in a preview image, determining human skeleton data of a human posture of the shot object in the preview image, acquiring human standard skeleton data of a standard human posture corresponding to the posture reference template, determining posture similarity between the human posture and the standard human posture according to the human skeleton data and the human standard skeleton data, and triggering a shooting instruction by the user under the condition that the posture similarity is greater than or equal to a preset similarity threshold value so as to store the preview image. Therefore, under the condition that the human body posture in the preview image is matched with the standard human body posture in the posture reference template, the shooting instruction is automatically triggered, and the image of the shot object in the specific posture can be timely obtained, so that the expected shooting effect is achieved, and the shooting experience of a user is improved.

Description

Image shooting method and device
Technical Field
The disclosure relates to the field of computer technology, and in particular, to an image capturing method and device.
Background
Photographing is an important way for people to record life, and terminal devices such as mobile phones, tablet computers and cameras have become an indispensable part of life, so that people often use the terminal devices to perform image photographing. When a user shoots by using a terminal device, the user often has diversified shooting requirements.
In order to take a satisfactory posture, the user needs to take a plurality of times, and needs to manually select among a plurality of photos, so that the photographing experience of the user is not ideal.
Disclosure of Invention
The disclosure provides an image shooting method and device.
In a first aspect of embodiments of the present disclosure, there is provided an image capturing method, including: acquiring a preview image, and setting a gesture reference template for a shot object in the preview image; determining human skeleton data of the human body posture of the shot object in the preview image; acquiring human body standard skeleton data of a standard human body posture corresponding to the posture reference template; determining the posture similarity between the human body posture and the standard human body posture according to the human body skeleton data and the human body standard skeleton data; and triggering a shooting instruction and storing the preview image under the condition that the gesture similarity is greater than or equal to a preset similarity threshold value.
In a second aspect of the embodiments of the present disclosure, there is also provided an image capturing apparatus, including: the first acquisition module is used for acquiring a preview image and setting a gesture reference template for a shot object in the preview image; the first determining module is used for determining human skeleton data of the human body posture of the shot object in the preview image; the second acquisition module is used for acquiring human body standard skeleton data of the standard human body posture corresponding to the posture reference template; the second determining module is used for determining the gesture similarity between the human gesture and the standard human gesture according to the human skeleton data and the human standard skeleton data; and the shooting module is used for triggering a shooting instruction and storing the preview image under the condition that the gesture similarity is greater than or equal to a preset similarity threshold value.
In a third aspect of the embodiments of the present disclosure, there is also provided an electronic device, including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the image capturing method as described above.
In a fourth aspect of embodiments of the present disclosure, there is also provided a non-transitory computer-readable storage medium, which when executed by a processor, causes the processor to perform the image capturing method as described above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the process of image shooting, setting a posture reference template for a shot object in a preview image, determining human skeleton data of a human posture of the shot object in the preview image, acquiring human standard skeleton data of a standard human posture corresponding to the posture reference template, determining posture similarity between the human posture and the standard human posture according to the human skeleton data and the human standard skeleton data, and triggering a shooting instruction by the user under the condition that the posture similarity is greater than or equal to a preset similarity threshold value so as to store the preview image. Therefore, under the condition that the human body posture in the preview image is matched with the standard human body posture in the posture reference template, the shooting instruction is automatically triggered, and the image of the shot object in the specific posture can be timely obtained, so that the expected shooting effect is achieved, and the shooting experience of a user is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
Fig. 1 is a flowchart of an image photographing method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of an image photographing method according to another embodiment of the present disclosure;
fig. 3 is a flowchart of an image photographing method according to another embodiment of the present disclosure;
fig. 4 is a flowchart of an image photographing method according to another embodiment of the present disclosure;
fig. 5 is a schematic structural view of an image photographing device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an image capturing device according to another embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device, according to an exemplary embodiment of the present disclosure.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart of an image photographing method according to an embodiment of the present disclosure. It should be noted that, the image capturing method of the present embodiment is performed by an image capturing apparatus, where the image capturing apparatus may be implemented by software and/or hardware, and the image capturing apparatus may be configured in an electronic device, where the electronic device may include a mobile terminal (such as a mobile phone), a tablet pc, a smart television, an intelligent wearable device, an on-board device, and other hardware devices having an image capturing function.
As shown in fig. 1, the method comprises the steps of:
step 101, acquiring a preview image and setting a gesture reference template for a shot object in the preview image.
In some embodiments, in order to meet the requirement of the user for shooting the corresponding human body gesture, multiple candidate gesture reference templates may be set in the image shooting device, and according to the selection operation of the user, the gesture reference template selected by the user may be determined from the multiple candidate gesture reference templates, and the gesture reference template selected by the user may be used as the gesture reference template corresponding to the shooting object.
Step 102, determining human skeleton data of the human body posture of the photographed object in the preview image.
In some embodiments, an exemplary implementation manner of determining the human skeleton data of the human body pose of the photographed object in the preview image may be: inputting the preview image into a pre-trained human body posture detection model to obtain human skeleton data of the human body posture of the photographed object in the preview image.
The human skeleton data may include skeleton nodes corresponding to N skeleton segments.
The skeletal nodes may include, but are not limited to, right ear skeletal nodes, left ear skeletal nodes, neck skeletal nodes, right shoulder skeletal nodes, left shoulder skeletal nodes, right sternum skeletal nodes, left sternum skeletal nodes, right waist skeletal nodes, left waist skeletal nodes, right hip skeletal nodes, left hip skeletal nodes, right knee skeletal nodes, left knee skeletal nodes, right foot skeletal nodes, left foot skeletal nodes, and the like.
Step 103, acquiring human body standard skeleton data of a standard human body posture corresponding to the posture reference template.
In some embodiments, the human body standard skeleton data of the standard human body posture corresponding to the posture reference template can be obtained in the corresponding relation between the pre-stored posture reference template and the human body standard skeleton data of the standard human body posture.
It should be noted that, the method for acquiring the human body standard skeleton data of the standard human body posture corresponding to the posture reference template in the corresponding relationship may be: and inputting the posture reference template into a pre-trained human body posture detection model so as to determine human body standard skeleton data of a standard human body posture corresponding to the posture reference template through the human body posture detection model.
Wherein the pose reference template may be an image with a standard human pose.
Step 104, determining the gesture similarity between the human gesture and the standard human gesture according to the human skeleton data and the human standard skeleton data.
In some embodiments of the present disclosure, the human bone data includes bone nodes corresponding to N bone segments, and the human standard bone data includes standard bone vectors corresponding to N bone segments, where N is an integer greater than 1.
In order to accurately determine the posture similarity between the human body posture and the standard human body posture, an exemplary embodiment of determining the posture similarity between the human body posture and the standard human body posture according to the human body skeleton data and the human body standard skeleton data is as follows: for each bone segment, determining a bone vector corresponding to the bone segment according to a bone node corresponding to the bone segment; determining an included angle between a bone vector corresponding to the bone segment and a standard bone vector; and determining the gesture similarity between the human gesture and the standard human gesture according to the included angles between the skeleton vectors corresponding to the N skeleton segments and the standard skeleton vectors.
Specifically, the human skeleton similarity between the human body posture and the standard human body posture can be calculated according to the included angles between the skeleton vectors corresponding to the N skeleton segments and the standard skeleton vectors, and the human skeleton similarity is used as the posture similarity between the human body posture and the standard human body posture.
And step 105, triggering a shooting instruction and storing a preview image under the condition that the gesture similarity is greater than or equal to a preset similarity threshold value.
The preset similarity threshold is a preset gesture similarity threshold value in the image shooting device. When the gesture similarity is greater than or equal to a preset similarity threshold, it can be determined that the human body gesture of the shot object in the preview image is matched with the standard human body gesture in the gesture reference template, at this time, a shooting instruction can be automatically triggered, the preview image is captured, and the preview image is saved.
In the image shooting method of the embodiment of the disclosure, in the process of shooting an image, a gesture reference template is set for a shot object in a preview image, human skeleton data of a human gesture of the shot object in the preview image is determined, human standard skeleton data of a standard human gesture corresponding to the gesture reference template is obtained, gesture similarity between the human gesture and the standard human gesture is determined according to the human skeleton data and the human standard skeleton data, and a shooting instruction is triggered by the user to save the preview image under the condition that the gesture similarity is greater than or equal to a preset similarity threshold. Therefore, under the condition that the human body posture in the preview image is matched with the standard human body posture in the posture reference template, the shooting instruction is automatically triggered, and the image of the shot object in the specific posture can be timely obtained, so that the expected shooting effect is achieved, and the shooting experience of a user is improved.
Fig. 2 is a flowchart of an image capturing method according to another embodiment of the present disclosure, which further refines the above-described example.
As shown in fig. 2, the method may include:
step 201, obtaining a preview image and setting a gesture reference template for a photographed object in the preview image.
Step 202, determining human skeleton data of the human body posture of the photographed object in the preview image.
Step 203, acquiring human body standard skeleton data of a standard human body posture corresponding to the posture reference template.
Step 204, determining the gesture similarity between the human gesture and the standard human gesture according to the human skeleton data and the human standard skeleton data.
Step 205, triggering a shooting instruction and storing a preview image under the condition that the gesture similarity is greater than or equal to a preset similarity threshold.
It should be noted that, the specific implementation process of steps 201 to 205 may be referred to the description of the related content in the above embodiment, and will not be repeated here.
Step 206, under the condition that the gesture similarity is smaller than the preset similarity threshold, acquiring target bone segments with included angles larger than the preset included angle threshold from the N bone segments.
Step 207, obtaining a first rotation angle and a first rotation direction of the bone vector of the target bone segment to a standard bone vector of the target bone segment.
Step 208, outputting a first prompt message, where the first prompt message includes: a first rotation angle and a first rotation direction corresponding to the target bone segment.
It can be understood that, in the foregoing manner of outputting the first prompt information by playing and/or displaying the first prompt information through voice, in practical application, the manner of outputting the first prompt information may be preset according to practical requirements, which is not limited in particular.
As an example, in the case of outputting the first prompt information by means of display, the photographer may provide the object with a targeted posture guidance according to the first prompt information displayed in the image capturing apparatus, so that the object may quickly take a professional posture, and further may quickly take a professional photographic effect.
In this embodiment, under the condition that the similarity of the human body posture in the preview image and the standard human body posture in the posture reference template is smaller than the preset similarity threshold, a target bone segment with an included angle larger than the preset included angle threshold is determined, and prompt information for the target bone segment is output, so that targeted guidance is provided, and the photographed object can adjust its posture according to the prompt information.
Fig. 3 is a flowchart of an image photographing method according to another embodiment of the present disclosure.
As shown in fig. 3, the method may include:
step 301, acquiring a preview image, and setting a gesture reference template for a photographed object in the preview image.
In step 302, human skeleton data of a human body posture of a subject in a preview image is determined.
Step 303, acquiring human body standard skeleton data of a standard human body posture corresponding to the posture reference template.
Step 304, determining the gesture similarity between the human gesture and the standard human gesture according to the human skeleton data and the human standard skeleton data.
It should be noted that, the specific implementation process of steps 301 to 304 may be referred to the description of the related content in the above embodiment, and will not be repeated here.
Step 305, determining the ratio of the upper half to the lower half of the photographed object according to the human skeleton data.
In some embodiments, the upper and lower body proportions of the photographed subject may be determined from the cervical iliac node, the left hip iliac node, the right hip iliac node, the left foot bone node, and the right foot bone node in the human skeletal data.
The formula for calculating the upper and lower body ratio Y of the photographed object is as follows:
Y=(D1+D2)/(D3+D4)
wherein D1 represents the distance from the cervical skeletal node to the left hip skeletal node; d2 represents the distance from the cervical skeletal node to the right hip skeletal node; d3 represents the distance from the left hip joint to the left foot bone joint; d4 represents the distance from the right hip joint to the right foot bone joint.
And 306, triggering a shooting instruction and storing a preview image under the condition that the upper and lower body proportion is in an upper and lower body proportion section corresponding to the gesture reference template and the gesture similarity is greater than or equal to a preset similarity threshold value.
In the embodiment, in the process of image shooting, the human body gesture in the preview image is matched with the standard human body gesture in the gesture reference template, and under the condition that the proportion of the upper half body to the lower half body of the shot object in the preview image is in the upper half body proportion interval corresponding to the gesture reference template, the shooting instruction is automatically triggered, so that the image of the shot object in a specific gesture can be timely obtained, the expected shooting effect is achieved, and the shooting experience of a user is improved.
Based on the above embodiment, in order to further improve the photographing effect, in the case that the ratio of the upper body to the lower body is not in the ratio interval of the upper body to the lower body, a connection line between the left hip-bone node and the right hip-bone node may be used as a central axis of the photographed object, and a second steering angle and a second rotating direction required when the preset central axis of the terminal device rotates to be parallel to the central axis of the photographed object may be determined; and outputting second prompt information, wherein the second prompt information comprises a second rotation angle and a second rotation direction corresponding to the terminal equipment.
In this embodiment, in the shooting process, when the ratio of the upper half to the lower half of the shot object in the preview image is not in the upper half to the lower half ratio section corresponding to the gesture reference template, the terminal device is prompted to adjust by the prompting information, so that the upper half to the lower half ratio of the shot object in the shot image is consistent with the upper half to the lower half ratio of the gesture reference template, and the shooting effect is improved.
Based on any one of the above embodiments, in order to accurately determine the gesture similarity between the human body gesture and the standard human body gesture, it may be determined whether the resolution of the gesture reference template is consistent with the resolution of the preview image; in the case that the resolution of the gesture reference template is inconsistent with the resolution of the preview image, the resolution of the gesture reference template is adjusted according to the resolution of the preview image so that the adjusted resolution of the gesture reference template is consistent with the resolution of the preview image. And under the condition that the resolution of the gesture reference template is consistent with the resolution of the preview image, determining gesture similarity between the human gesture and the standard human gesture according to the human skeleton data and the human standard skeleton data.
In order that the technical solution of the present application may be clearly understood, the process of image capturing according to this embodiment will be exemplarily described with reference to fig. 4.
As shown in fig. 4, the method may further include:
in step 401, a preview image is acquired, and a gesture reference template is set for a photographed object in the preview image.
Specifically, a plurality of candidate posture reference templates may be provided in the image capturing apparatus, and a target posture reference template selected from the plurality of candidate posture reference templates is acquired.
In some embodiments, in the case that the number of the photographed objects is plural, a plurality of candidate gesture reference templates corresponding to the number of the photographed objects may be obtained according to the number of the photographed objects, and the target gesture reference template selected by the user may be determined from the plurality of candidate gesture reference templates according to the user selection operation, wherein the number of standard human body gestures in the candidate gesture reference templates and the number of selected standard human body gestures are consistent with the number of the photographed objects.
In other embodiments, in the case where there are a plurality of subjects, a respective corresponding gesture reference template may be set for each subject in the preview image.
As an exemplary embodiment, in a case where a plurality of photographed objects exist in a preview image, for each photographed object, in a case where a trigger operation for an image area where the photographed object exists in the preview image is detected, a plurality of candidate gesture reference templates corresponding to the photographed object may be provided on the preview image, and a target gesture reference template selected by a user may be determined from the plurality of candidate gesture reference templates according to a user selection operation.
The user selection operation may include a long press operation on the corresponding gesture reference template, or double-clicking the corresponding gesture reference template, or the like.
In step 402, in the case that the resolution of the target gesture reference template is not consistent with the resolution of the preview image, the resolution of the target gesture reference template is adjusted so that the adjusted resolution of the target gesture reference template is consistent with the resolution of the preview image.
Step 403, performing human body posture detection on the preview image to obtain human skeleton data of the human body posture of the photographed object in the preview image.
In some embodiments of the present disclosure, the preview image is input into a pre-trained human body posture detection model to perform human body posture detection on the preview image through the human body posture detection model, and human body bone data of the human body posture is determined.
In some embodiments, in determining the human skeleton data of the human body posture of the photographed object in the preview image, the human skeleton data of the human body posture of the photographed object may also be represented in the preview image in a preset manner.
Step 404, determining the gesture similarity between the human gesture and the standard human gesture according to the human skeleton data and the human standard skeleton data of the standard human gesture corresponding to the adjusted gesture reference template.
Step 405, determining the ratio of the upper half to the lower half of the photographed object according to the human skeleton data.
Step 406, determining whether the gesture similarity is greater than or equal to a preset similarity threshold, and if so, executing step 407.
Step 407, outputting a first prompt message, where the first prompt message includes a rotation angle and a rotation direction corresponding to the bone segment.
After outputting the first prompt, the process jumps to step 404.
Step 408, it is determined whether the upper and lower body ratio is within the upper and lower body ratio range corresponding to the gesture reference template, and if not, step 409 is performed.
Step 409, outputting a second prompt message, where the second prompt message includes a rotation direction and a rotation angle of the terminal device.
After outputting the second prompt, the process goes to step 405.
In step 410, when the gesture similarity is greater than or equal to the preset similarity threshold, and the upper and lower body ratio is within the upper and lower body ratio interval corresponding to the gesture reference template, a shooting instruction is triggered, and the preview image is saved.
In the embodiment, in the process of shooting an image, professional guidance is provided for shooting of a user based on the gesture reference template, the human body gesture of the shot object in the preview image is matched with the standard human body gesture corresponding to the gesture reference template, and the proportion of the upper half body to the lower half body of the shot object in the preview image is in the proportion interval of the upper half body and the lower half body corresponding to the gesture reference template, so that shooting is automatically triggered, the image with the same gesture and body proportion as the gesture reference template can be timely acquired, the expected shooting effect is achieved, and the user experience is facilitated to be improved.
Fig. 5 is a schematic structural diagram of an image capturing device according to an embodiment of the present disclosure.
As shown in fig. 5, the image capturing apparatus may include a first acquisition module 501, a first determination module 502, a second acquisition module 503, a second determination module 504, and a capturing module 505, wherein:
the first obtaining module 501 is configured to obtain a preview image, and set a gesture reference template for a photographed object in the preview image.
The first determining module 502 is configured to determine human skeleton data of a human posture of a photographed object in the preview image.
The second obtaining module 503 is configured to obtain human body standard skeleton data of a standard human body posture corresponding to the posture reference template.
The second determining module 504 is configured to determine, according to the human skeleton data and the human standard skeleton data, a posture similarity between the human posture and the standard human posture.
The shooting module 505 is configured to trigger a shooting instruction to save a preview image when the gesture similarity is greater than or equal to a preset similarity threshold.
In one embodiment of the present disclosure, the human skeleton data includes skeleton nodes corresponding to N skeleton segments, the human standard skeleton data includes standard skeleton vectors corresponding to N skeleton segments, where N is an integer greater than 1, and the second determining module 504 is specifically configured to: for each bone segment, determining a bone vector corresponding to the bone segment according to a bone node corresponding to the bone segment; determining an included angle between a bone vector corresponding to the bone segment and a standard bone vector; and determining the gesture similarity between the human gesture and the standard human gesture according to the included angles between the skeleton vectors corresponding to the N skeleton segments and the standard skeleton vectors.
In one embodiment of the present disclosure, the first determining module 502 is specifically configured to: inputting the preview image into a pre-trained human body posture detection model to obtain human skeleton data of the human body posture of the photographed object in the preview image.
In one embodiment of the present disclosure, based on the embodiment of the apparatus shown in fig. 5, as shown in fig. 6, the apparatus may further include:
a third obtaining module 506, configured to obtain, from the N bone segments, a target bone segment having an included angle greater than a preset included angle threshold when the gesture similarity is less than the preset similarity threshold;
a fourth obtaining module 507, configured to obtain a first rotation angle and a first rotation direction from the bone vector of the target bone segment to the standard bone vector of the target bone segment;
the first output module 508 is configured to output a first prompt message, where the first prompt message includes: a first rotation angle and a first rotation direction corresponding to the target bone segment.
In one embodiment of the present disclosure, as shown in fig. 6, the apparatus may further include:
a judging module 509, configured to judge whether the resolution of the gesture reference template is consistent with the resolution of the preview image;
the adjustment module 510 is configured to adjust the resolution of the gesture reference template according to the resolution of the preview image, so that the adjusted resolution of the gesture reference template is consistent with the resolution of the preview image, in the case that the resolution of the gesture reference template is inconsistent with the resolution of the preview image.
In one embodiment of the present disclosure, as shown in fig. 6, the apparatus may further include:
a third determining module 511 for determining the ratio of the upper half to the lower half of the photographed subject according to the human skeleton data;
a fourth determining module 512 is configured to determine that the upper and lower body proportion is in an upper and lower body proportion interval corresponding to the gesture reference template.
In one embodiment of the present disclosure, the human skeletal data includes a left hip joint and a right hip joint, as shown in fig. 6, the apparatus may further include:
a fifth determining module 513, configured to take, as a central axis of the photographed object, a connection line between the left hip joint and the right hip joint if the upper-lower body ratio is not in the upper-lower body ratio range;
a sixth determining module 514, configured to determine a second steering angle and a second rotation direction required when the preset central axis of the terminal device rotates to be parallel to the central axis of the photographed object;
and a second output module 515, configured to output a second prompt message, where the second prompt message includes a second rotation angle and a second rotation direction corresponding to the terminal device.
It should be noted that the foregoing explanation of the embodiment of the image capturing method is also applicable to the image capturing apparatus of this embodiment, and this embodiment is not repeated.
In the image shooting device of the embodiment of the disclosure, in the process of shooting an image, a gesture reference template is set for a shot object in a preview image, human skeleton data of a human gesture of the shot object in the preview image is determined, human standard skeleton data of a standard human gesture corresponding to the gesture reference template is obtained, gesture similarity between the human gesture and the standard human gesture is determined according to the human skeleton data and the human standard skeleton data, and a shooting instruction is triggered by the user to save the preview image under the condition that the gesture similarity is greater than or equal to a preset similarity threshold. Therefore, under the condition that the human body posture in the preview image is matched with the standard human body posture in the posture reference template, the shooting instruction is automatically triggered, and the image of the shot object in the specific posture can be timely obtained, so that the expected shooting effect is achieved, and the shooting experience of a user is improved.
According to a third aspect of embodiments of the present disclosure, there is also provided an electronic device, including: a processor; a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement the image capturing method as above.
In order to implement the above-described embodiments, the present disclosure also proposes a storage medium.
Wherein the instructions in the storage medium, when executed by a processor of the electronic device, enable the electronic device to perform the method as above.
To achieve the above embodiments, the present disclosure also provides a computer program product.
Wherein the computer program product, when executed by a processor of an electronic device, enables the electronic device to perform the method as above.
Fig. 7 is a block diagram of an electronic device, according to an example embodiment. The electronic device shown in fig. 7 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 7, the electronic device 1000 includes a processor 111 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 112 or a program loaded from a Memory 116 into a random access Memory (RAM, random Access Memory) 113. In the RAM 113, various programs and data required for the operation of the electronic apparatus 1000 are also stored. The processor 111, the ROM 112, and the RAM 113 are connected to each other through a bus 114. An Input/Output (I/O) interface 115 is also connected to bus 114.
The following components are connected to the I/O interface 115: a memory 116 including a hard disk and the like; and a communication section 117 including a network interface card such as a local area network (Local Area Network, LAN) card, a modem, or the like, the communication section 117 performing communication processing via a network such as the internet; the drive 118 is also connected to the I/O interface 115 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program embodied on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from the network through the communication section 117. The above-described functions defined in the methods of the present disclosure are performed when the computer program is executed by the processor 111.
In an exemplary embodiment, a storage medium is also provided, such as a memory, comprising instructions executable by the processor 111 of the electronic device 1000 to perform the above-described method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. An image capturing method, the method comprising:
acquiring a preview image, and setting a gesture reference template for a shot object in the preview image;
determining human skeleton data of the human body posture of the shot object in the preview image;
acquiring human body standard skeleton data of a standard human body posture corresponding to the posture reference template;
determining the posture similarity between the human body posture and the standard human body posture according to the human body skeleton data and the human body standard skeleton data;
and triggering a shooting instruction and storing the preview image under the condition that the gesture similarity is greater than or equal to a preset similarity threshold value.
2. The method of claim 1, wherein the human skeletal data comprises skeletal nodes corresponding to N skeletal segments, the human standard skeletal data comprises standard skeletal vectors corresponding to N skeletal segments, wherein N is an integer greater than 1, and determining the pose similarity between the human pose and the standard human pose based on the human skeletal data and the human standard skeletal data comprises:
for each bone segment, determining a bone vector corresponding to the bone segment according to a bone node corresponding to the bone segment;
determining an included angle between a bone vector corresponding to the bone segment and a standard bone vector;
and determining the gesture similarity between the human gesture and the standard human gesture according to the included angles between the skeleton vectors corresponding to the N skeleton segments and the standard skeleton vectors.
3. The method of claim 2, wherein the determining human skeleton data of the human pose of the photographed object in the preview image includes:
and inputting the preview image into a pre-trained human body posture detection model to obtain human skeleton data of the human body posture of the shot object in the preview image.
4. The method of claim 2, wherein the method further comprises:
under the condition that the gesture similarity is smaller than the preset similarity threshold, acquiring target bone segments with included angles larger than a preset included angle threshold from N bone segments;
acquiring a first rotation angle and a first rotation direction from a bone vector of the target bone segment to a standard bone vector of the target bone segment;
outputting first prompt information, wherein the first prompt information comprises: and a first rotation angle and a first rotation direction corresponding to the target bone segment.
5. The method of claim 1, wherein prior to the acquiring the human standard skeletal data of the standard human pose corresponding to the pose reference template, the method further comprises:
judging whether the resolution of the gesture reference template is consistent with the resolution of the preview image;
and under the condition that the resolution of the gesture reference template is inconsistent with the resolution of the preview image, adjusting the resolution of the gesture reference template according to the resolution of the preview image so as to enable the adjusted resolution of the gesture reference template to be consistent with the resolution of the preview image.
6. The method of any one of claims 1-5, wherein the method further comprises:
according to the human skeleton data, determining the proportion of the upper half body to the lower half body of the shot object;
before the triggering shooting instruction and saving the preview image, the method further comprises:
and determining the upper and lower body proportion interval corresponding to the gesture reference template.
7. The method of claim 6, wherein the human skeletal data comprises a left hip joint and a right hip joint, the method further comprising:
when the upper and lower body proportion is not in the upper and lower body proportion section, taking a connecting line of the left hip joint and the right hip joint as a central axis of the shot object;
determining a second steering angle and a second rotating direction required when a preset central axis of the terminal equipment rotates to be parallel to the central axis of the shot object;
outputting second prompt information, wherein the second prompt information comprises a second rotation angle and a second rotation direction corresponding to the terminal equipment.
8. An image capturing apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a preview image and setting a gesture reference template for a shot object in the preview image;
the first determining module is used for determining human skeleton data of the human body posture of the shot object in the preview image;
the second acquisition module is used for acquiring human body standard skeleton data of the standard human body posture corresponding to the posture reference template;
the second determining module is used for determining the gesture similarity between the human gesture and the standard human gesture according to the human skeleton data and the human standard skeleton data;
and the shooting module is used for triggering a shooting instruction and storing the preview image under the condition that the gesture similarity is greater than or equal to a preset similarity threshold value.
9. The apparatus of claim 8, wherein the human skeletal data comprises skeletal nodes corresponding to N skeletal segments, the human standard skeletal data comprises standard skeletal vectors corresponding to N skeletal segments, wherein N is an integer greater than 1, and the second determining module is specifically configured to:
for each bone segment, determining a bone vector corresponding to the bone segment according to a bone node corresponding to the bone segment;
determining an included angle between a bone vector corresponding to the bone segment and a standard bone vector;
and determining the gesture similarity between the human gesture and the standard human gesture according to the included angles between the skeleton vectors corresponding to the N skeleton segments and the standard skeleton vectors.
10. The apparatus of claim 9, wherein the first determining module is specifically configured to:
and inputting the preview image into a pre-trained human body posture detection model to obtain human skeleton data of the human body posture of the shot object in the preview image.
11. The apparatus of claim 9, wherein the apparatus further comprises:
the third acquisition module is used for acquiring target bone segments with included angles larger than a preset included angle threshold value from N bone segments under the condition that the gesture similarity is smaller than the preset similarity threshold value;
a fourth acquisition module for acquiring a first rotation angle and a first rotation direction of a bone vector of the target bone segment to a standard bone vector of the target bone segment;
the first output module is used for outputting first prompt information, wherein the first prompt information comprises: and a first rotation angle and a first rotation direction corresponding to the target bone segment.
12. The apparatus of claim 8, wherein the apparatus further comprises:
the judging module is used for judging whether the resolution of the gesture reference template is consistent with the resolution of the preview image;
and the adjusting module is used for adjusting the resolution of the gesture reference template according to the resolution of the preview image under the condition that the resolution of the gesture reference template is inconsistent with the resolution of the preview image, so that the adjusted resolution of the gesture reference template is consistent with the resolution of the preview image.
13. The apparatus of any one of claims 8-12, wherein the apparatus further comprises:
the third determining module is used for determining the proportion of the upper half body to the lower half body of the shot object according to the human skeleton data;
and the fourth determining module is used for determining that the upper and lower body proportion is in an upper and lower body proportion interval corresponding to the gesture reference template.
14. The apparatus of claim 13, wherein the human skeletal data comprises a left hip joint and a right hip joint, the apparatus further comprising:
a fifth determining module, configured to use, when the ratio of the upper body to the lower body is not in the ratio interval of the upper body to the lower body, a connection line between the left hip joint and the right hip joint as a central axis of the photographed object;
a sixth determining module, configured to determine a second steering angle and a second rotation direction required when a preset central axis of the terminal device rotates to be parallel to a central axis of the object to be shot;
the second output module is used for outputting second prompt information, wherein the second prompt information comprises a second rotation angle and a second rotation direction corresponding to the terminal equipment.
15. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the image capturing method according to any one of claims 1 to 7.
16. A non-transitory computer readable storage medium, which when executed by a processor, causes the processor to perform the image capturing method of any of claims 1 to 7.
CN202111562421.XA 2021-12-20 2021-12-20 Image shooting method and device Pending CN116320711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111562421.XA CN116320711A (en) 2021-12-20 2021-12-20 Image shooting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111562421.XA CN116320711A (en) 2021-12-20 2021-12-20 Image shooting method and device

Publications (1)

Publication Number Publication Date
CN116320711A true CN116320711A (en) 2023-06-23

Family

ID=86800057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111562421.XA Pending CN116320711A (en) 2021-12-20 2021-12-20 Image shooting method and device

Country Status (1)

Country Link
CN (1) CN116320711A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156260A (en) * 2023-10-30 2023-12-01 荣耀终端有限公司 Photographing method and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156260A (en) * 2023-10-30 2023-12-01 荣耀终端有限公司 Photographing method and electronic equipment

Similar Documents

Publication Publication Date Title
US11386699B2 (en) Image processing method, apparatus, storage medium, and electronic device
US20210343041A1 (en) Method and apparatus for obtaining position of target, computer device, and storage medium
CN106161939B (en) Photo shooting method and terminal
KR20190032084A (en) Apparatus and method for providing mixed reality content
CN111107278B (en) Image processing method and device, electronic equipment and readable storage medium
CN106503682B (en) Method and device for positioning key points in video data
CN110062157B (en) Method and device for rendering image, electronic equipment and computer readable storage medium
US20220358662A1 (en) Image generation method and device
CN110225400B (en) Motion capture method and device, mobile terminal and storage medium
CN111589138A (en) Action prediction method, device, equipment and storage medium
WO2021190625A1 (en) Image capture method and device
CN112188091B (en) Face information identification method and device, electronic equipment and storage medium
CN115937478B (en) Calibration information determining method and device, electronic equipment and storage medium
CN111340865B (en) Method and apparatus for generating image
CN115311178A (en) Image splicing method, device, equipment and medium
CN109981989B (en) Method and device for rendering image, electronic equipment and computer readable storage medium
CN116320711A (en) Image shooting method and device
CN110956571A (en) SLAM-based virtual-real fusion method and electronic equipment
CN111104827A (en) Image processing method and device, electronic equipment and readable storage medium
CN111800574B (en) Imaging method and device and electronic equipment
CN110084306B (en) Method and apparatus for generating dynamic image
CN113238652A (en) Sight estimation method, device, equipment and storage medium
CN110545386B (en) Method and apparatus for capturing images
CN115170424B (en) Heart ultrasonic image artifact removing method and device
CN116506732A (en) Image snapshot anti-shake method, device and system and computer equipment

Legal Events

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