CN115278060A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115278060A
CN115278060A CN202210767587.3A CN202210767587A CN115278060A CN 115278060 A CN115278060 A CN 115278060A CN 202210767587 A CN202210767587 A CN 202210767587A CN 115278060 A CN115278060 A CN 115278060A
Authority
CN
China
Prior art keywords
skeleton
image
standard position
shot
composition mode
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.)
Granted
Application number
CN202210767587.3A
Other languages
Chinese (zh)
Other versions
CN115278060B (en
Inventor
王新元
彭飞
邓竹立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information Technology 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 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202210767587.3A priority Critical patent/CN115278060B/en
Publication of CN115278060A publication Critical patent/CN115278060A/en
Application granted granted Critical
Publication of CN115278060B publication Critical patent/CN115278060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Studio Devices (AREA)

Abstract

The application provides a data processing method, a data processing device, electronic equipment and a storage medium. And displaying the shot preview image containing the shot person in real time on the shooting interface. The actual position of the subject's skeleton in the preview image is identified using a skeleton position recognition model. And determining the composition mode of the preview image according to the actual position and the composition mode classification model. And acquiring a standard position which is applicable to the skeleton of the shot object in the preview image of the composition mode. And under the condition that the distance between the actual position and the standard position is greater than a preset distance threshold, displaying prompt information on a shooting interface, wherein the prompt information is used for prompting: and reducing the distance between the actual position of the skeleton of the shot object in the preview image and the standard position to be less than or equal to a preset distance threshold value. Through the method and the device, the user can be assisted in shooting the image of which the composition is standard or close to the standard so as to improve the quality of the image shot by the user and further improve the shooting experience of the user.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of technology, more and more users use a mobile phone or a camera or other terminal with a shooting function to shoot videos or images so as to leave a good moment in life through the images or videos. For example, in a tourist spot, a photographer may put a shooting posture, and the photographer may use a terminal to shoot a video or image including the photographer, or the like, to keep a good moment of the photographer in the tourist spot.
Disclosure of Invention
The application discloses a data processing method, a data processing device, electronic equipment and a storage medium.
In a first aspect, the present application shows a data processing method applied to an electronic device, where the method includes:
shooting a preview image containing a shot person in real time by using the electronic equipment, and displaying the shot preview image containing the shot person on a shooting interface of the electronic equipment in real time;
identifying the actual position of the skeleton of the shot person in the preview image by using a skeleton position identification model;
determining a composition mode of the preview image according to the actual position of the skeleton of the shot in the preview image and the composition mode classification model;
acquiring a standard position of a skeleton of a shot object, which is applicable to a preview image of the composition mode;
and under the condition that the distance between the actual position and the standard position is greater than a preset distance threshold, displaying first prompt information on a shooting interface, wherein the first prompt information is used for prompting: and narrowing the distance between the actual position and the standard position to be smaller than or equal to a preset distance threshold value.
In an optional implementation manner, the acquiring a standard position where the skeleton of the subject is applicable in the preview image in the composition mode includes:
acquiring a standard position which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image of the composition mode;
and acquiring the standard position which is applied to the skeleton of the shot person in the preview image of the composition mode according to the standard position which is set in the electronic equipment in advance and applied to the skeleton of the shot person in the image of the composition mode.
In an optional implementation, the method further includes:
and in the case that the target position of the skeleton of the shot person in the target image of the composition mode generated by the electronic equipment according to the preview image is different from the standard position applied to the skeleton of the shot person in the target image, replacing the standard position which is set in the electronic equipment in advance and applied to the skeleton of the shot person in the image of the composition mode by using the target position.
In an optional implementation, the method further includes:
uploading the target position to a server, so that the server generates a new standard position, which is applicable to the skeleton of the shot person in the image in the composition mode, according to the target positions, uploaded by the electronic equipment of the multiple shot persons and generated by the electronic equipment of the multiple shot persons, of the skeleton of the shot person in the target image in the composition mode generated by the electronic equipment of the multiple shot persons;
receiving second prompt information sent by the server, wherein the second prompt information is used for prompting whether a new standard position needs to be used for replacing a standard position which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image of the composition mode;
downloading a new standard position from the server under the condition that a confirmation operation aiming at the second prompt information is received;
and replacing the standard position, which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image of the composition mode, by the new standard position.
In an optional implementation, the method further comprises:
receiving a modification operation for a standard position, which is set in the electronic device in advance and to which a skeleton of a subject is applied in an image of the composition mode;
and modifying the standard position, which is set in the electronic equipment in advance and is suitable for the skeleton of the shot in the image in the composition mode, according to the modifying operation.
In an optional implementation manner, the obtaining a standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applicable in the image in the composition mode, includes:
identifying the identity of the shot person in the preview image;
and acquiring a standard position, which is suitable for the skeleton of the shot person in the image of the composition mode, of the shot person according to the identity of the shot person.
In an optional implementation manner, the obtaining a standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applicable in the image in the composition mode, includes:
acquiring the identity of a logged-in photographer in the electronic equipment;
and acquiring a standard position, which is suitable for the skeleton of the shot person in the image of the composition mode, of the shot person according to the identity of the shot person.
In an optional implementation manner, the obtaining a standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applicable in the image in the composition mode, includes:
identifying an environmental background where a shot person is located in the preview image;
and acquiring a standard position, which is suitable for the skeleton of the shot person in the image of the composition mode, of the environment background.
In an alternative implementation, the actual position of the skeleton of the photographed person in the preview image includes, but is not limited to: actual positions of a plurality of skeleton key points in the skeleton of the shot object in the preview image;
the displaying of the first prompt information on the shooting interface includes:
generating a human body frame of the shot person according to the actual positions of a plurality of skeleton key points in the skeleton of the shot person in the preview image;
determining an interface standard position corresponding to a standard position which is applicable to the framework of the shot person in the preview image of the composition mode on a shooting interface;
displaying the human body frame in an overlapping mode at the interface standard position on a shooting interface;
displaying superposition indication information on a shooting interface, wherein the superposition indication information is used for prompting that the portrait of the shot person in the preview image is superposed with the human body frame displayed on the shooting interface.
In a second aspect, the present application shows a data processing apparatus applied to an electronic device, the apparatus comprising:
the shooting module is used for shooting a preview image containing a shot person in real time by using the electronic equipment;
the first display module is used for displaying the shot preview image containing the shot person on a shooting interface of the electronic equipment in real time;
the identification module is used for identifying the actual position of the skeleton of the shot person in the preview image by using the skeleton position identification model;
the determining module is used for determining the composition mode of the preview image according to the actual position of the skeleton of the shot in the preview image and the composition mode classification model;
the acquisition module is used for acquiring a standard position of a skeleton of a shot person, wherein the standard position is applicable to the preview image of the composition mode;
the second display module is used for displaying first prompt information on a shooting interface under the condition that the distance between the actual position and the standard position is greater than a preset distance threshold, and the first prompt information is used for prompting: and narrowing the distance between the actual position and the standard position to be less than or equal to a preset distance threshold value.
In an optional implementation manner, the obtaining module includes:
a first acquisition unit configured to acquire a standard position, which is set in advance in the electronic device, to which a skeleton of a subject is applied in an image of the composition mode;
and a second acquisition unit, configured to acquire a standard position to which the skeleton of the subject is applied in the preview image in the composition mode, according to a standard position to which the skeleton of the subject is applied in the image in the composition mode, the standard position being set in the electronic device in advance.
In an optional implementation manner, the obtaining module further includes:
a first replacing unit, configured to replace, when a target position of a skeleton of the subject in a target image of the composition mode generated by the electronic device from the preview image in the target image is different from a standard position to which the skeleton of the subject is applied in the target image, the standard position to which the skeleton of the subject is applied in the image of the composition mode, the standard position being set in the electronic device in advance.
In an optional implementation manner, the obtaining module further includes:
the uploading unit is used for uploading the target positions to a server, so that the server generates new standard positions, which are suitable for the skeletons of the shot persons in the images in the composition mode, according to the target positions, uploaded by the electronic equipment of the shot persons and generated by the electronic equipment of the shot persons, of the skeletons of the shot persons in the target images in the composition mode generated by the electronic equipment of the shot persons in the target images in the composition mode;
the first receiving unit is used for receiving second prompt information sent by the server, and the second prompt information is used for prompting whether a new standard position needs to be used for replacing a standard position which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image in the composition mode;
the downloading unit is used for downloading a new standard position from the server under the condition of receiving the confirmation operation aiming at the second prompt information;
a second replacement unit configured to replace a standard position, which is set in the electronic apparatus in advance and to which the skeleton of the subject is applied in the image of the composition mode, with the new standard position.
In an optional implementation manner, the obtaining module further includes:
a second receiving unit configured to receive a modification operation for a standard position to which a skeleton of a subject, which is set in advance in an electronic apparatus, is applied in an image of the composition mode;
and a modification unit for modifying a standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applied in the image of the composition mode, according to a modification operation.
In an optional implementation manner, the obtaining module includes:
a first identification unit for identifying the identity of the photographed person in the preview image;
and the third acquisition unit is used for acquiring a standard position, which is applicable to the skeleton of the shot person in the image of the composition mode, aiming at the shot person according to the identity of the shot person.
In an optional implementation manner, the obtaining module includes:
a fourth acquiring unit, configured to acquire an identity of a photographer who has logged in the electronic device;
and the fifth acquisition unit is used for acquiring a standard position, which is suitable for the skeleton of the shot person in the image of the composition mode, aiming at the shot person according to the identity of the shot person.
In an optional implementation manner, the obtaining module includes:
a second recognition unit for recognizing an environmental background in the preview image in which the subject is located;
a sixth acquiring unit configured to acquire a standard position of the environment background to which the skeleton of the subject is applied in the image in the composition mode.
In an alternative implementation, the actual position of the skeleton of the photographed person in the preview image includes, but is not limited to: actual positions of a plurality of skeleton key points in the skeleton of the shot object in the preview image;
the second display module includes:
a generation unit for generating a human body frame of the shot person according to the actual positions of a plurality of skeleton key points in the skeleton of the shot person in the preview image;
the determining unit is used for determining an interface standard position corresponding to a standard position applied to the framework of the shot person in the preview image of the composition mode on a shooting interface;
the first display unit is used for displaying the human body frame in a superposed mode at the standard interface position on the shooting interface;
and the second display unit is used for displaying superposition indication information on the shooting interface, and the superposition indication information is used for prompting that the portrait of the shot person in the preview image is superposed with the human body frame displayed on the shooting interface.
In a third aspect, the present application shows an electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the method of any aspect.
In a fourth aspect, the present application illustrates a non-transitory computer-readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform a method as in any aspect.
In a fifth aspect, the present application shows a computer program product having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of the aspects.
The technical scheme provided by the application can comprise the following beneficial effects:
in the application, the electronic equipment is used for shooting the preview image containing the shot person in real time, and the shot preview image containing the shot person is displayed on the shooting interface of the electronic equipment in real time. The actual position of the subject's skeleton in the preview image is identified using a skeleton position recognition model. And determining the composition mode of the preview image according to the actual position of the skeleton of the shot in the preview image and the composition mode classification model. And acquiring a standard position which is applicable to the skeleton of the shot object in the preview image of the composition mode. Under the condition that the distance between the actual position and the standard position is greater than a preset distance threshold, displaying first prompt information on a shooting interface, wherein the first prompt information is used for prompting: and reducing the distance between the actual position of the skeleton of the shot object in the preview image and the standard position to be less than or equal to a preset distance threshold value. Through the method and the device, a user can be given a real-time composition suggestion under the condition that the user shoots the image, so that the user is assisted in shooting the image of which the composition is standard or close to the standard, the quality of the image shot by the user is improved, and the shooting experience of the user can be improved.
In addition, the method and the device for determining the actual position of the shot object in the preview image can improve the accuracy of the determined actual position of the shot object in the preview image by identifying the skeleton of the shot object and determining the actual position of the shot object in the preview image.
Drawings
FIG. 1 is a flow chart of the steps of a data processing method of the present application.
FIG. 2 is a flow chart of the steps of a data processing method of the present application.
FIG. 3 is a flow chart of the steps of a data processing method of the present application.
Fig. 4 is a block diagram of a data processing apparatus according to the present application.
FIG. 5 is a block diagram of an electronic device of the present application.
FIG. 6 is a block diagram of an electronic device of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Among them, after a large amount of user feedback, a large amount of users are dissatisfied with the quality of an image (for simplicity of description, the image is taken as an example here, but is not taken as an exclusion of a video and the like) photographed by using the terminal, resulting in poor photographing experience of the users.
Thus, a need for improving the user's shooting experience is addressed.
In order to improve the shooting experience of the user, the quality of the image shot by the user using the terminal can be improved.
In order to improve the quality of images shot by a user by using a terminal, the inventor carries out statistical analysis on the situation that the quality of the images shot by using the terminal is not satisfactory and fed back by a large number of users and finds that: among images taken by a large number of users using a terminal, there are many images whose composition is not standard (e.g., does not meet aesthetic standards for composition, etc.).
In view of the situation of the composition being not standard, the inventor inquires about users who shoot images with composition being not standard, so as to obtain the reason that the users are not satisfied with the quality of the images shot by using the terminal, and basically: the composition of an image photographed using the terminal is not satisfactory.
As such, the inventors can conclude that the reason why these users are not satisfied with the quality of images captured using terminals is that the composition of images captured using terminals is not standardized.
In view of this, the inventors have thought of the need to improve the quality of images taken by a user using a terminal for composition.
However, the inventors found that: if it is necessary to make the composition of an image photographed by a user using a terminal standard or close to standard, it is often necessary to make a photographer have professional photographic knowledge (for example, at least the ability to "consider the positions and corresponding postures of important elements in a scene in the image from the viewpoint of composition aesthetics") to photograph an image whose composition is standard or close to standard, otherwise, it is difficult to photograph an image whose composition is standard or close to standard.
Further, the inventors found again that: among users who take images using a terminal, most users are not professional photographers, that is, most users are amateur and do not have professional photographic knowledge, and thus it is difficult to take images whose composition is standard or close to standard.
In view of the above, in order to enable a user without professional photographic knowledge to capture an image whose composition is standard or close to standard using a terminal, professional assistance may be provided to the user without professional photographic knowledge to assist the user without professional photographic knowledge to capture an image whose composition is standard or close to standard using the terminal, so that the quality of the image captured by the terminal of the user without professional photographic knowledge may be improved, and the capturing experience of the user without professional photographic knowledge may be improved.
In one embodiment, in order to assist a user who does not have professional photographic knowledge to shoot an image with a standard or near standard composition by using a terminal, in the process of shooting the image by using the terminal, when the terminal shoots a preview image (the preview image comprises a shot object) by using a camera, the preview image can be displayed on a shooting interface of the terminal, the actual composition condition of the preview image can be analyzed, the difference between the actual composition condition of the preview image and the standard composition condition is analyzed, and prompt information is output according to the difference, so that a shooting attitude of the terminal is adjusted by a shooting person according to the prompt information and/or the position of the shot object is adjusted by the shooting person according to the prompt information, and further the terminal can shoot a new preview image (the new preview image comprises the shot object) with a standard or near standard composition, then the user can input a shooting operation in the terminal, and when the terminal receives the shooting operation of the user, a target image can be generated according to the new preview image with a standard or near standard composition, so as to achieve the purpose that the preview image with a standard or near standard composition is shot by the terminal.
Specifically, referring to fig. 1, a flowchart of steps of a data processing method according to the present application is shown, where the method is applied to an electronic device, and the electronic device may include a terminal with a shooting function, such as a camera, a mobile phone, and a tablet computer. The method specifically comprises the following steps:
in step S101, a preview image including a subject is photographed in real time using an electronic device, and the photographed preview image including the subject is displayed in real time on a photographing interface of the electronic device.
In the method, when the electronic equipment is used for shooting the scene of the shot person, the user can control the electronic equipment to start the shooting function, and when the electronic equipment starts the shooting function, the electronic equipment can shoot the preview image containing the shot person in real time and display the shot preview image containing the shot person in real time on the shooting interface of the electronic equipment.
The shooting of the scene of the shot person by using the electronic equipment includes but is not limited to: a scene in which a subject is photographed or a scene in which a video is recorded using an electronic device, for example, a scene in which a photographer photographs a subject using an electronic device, or the like.
The electronic equipment is provided with a camera, a shot person is positioned in the shooting direction of the camera, and an image shot by the electronic equipment through the camera can be used as a preview image and displayed on a shooting interface of the electronic equipment in real time.
In one example, an electronic device captures an image stream through a camera and displays the captured image stream as a preview image stream on a capture interface of the electronic device in real time.
The preview image can be referred by a photographer, the preview image can not be a target image obtained by final shooting, the preview image is used for the photographer to refer to the content currently shot by the camera, and the preview image shot by the camera can be changed when the photographer changes the shooting posture of the electronic equipment.
Among others, in one embodiment, the size of the preview image displayed on the photographing interface may be the same as the size of the photographing interface. That is, the preview image is sufficiently filled in the display on the photographing interface.
The photographing interface may be located in at least a partial area of a screen of the electronic device, or the like.
In step S102, the actual position of the subject' S skeleton in the preview image is recognized using the skeleton position recognition model.
In one embodiment, the skeleton of the subject may include, but is not limited to: a plurality of skeletal key points in the skeleton of the subject.
The plurality of skeletal keypoints may include, but are not limited to: at least one key point of the head skeleton, at least one key point of the neck skeleton, at least one key point of the arm skeleton, at least one key point of the hand skeleton, at least one key point of the torso skeleton, at least one key point of the leg skeleton, and at least one key point of the foot skeleton, and the like.
In the present application, one of the ways of understanding the position of the skeleton in the image is: the relative position of each bone key point in the skeleton in the image.
The relative position of the bone key points in the image can be understood as: the ratio between "the position coordinates of the bone key points in the coordinate system corresponding to the image" and "the maximum position coordinates of the respective points in the image in the position coordinates in the coordinate system corresponding to the image".
For example, when the image is a rectangle, assuming that the origin of coordinates of the image is a point located at the lower left corner of the rectangle of the image, the maximum coordinates are position coordinates of a point located at the upper right corner of the image in the coordinate system corresponding to the image.
In this application, the skeleton position recognition model may be trained in advance, for example, a plurality of sample data is obtained, where each sample data includes: the image processing device comprises a sample image of a sample photographer and an annotation position of a skeleton of the sample photographer in the sample image. The model may then be trained using a plurality of sample data until parameters in the model converge, thereby yielding a skeleton location identification model.
The model comprises a convolutional neural network, a long-short term memory network or a cyclic neural network and the like.
In this way, in this step, the preview image may be input to the skeleton position recognition model, the actual position of the skeleton of the subject in the preview image may be obtained by processing the preview image with the skeleton position recognition model, and the actual position of the skeleton of the subject in the preview image may be output. In this way, the electronic device can obtain the actual position of the skeleton of the shot object in the preview image output by the skeleton position recognition model.
In step S103, the composition mode of the preview image is determined according to the actual position of the skeleton of the subject in the preview image and the composition mode classification model.
In the embodiment of the present application, in a scene in which a subject is photographed using an electronic device, there may actually exist a plurality of different composition modes, such as a golden section composition mode, a trisection composition mode, a triangle composition mode, a guideline composition mode, and the like.
In this application, the composition pattern classification model may be trained in advance, for example, a plurality of sample data is obtained, where each sample data includes: the position of the skeleton of the sample photographed person in the sample image and the labeling composition mode of the sample image. The model may then be trained using a plurality of sample data until parameters in the model converge, resulting in a composition pattern classification model.
The model comprises a convolutional neural network, a long-short term memory network or a cyclic neural network and the like.
In this way, in this step, the actual position of the frame of the subject in the preview image may be input to the composition pattern classification model, the composition pattern classification model may process the actual position of the frame of the subject in the preview image to obtain the composition pattern of the preview image, and the composition pattern of the preview image may be output. In this way, the electronic device can obtain the composition mode of the preview image output by the composition mode classification model.
In step S104, a standard position to which the skeleton of the subject is applied in the preview image in the composition mode is acquired.
One of the ways of understanding the standard position of the skeleton of the subject to be photographed that is applicable to the preview image in the composition mode may be: in the case where the position of the skeleton of the subject in the preview image of the composition mode is a standard position, the composition in the preview image of the composition mode is in accordance with aesthetic standards and is accepted and preferred by a wide range of users and photographers with professional knowledge.
In the case where the position of the skeleton of the subject in the captured image of the composition pattern is a standard position in the captured image of the composition pattern, the quality of the captured image of the composition pattern is often evaluated as high quality.
The steps can specifically refer to the embodiments shown later, and are not described in detail herein.
In step S105, in a case where the distance between the actual position and the standard position is greater than the preset distance threshold, displaying a first prompt message on the shooting interface, where the first prompt message is used to prompt: and reducing the distance between the actual position of the skeleton of the shot object in the preview image and the standard position to be less than or equal to a preset distance threshold value.
The method includes prompting a photographer to move or the photographer to change a shooting posture of the electronic device, and further enabling an actual position of a skeleton of the photographer in a preview image of the composition mode shot later in the preview image of the composition mode shot later to be close to or the same as (for example, smaller than or equal to a preset distance threshold value or the like) a standard position which is applicable to the skeleton of the photographer in the preview image of the composition mode shot later. In this way, a shooting operation can be input into the electronic device, and when the electronic device receives the shooting operation, a target image is generated according to a new preview image shot by the electronic device, wherein the distance between the actual position of the skeleton of the shot person in the new preview image in the composition mode and the standard position of the skeleton of the shot person in the new preview image is smaller than or equal to the preset distance threshold.
In one embodiment, the actual position of the skeleton of the photographed person in the preview image may include, but is not limited to: the actual positions of a plurality of skeletal key points in the skeleton of the subject in the preview image. The standard positions to which the skeleton of the subject is applied in the preview image of the composition mode may include, but are not limited to: and a plurality of skeleton key points in the skeleton of the shot object are applicable to the preview image of the composition mode.
The plurality of at least one keypoint of the bone may include, but is not limited to: at least one key point of the head skeleton, at least one key point of the neck skeleton, at least one key point of the arm skeleton, at least one key point of the hand skeleton, at least one key point of the torso skeleton, at least one key point of the leg skeleton, and at least one key point of the foot skeleton, and the like.
In this way, when calculating the distance between the actual position and the standard position, the euclidean distance between the actual position and the standard position may be calculated, for example, for any one of a plurality of skeletal key points in the skeleton of the subject, the euclidean distance between the actual position of the skeletal key point in the preview image and the standard position to which the skeletal key point is applied in the preview image of the composition mode may be calculated to obtain the euclidean distance corresponding to the skeletal key point, and the same may be applied to each of the other skeletal key points in the plurality of skeletal key points in the skeleton of the subject. Thereby obtaining the Euclidean distance corresponding to each bone key point in a plurality of bone key points in the skeleton of the shot person.
Then, an average value of euclidean distances corresponding to each of a plurality of bone key points in the skeleton of the subject may be calculated, so as to obtain a distance between the actual position and the standard position.
In the application, the electronic equipment is used for shooting the preview image containing the shot person in real time, and the shot preview image containing the shot person is displayed on a shooting interface of the electronic equipment in real time. The actual position of the subject's skeleton in the preview image is identified using a skeleton position recognition model. And determining the composition mode of the preview image according to the actual position of the skeleton of the shot in the preview image and the composition mode classification model. And acquiring a standard position which is applicable to the skeleton of the shot object in the preview image of the composition mode. Under the condition that the distance between the actual position and the standard position is greater than a preset distance threshold, displaying first prompt information on a shooting interface, wherein the first prompt information is used for prompting: and reducing the distance between the actual position of the skeleton of the shot object in the preview image and the standard position to be less than or equal to a preset distance threshold value. Through the method and the device, a user can be given a real-time composition suggestion under the condition that the user shoots the image, so that the user is assisted in shooting the image of which the composition is standard or close to the standard, the quality of the image shot by the user is improved, and the shooting experience of the user can be improved.
In addition, the method and the device for determining the actual position of the shot object in the preview image can improve the accuracy of the determined actual position of the shot object in the preview image by identifying the skeleton of the shot object and determining the actual position of the shot object in the preview image.
In one embodiment of the present application, referring to fig. 2, step S103 includes:
in step S201, a standard position, which is set in advance in the electronic apparatus, to which the skeleton of the subject is applied in the image of the composition mode is acquired.
For any composition mode, in a scene of shooting an image of the composition mode, in order to make the composition of the image of the composition mode standard or close to standard, a shot person in the image of the composition mode tends to apply at least one standard position in the image of the composition mode.
The example of applying a standard position to the image of the composition mode by the subject in the image of the composition mode is described, but the scope of the present application is not limited thereto.
A standard position to which the skeleton of the subject is applied in the image of the composition mode can be set in the electronic apparatus in advance.
In this way, in this step, the electronic device can directly acquire the standard position, which is set in advance in the electronic device and to which the skeleton of the subject is applied in the image of the composition mode.
In one embodiment, the photographer sets a standard position to which the skeleton of the subject is applied to the image in the composition mode in advance in the electronic device, the subject sets a standard position to which the skeleton of the subject is applied to the image in the composition mode in advance in the electronic device, and the subject of another character related to the electronic device sets a standard position to which the skeleton of the subject is applied to the image in the composition mode in advance in the electronic device. For this embodiment, reference may be made to the embodiments shown later, and details will not be given here.
In step S202, a standard position to which the skeleton of the subject is applied in the preview image of the composition mode is acquired from a standard position to which the skeleton of the subject is applied in the image of the composition mode, which is set in advance in the electronic apparatus.
In one embodiment of the present application, when the size of the "image" in the "standard position to which the skeleton of the subject is applied to the image in the composition mode, which is set in advance in the electronic device, is the same as the size of the preview image in the composition mode, the" standard position to which the skeleton of the subject is applied to the image in the composition mode ", which is set in advance in the electronic device, may be directly used as the standard position to which the skeleton of the subject is applied to the preview image in the composition mode.
Alternatively, in another embodiment of the present application, in a case where the size of the "image" in the "standard position to which the skeleton of the subject is applied in the image of the composition mode, which is set in advance in the electronic apparatus, is different from the size of the preview image of the composition mode, a ratio between the size of the preview image of the composition mode and the size of the" image "in the" standard position to which the skeleton of the subject is applied in the image of the composition mode, "which is set in advance in the electronic apparatus, may be calculated, and then the standard position to which the skeleton of the subject is applied in the preview image of the composition mode may be acquired based on the ratio and the" standard position to which the skeleton of the subject is applied in the image of the composition mode, "which is set in the electronic apparatus.
In the case of shooting using an electronic device, some objects are often involved, for example, a photographer, a subject of the photographer or other characters related to the electronic device, and the like.
In a possible case, the requirements of the subject of the photographer, the subject, or other characters related to the electronic device may change, for example, the requirements of the subject for the standard of composition (e.g., the aesthetic standard of composition, etc.) may change, so that the standard position to which the skeleton of the subject required by the subject is applied in the image of the composition mode may change.
For this reason, in the present application, a subject that supports a photographer, a subject, or another character related to an electronic device needs to be modified for "a standard position to which a skeleton of the subject is applied in an image of the composition mode".
In particular, it is possible to support modification of a standard position of the skeleton of the subject in the image of the composition mode in the electronic device in real time.
For example, a subject of a photographer, a subject, or other character related to the electronic device may input to the electronic device a modification operation for "a standard position to which a skeleton of the subject is applied in an image of the composition mode, which is set in the electronic device in advance".
The electronic device may receive the modification operation, and modify a standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applied in the image of the composition mode, according to the modification operation.
In the present application, in the case of shooting with an electronic device, some objects, for example, a photographer, a subject, an environmental background where the subject is located, and the like, are often involved.
In one embodiment, the photographer may have his or her own requirement for "standard position for the subject's skeleton to be suitable in the image of the composition mode".
In the case where the photographer has a request for "the standard position to which the skeleton of the subject is applied in the image of the composition mode", in order to make the position of the skeleton of the subject in the image of the composition mode captured by the photographer using the electronic device in the captured image of the composition mode equal to or close to "the standard position to which the skeleton of the subject is applied in the image of the composition mode" requested by the photographer, the photographer may be supported to set "the standard position to which the skeleton of the subject is applied in the image of the composition mode" requested by the photographer in advance in the electronic device.
For example, the photographer inputs in advance "the standard position to which the skeleton of the subject is applied in the image of the composition mode" and the identification of the photographer, which are required by the photographer, in the electronic device, so that the electronic device can store the identification of the photographer and "the standard position to which the skeleton of the subject is applied in the image of the composition mode" required by the photographer in the correspondence between the identification and the standard position.
In this way, when the standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applied in the image of the composition mode, is acquired in step S201, the identification of the photographer who has registered in the electronic device can be acquired. Then, according to the identity of the photographer, a standard position of the photographer to which the skeleton of the photographer is applied in the image in the composition mode is obtained, for example, in a correspondence relationship between the identity and the standard position, a standard position corresponding to the identity of the photographer is searched for and is used as a standard position of the photographer to which the skeleton of the photographer is applied in the image in the composition mode, that is, a standard position of the photographer to which the skeleton of the photographer is applied in the image in the composition mode.
The identity of the photographer can be the name or the identification number of the photographer, and the identity of different photographers is different.
In another embodiment, the subject may have a requirement of the subject for "a standard position where the subject's skeleton is suitable in the image of the composition mode".
In the case where the subject has a request for "the standard position to which the subject's skeleton is applied in the image of the composition mode", in order to make the position of the subject's skeleton in the image of the composition mode captured by the electronic device by the subject in the captured image of the composition mode equal to or close to "the standard position to which the subject's skeleton is applied in the image of the composition mode" requested by the subject, the subject may be supported to set "the standard position to which the subject's skeleton is applied in the image of the composition mode" requested by the subject in the electronic device in advance.
For example, the electronic device may store the identification of the subject and the "standard position to which the skeleton of the subject is applied in the image of the composition mode" required by the subject in the correspondence between the identification and the standard position, in which the skeleton of the subject is applied in the image of the composition mode.
In this way, when the standard position, which is set in the electronic apparatus in advance and to which the skeleton of the subject is applied in the image of the composition mode, is acquired in step S201, the identification of the subject in the preview image can be recognized (the facial features of the subject in the preview image can be recognized using a face recognition technique, and then the identification of the subject is acquired from the facial features of the subject). Then, a standard position of the subject to which the skeleton of the subject is applied in the image in the composition mode is obtained according to the identity of the subject, for example, in a correspondence relationship between the identity and the standard position, a standard position corresponding to the identity of the subject is searched for and is used as a standard position of the subject to which the skeleton of the subject is applied in the image in the composition mode, that is, a standard position of the subject to which the skeleton of the subject is applied in the image in the composition mode.
The identification of the photographed person may be the name or identification number of the photographed person, and the identification of different photographed persons is different.
In another embodiment, there may be different requirements for the "standard position of the frame of the subject in the different environment background images in the composition mode" for different environment backgrounds, that is, the standard position of the frame of the subject in the image in the composition mode is different in different environment backgrounds.
The environmental context may include buildings, parks, roads, rivers, oceans, sky, and mountains, among others.
In order to enable the composition of various environment background images to be more reasonable, the composition is more adaptive to the corresponding environment background, the composition aesthetics of the images is improved, and the quality of the shot images is further improved.
It is possible to support setting in advance in the electronic device standard positions for which the skeleton of the subject is suitable in the image of the composition mode for various possible environmental backgrounds, respectively.
For example, for any one of the environment backgrounds that may exist, the "standard position for the environment background to which the skeleton of the subject is applied in the image in the composition mode" and the environment background may be input in advance in the electronic apparatus, so that the electronic apparatus may store the environment background and the "standard position for the environment background to which the skeleton of the subject is applied in the image in the composition mode" in the correspondence between the environment background and the standard position. The same is true for every other environmental context that may exist.
In this way, when the standard position, which is set in advance in the electronic apparatus and to which the skeleton of the subject is applied in the image of the composition mode, is acquired in step S201, the environmental background in which the subject is located in the preview image can be recognized. Then, a standard position of the environment background for which the skeleton of the subject is applicable in the image of the composition mode is obtained, for example, in a correspondence between the environment background and the standard position, a standard position corresponding to the environment background is searched for and is used as a standard position of the environment background for which the skeleton of the subject is applicable in the image of the composition mode, that is, a standard position of the skeleton of the subject is applicable in the image of the environment background of the composition mode.
Further, after step S105, the photographer may input a shooting operation to the electronic device according to actual conditions to cause the electronic device to generate a target image from the preview image.
Wherein the size of the target image and the size of the preview image may be the same. And the composition mode of the target image and the composition mode of the preview image may be the same.
In a possible case, the actual position of the skeleton of the photographed person in the target image in the composition mode is the same as the standard position of the skeleton of the photographed person in the target image in the composition mode, in this case, the photographer and/or the photographed person actually adopts the recommendation of the electronic device, and the photographer and/or the photographed person agree with the "standard position of the skeleton of the photographed person in the image in the composition mode", thereby stating that the "standard position of the skeleton of the photographed person in the image in the composition mode" meets the requirements of the photographer and/or the photographed person.
However, in another possible case, there is a difference between the actual position of the skeleton of the subject in the target image of the composition mode "and the" standard position of the skeleton of the subject in the target image of the composition mode applicable in the target image of the composition mode ", in which case, the recommendation of the electronic device is not actually adopted by the photographer and/or the subject, and the" standard position of the skeleton of the subject applicable in the image of the composition mode "is not completely recognized by the photographer, thereby explaining that the" standard position of the skeleton of the subject applicable in the image of the composition mode "does not completely meet the needs of the photographer and/or the subject.
There is a difference between "the position where the subject's skeleton is applied in the image of the composition mode" actually required by the photographer and/or subject and "the standard position where the subject's skeleton is applied in the image of the composition mode".
In this case, in order to assist the photographer and/or the subject in capturing the image in the composition mode to have a position close to or equal to the "position to which the skeleton of the subject is applied in the image in the composition mode" actually required by the photographer and/or the subject when the image in the composition mode is captured later, so that the composition condition of the captured image is closer to the requirement of the subject on the composition.
Therefore, under the condition that the photographer and/or the photographed person take the image, the real-time composition suggestion can be given to the photographer and/or the photographed person according to the 'position of the skeleton of the photographed person suitable for the image in the composition mode' actually required by the photographer and/or the photographed person so as to carry out auxiliary shooting on the photographer and/or the photographed person, so that the personalized requirements of the photographer and/or the photographed person are met as much as possible, and the personalized shooting habits, personalized styles and the like of the photographer and/or the photographed person are met.
In addition, the position of the skeleton of the photographed person applied to the image in the composition mode, which is actually required by a large number of users, may also be changed, and thus, in order to comply with the changing actual requirement of the large number of users on the position of the skeleton of the photographed person applied to the image in the composition mode, in the present application, the target position may be uploaded to the server, so that the server may generate a new standard position of the skeleton of the photographed person applied to the image in the composition mode according to the target position of the skeleton of the photographed person in the target image in the composition mode, which is respectively generated and uploaded by the electronic devices of a plurality of photographed persons, in the target image in the composition mode, which is generated by the server. For example, the average position of the target position of the skeleton of the subject in each generated target image is calculated as a new standard position.
The electronic equipment can send second prompt information to the server, the electronic equipment can receive the second prompt information sent by the server, and the second prompt information is used for prompting whether a new standard position needs to be used for replacing a standard position which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image of the composition mode. In the case where the electronic device receives a confirmation operation for the second prompt message, a new standard location may be downloaded from the server. The new standard position is used to replace a standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applied in the image of the composition mode.
So that auxiliary shooting can be carried out according to the position of the skeleton of the shot person in the image of the composition mode actually required by the shot person and/or the shot person, and the requirement of the shot person and/or the shot person on standard composition is met as much as possible.
In one embodiment, the actual position of the skeleton of the photographed person in the preview image may include, but is not limited to: the actual positions of a plurality of skeletal key points in the skeleton of the subject in the preview image. The plurality of at least one keypoint of the bone may include, but is not limited to: at least one key point of the head skeleton, at least one key point of the neck skeleton, at least one key point of the arm skeleton, at least one key point of the hand skeleton, at least one key point of the torso skeleton, at least one key point of the leg skeleton, and at least one key point of the foot skeleton, and the like.
Thus, in one embodiment of the present application, referring to fig. 3, step S105 includes:
in step S301, a human body frame of the subject is generated from actual positions of a plurality of skeletal key points in the skeleton of the subject in the preview image.
In step S302, an interface standard position corresponding to a standard position to which the skeleton of the subject is applied in the preview image in the composition mode is specified on the imaging interface.
In an embodiment of the present application, when the size of the preview image of the composition mode is the same as the size of the shooting interface of the electronic device, the standard position to which the skeleton of the photographer is applied in the preview image of the composition mode may be directly used as the interface standard position on the shooting interface.
Or, in another embodiment of the present application, in a case that the size of the preview image of the composition mode is different from the size of the capture interface of the electronic device, a ratio between the size of the capture interface of the electronic device and the size of the preview image of the composition mode may be calculated, and then the interface standard position "is obtained according to the ratio and the standard position to which the skeleton of the subject is applied in the preview image of the composition mode.
In step S303, a human body frame is displayed superimposed at an interface standard position on the shooting interface.
In the application, the human body frame displayed on the shooting interface and the preview image displayed on the shooting interface can be decoupled, the human body frame displayed on the shooting interface and the preview image displayed on the shooting interface can be located at different display levels, and the human body frame can be displayed on the preview image in a floating manner. The human body frame may not change position or disappear as the preview image changes or disappears.
In step S304, superimposition instruction information for prompting superimposition of a portrait of the subject in the preview image with a human body frame displayed on the photographing interface is displayed on the photographing interface.
In one example, the coincidence indication information may include an indication arrow or the like, and the indication arrow may point from "an actual interface position corresponding to an actual position of the skeleton of the subject in the preview image on the shooting interface" to the standard interface position to prompt the subject to move or the shooting posture of the electronic device to be changed by the shooting person.
The shooting posture of the electronic device can be conveniently changed by the shooting of the photographer or the shooting posture of the electronic device can be changed by the shooting posture prompting in a human body frame mode, so that the actual position of the skeleton of the photographer in the preview image of the composition mode shot later in the preview image of the composition mode is close to or the same as (for example, smaller than or equal to a preset distance threshold value and the like) the standard position applicable to the preview image of the composition mode shot later in the preview image of the composition mode, that is, the interface actual position corresponding to the actual position of the skeleton of the photographer in the preview image of the composition mode shot later in the shooting interface is close to or the same as the interface standard position corresponding to the standard position applicable to the preview image of the photographer in the preview image of the composition mode shot later in the shooting interface.
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are exemplary and that no action is necessarily required in this application.
Referring to fig. 4, a block diagram of a data processing apparatus of the present application is shown, applied to an electronic device, the apparatus including:
a shooting module 11, configured to shoot a preview image containing a subject in real time using an electronic device;
the first display module 12 is used for displaying the shot preview image containing the shot person on a shooting interface of the electronic equipment in real time;
the recognition module 13 is used for recognizing the actual position of the skeleton of the shot person in the preview image by using a skeleton position recognition model;
the determining module 14 is configured to determine a composition mode of the preview image according to an actual position of a skeleton of the subject in the preview image and the composition mode classification model;
an obtaining module 15, configured to obtain a standard position of a skeleton of the subject, where the standard position is applicable in the preview image in the composition mode;
the second display module 16 is configured to display first prompt information on a shooting interface when a distance between the actual position and the standard position is greater than a preset distance threshold, where the first prompt information is used to prompt: and narrowing the distance between the actual position and the standard position to be less than or equal to a preset distance threshold value.
In an optional implementation manner, the obtaining module includes:
a first acquisition unit configured to acquire a standard position, which is set in advance in the electronic device, to which a skeleton of a subject is applied in an image of the composition mode;
and a second acquisition unit, configured to acquire a standard position to which the skeleton of the subject is applied in the preview image in the composition mode, according to a standard position to which the skeleton of the subject is applied in the image in the composition mode, the standard position being set in the electronic device in advance.
In an optional implementation manner, the obtaining module further includes:
a first replacing unit, configured to replace, when a target position of a skeleton of the subject in the target image of the composition mode generated by the electronic device according to the preview image is different from a standard position to which the skeleton of the subject is applied in the target image, the standard position to which the skeleton of the subject is applied in the image of the composition mode, the standard position being set in the electronic device in advance and to which the skeleton of the subject is applied.
In an optional implementation manner, the obtaining module further includes:
the uploading unit is used for uploading the target positions to a server, so that the server generates new standard positions, which are suitable for the skeletons of the shot persons in the images in the composition mode, according to the target positions, uploaded by the electronic equipment of the shot persons and generated by the electronic equipment of the shot persons, of the skeletons of the shot persons in the target images in the composition mode generated by the electronic equipment of the shot persons in the target images in the composition mode;
the first receiving unit is used for receiving second prompt information sent by the server, and the second prompt information is used for prompting whether a new standard position needs to be used for replacing a standard position which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image of the composition mode;
the downloading unit is used for downloading a new standard position from the server under the condition of receiving the confirmation operation aiming at the second prompt message;
a second replacement unit configured to replace a standard position, which is set in the electronic apparatus in advance and to which the skeleton of the subject is applied in the image of the composition mode, with the new standard position.
In an optional implementation manner, the obtaining module further includes:
a second receiving unit configured to receive a modification operation for a standard position, which is set in advance in the electronic apparatus, to which a skeleton of a subject is applied in an image of the composition mode;
and a modification unit for modifying a standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applied in the image of the composition mode, according to a modification operation.
In an optional implementation manner, the obtaining module includes:
a first identification unit for identifying the identity of the photographed person in the preview image;
and the third acquisition unit is used for acquiring a standard position, which is suitable for the skeleton of the shot person in the image of the composition mode, aiming at the shot person according to the identity of the shot person.
In an optional implementation manner, the obtaining module includes:
a fourth acquiring unit, configured to acquire an identity of a photographer who has logged in the electronic device;
and a fifth acquiring unit, configured to acquire, according to the identity of the photographer, a standard position, which is applicable to the skeleton of the photographer in the image in the composition mode, for the photographer.
In an optional implementation manner, the obtaining module includes:
a second recognition unit for recognizing an environmental background in the preview image in which the subject is located;
a sixth acquiring unit configured to acquire a standard position of the environment background to which the skeleton of the subject is applied in the image in the composition mode.
In an alternative implementation, the actual position of the skeleton of the photographed person in the preview image includes, but is not limited to: actual positions of a plurality of skeleton key points in the skeleton of the shot person in the preview image;
the second display module includes:
a generation unit for generating a human body frame of the shot person according to the actual positions of a plurality of skeleton key points in the skeleton of the shot person in the preview image;
the determining unit is used for determining an interface standard position corresponding to a standard position applied to the framework of the shot person in the preview image of the composition mode on a shooting interface;
the first display unit is used for displaying the human body frame in a superposed mode at the standard interface position on the shooting interface;
and the second display unit is used for displaying superposition indication information on the shooting interface, and the superposition indication information is used for prompting that the portrait of the shot person in the preview image is superposed with the human body frame displayed on the shooting interface.
In the application, the electronic equipment is used for shooting the preview image containing the shot person in real time, and the shot preview image containing the shot person is displayed on a shooting interface of the electronic equipment in real time. The actual position of the subject's skeleton in the preview image is identified using a skeleton position recognition model. And determining the composition mode of the preview image according to the actual position of the skeleton of the shot in the preview image and the composition mode classification model. And acquiring a standard position which is applicable to the skeleton of the shot object in the preview image of the composition mode. Under the condition that the distance between the actual position and the standard position is greater than a preset distance threshold, displaying first prompt information on a shooting interface, wherein the first prompt information is used for prompting: and reducing the distance between the actual position of the skeleton of the shot object in the preview image and the standard position to be less than or equal to a preset distance threshold value. Through the method and the device, a user can be given a real-time composition suggestion under the condition that the user shoots the image, so that the user is assisted in shooting the image of which the composition is standard or close to the standard, the quality of the image shot by the user is improved, and the shooting experience of the user can be improved.
In addition, the method and the device for determining the actual position of the shot object in the preview image can improve the accuracy of the determined actual position of the shot object in the preview image by identifying the skeleton of the shot object and determining the actual position of the shot object in the preview image.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Optionally, an embodiment of the present application further provides an electronic device, including: the processor, the memory, and the computer program stored in the memory and capable of running on the processor, when executed by the processor, implement the processes of the above method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the processes of the method embodiments, and can achieve the same technical effects, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Fig. 5 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, images, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 6 is a block diagram of an electronic device 1900 shown in the present application. For example, electronic device 1900 may be provided as a server.
Referring to fig. 6, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Those of ordinary skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed in the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (20)

1. A data processing method is applied to electronic equipment, and the method comprises the following steps:
shooting a preview image containing a shot person in real time by using the electronic equipment, and displaying the shot preview image containing the shot person on a shooting interface of the electronic equipment in real time;
identifying the actual position of the skeleton of the shot person in the preview image by using a skeleton position identification model;
determining a composition mode of the preview image according to the actual position of the skeleton of the shot in the preview image and the composition mode classification model;
acquiring a standard position of a skeleton of a shot object, which is applicable to a preview image of the composition mode;
and under the condition that the distance between the actual position and the standard position is greater than a preset distance threshold, displaying first prompt information on a shooting interface, wherein the first prompt information is used for prompting: and narrowing the distance between the actual position and the standard position to be less than or equal to a preset distance threshold value.
2. The method according to claim 1, wherein the obtaining of the standard position of the skeleton of the subject in the preview image in the composition mode comprises:
acquiring a standard position which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image of the composition mode;
and acquiring the standard position which is applied to the skeleton of the shot person in the preview image of the composition mode according to the standard position which is set in the electronic equipment in advance and applied to the skeleton of the shot person in the image of the composition mode.
3. The method of claim 2, further comprising:
and in the case that the target position of the skeleton of the shot person in the target image of the composition mode generated by the electronic equipment according to the preview image is different from the standard position applied to the skeleton of the shot person in the target image, replacing the standard position which is set in the electronic equipment in advance and applied to the skeleton of the shot person in the image of the composition mode by using the target position.
4. The method of claim 2, further comprising:
uploading the target position to a server, so that the server generates a new standard position, which is applicable to the skeleton of the shot person in the image in the composition mode, according to the target positions, uploaded by the electronic equipment of the multiple shot persons and generated by the electronic equipment of the multiple shot persons, of the skeleton of the shot person in the target image in the composition mode generated by the electronic equipment of the multiple shot persons;
receiving second prompt information sent by the server, wherein the second prompt information is used for prompting whether a new standard position needs to be used for replacing a standard position which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image of the composition mode;
downloading a new standard position from the server side under the condition that a confirmation operation aiming at the second prompt message is received;
and replacing the standard position, which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image of the composition mode, by the new standard position.
5. The method of claim 2, further comprising:
receiving a modification operation for a standard position, which is set in the electronic device in advance and to which a skeleton of a subject is applied in an image of the composition mode;
and modifying a standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applied in the image in the composition mode, according to the modifying operation.
6. The method according to claim 2, wherein the acquiring a standard position, which is set in advance in the electronic device, to which the skeleton of the subject is applied in the image of the composition mode includes:
identifying the identity of the shot person in the preview image;
and acquiring a standard position, which is suitable for the skeleton of the shot person in the image of the composition mode, of the shot person according to the identity of the shot person.
7. The method according to claim 2, wherein the acquiring a standard position, which is set in advance in the electronic device, to which the skeleton of the subject is applied in the image of the composition mode includes:
acquiring the identity of a logged-in photographer in the electronic equipment;
and acquiring a standard position, which is suitable for the skeleton of the shot person in the image of the composition mode, of the shot person according to the identity of the shot person.
8. The method according to claim 2, wherein the acquiring a standard position, which is set in advance in the electronic device, to which the skeleton of the subject is applied in the image of the composition mode includes:
identifying an environmental background in which a shot person is located in the preview image;
and acquiring a standard position, which is applicable to the skeleton of the shot person in the image of the composition mode, aiming at the environment background.
9. The method of claim 1, wherein the actual position of the subject's skeleton in the preview image includes, but is not limited to: actual positions of a plurality of skeleton key points in the skeleton of the shot object in the preview image;
the displaying of the first prompt information on the shooting interface includes:
generating a human body frame of the shot person according to the actual positions of a plurality of skeleton key points in the skeleton of the shot person in the preview image;
determining an interface standard position corresponding to a standard position which is applicable to the framework of the shot person in the preview image of the composition mode on a shooting interface;
displaying the human body frame in an overlapping mode at the interface standard position on a shooting interface;
displaying superposition indication information on a shooting interface, wherein the superposition indication information is used for prompting that the portrait of the shot person in the preview image is superposed with the human body frame displayed on the shooting interface.
10. A data processing apparatus, applied to an electronic device, the apparatus comprising:
the shooting module is used for shooting a preview image containing a shot person in real time by using the electronic equipment;
the first display module is used for displaying the shot preview image containing the shot person on a shooting interface of the electronic equipment in real time;
the identification module is used for identifying the actual position of the skeleton of the shot person in the preview image by using the skeleton position identification model;
the determining module is used for determining the composition mode of the preview image according to the actual position of the skeleton of the shot in the preview image and the composition mode classification model;
the acquisition module is used for acquiring a standard position of the framework of the shot person, which is applicable to the preview image in the composition mode;
the second display module is used for displaying first prompt information on a shooting interface under the condition that the distance between the actual position and the standard position is greater than a preset distance threshold, and the first prompt information is used for prompting: and narrowing the distance between the actual position and the standard position to be less than or equal to a preset distance threshold value.
11. The apparatus of claim 10, wherein the obtaining module comprises:
a first acquisition unit configured to acquire a standard position, which is set in advance in the electronic device, to which a skeleton of a subject is applied in an image of the composition mode;
and a second acquisition unit, configured to acquire a standard position to which the skeleton of the subject is applied in the preview image in the composition mode, according to a standard position to which the skeleton of the subject is applied in the image in the composition mode, the standard position being set in the electronic device in advance.
12. The apparatus of claim 11, wherein the obtaining module further comprises:
a first replacing unit, configured to replace, when a target position of a skeleton of the subject in a target image of the composition mode generated by the electronic device from the preview image in the target image is different from a standard position to which the skeleton of the subject is applied in the target image, the standard position to which the skeleton of the subject is applied in the image of the composition mode, the standard position being set in the electronic device in advance.
13. The apparatus of claim 11, wherein the obtaining module further comprises:
the uploading unit is used for uploading the target positions to a server, so that the server generates new standard positions, which are suitable for the skeletons of the shot persons in the images in the composition mode, according to the target positions, uploaded by the electronic equipment of the shot persons and generated by the electronic equipment of the shot persons, of the skeletons of the shot persons in the target images in the composition mode generated by the electronic equipment of the shot persons in the target images in the composition mode;
the first receiving unit is used for receiving second prompt information sent by the server, and the second prompt information is used for prompting whether a new standard position needs to be used for replacing a standard position which is set in the electronic equipment in advance and is suitable for the skeleton of the shot person in the image in the composition mode;
the downloading unit is used for downloading a new standard position from the server under the condition of receiving the confirmation operation aiming at the second prompt message;
a second replacement unit configured to replace a standard position, which is set in the electronic apparatus in advance and to which the skeleton of the subject is applied in the image of the composition mode, with the new standard position.
14. The apparatus of claim 11, wherein the obtaining module further comprises:
a second receiving unit configured to receive a modification operation for a standard position, which is set in advance in the electronic apparatus, to which a skeleton of a subject is applied in an image of the composition mode;
and a modification unit for modifying a standard position, which is set in the electronic device in advance and to which the skeleton of the subject is applied in the image of the composition mode, according to a modification operation.
15. The apparatus of claim 11, wherein the obtaining module comprises:
a first identification unit for identifying the identity of the photographed person in the preview image;
and the third acquisition unit is used for acquiring a standard position, which is suitable for the skeleton of the shot person in the image of the composition mode, aiming at the shot person according to the identity of the shot person.
16. The apparatus of claim 11, wherein the obtaining module comprises:
a fourth acquiring unit, configured to acquire an identity of a photographer who has logged in the electronic device;
and the fifth acquisition unit is used for acquiring a standard position, which is suitable for the skeleton of the shot person in the image of the composition mode, aiming at the shot person according to the identity of the shot person.
17. The apparatus of claim 11, wherein the obtaining module comprises:
a second recognition unit for recognizing an environmental background in the preview image in which the subject is located;
a sixth acquiring unit configured to acquire a standard position of the environment background to which the skeleton of the subject is applied in the image in the composition mode.
18. The apparatus of claim 10, wherein the actual position of the subject's skeleton in the preview image includes but is not limited to: actual positions of a plurality of skeleton key points in the skeleton of the shot object in the preview image;
the second display module includes:
a generation unit for generating a human body frame of the shot person according to the actual positions of a plurality of skeleton key points in the skeleton of the shot person in the preview image;
the determining unit is used for determining an interface standard position corresponding to a standard position applied to the framework of the shot person in the preview image of the composition mode on a shooting interface;
the first display unit is used for displaying the human body frame in a superposition manner at the interface standard position on the shooting interface;
and the second display unit is used for displaying superposition indication information on the shooting interface, and the superposition indication information is used for prompting that the portrait of the shot person in the preview image is superposed with the human body frame displayed on the shooting interface.
19. An electronic device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method according to any one of claims 1 to 9.
20. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 9.
CN202210767587.3A 2022-07-01 2022-07-01 Data processing method and device, electronic equipment and storage medium Active CN115278060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210767587.3A CN115278060B (en) 2022-07-01 2022-07-01 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210767587.3A CN115278060B (en) 2022-07-01 2022-07-01 Data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115278060A true CN115278060A (en) 2022-11-01
CN115278060B CN115278060B (en) 2024-04-09

Family

ID=83762458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210767587.3A Active CN115278060B (en) 2022-07-01 2022-07-01 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115278060B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003338955A (en) * 2002-05-21 2003-11-28 Olympus Optical Co Ltd Camera with advising functions
CN108833769A (en) * 2018-05-18 2018-11-16 Oppo广东移动通信有限公司 Shoot display methods, device, mobile terminal and storage medium
CN110445984A (en) * 2019-08-29 2019-11-12 维沃移动通信有限公司 A kind of shooting reminding method and electronic equipment
WO2020134891A1 (en) * 2018-12-26 2020-07-02 华为技术有限公司 Photo previewing method for electronic device, graphical user interface and electronic device
CA3136987A1 (en) * 2019-04-26 2020-10-29 Vivo Mobile Communication Co., Ltd. Parameter obtaining method and terminal device
CN113301251A (en) * 2021-05-20 2021-08-24 努比亚技术有限公司 Auxiliary shooting method, mobile terminal and computer-readable storage medium
CN113364971A (en) * 2020-03-07 2021-09-07 华为技术有限公司 Image processing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003338955A (en) * 2002-05-21 2003-11-28 Olympus Optical Co Ltd Camera with advising functions
CN108833769A (en) * 2018-05-18 2018-11-16 Oppo广东移动通信有限公司 Shoot display methods, device, mobile terminal and storage medium
WO2020134891A1 (en) * 2018-12-26 2020-07-02 华为技术有限公司 Photo previewing method for electronic device, graphical user interface and electronic device
CA3136987A1 (en) * 2019-04-26 2020-10-29 Vivo Mobile Communication Co., Ltd. Parameter obtaining method and terminal device
CN110445984A (en) * 2019-08-29 2019-11-12 维沃移动通信有限公司 A kind of shooting reminding method and electronic equipment
CN113364971A (en) * 2020-03-07 2021-09-07 华为技术有限公司 Image processing method and device
WO2021179773A1 (en) * 2020-03-07 2021-09-16 华为技术有限公司 Image processing method and device
CN113301251A (en) * 2021-05-20 2021-08-24 努比亚技术有限公司 Auxiliary shooting method, mobile terminal and computer-readable storage medium

Also Published As

Publication number Publication date
CN115278060B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
CN106572299B (en) Camera opening method and device
EP3179408A2 (en) Picture processing method and apparatus, computer program and recording medium
CN106408603B (en) Shooting method and device
KR20210133112A (en) Video processing method, apparatus and storage media
CN109840939B (en) Three-dimensional reconstruction method, three-dimensional reconstruction device, electronic equipment and storage medium
US11310443B2 (en) Video processing method, apparatus and storage medium
CN106503682B (en) Method and device for positioning key points in video data
CN113194254A (en) Image shooting method and device, electronic equipment and storage medium
CN112738420B (en) Special effect implementation method, device, electronic equipment and storage medium
CN106534649A (en) Composing method and device for double rotary cameras and mobile terminal
CN108933891B (en) Photographing method, terminal and system
CN108986803B (en) Scene control method and device, electronic equipment and readable storage medium
CN108470321B (en) Method and device for beautifying photos and storage medium
CN111582258A (en) Image processing method and device, electronic equipment and readable storage medium
CN113286073A (en) Imaging method, imaging device, and storage medium
CN114430457B (en) Shooting method, shooting device, electronic equipment and storage medium
US11252341B2 (en) Method and device for shooting image, and storage medium
CN115278060B (en) Data processing method and device, electronic equipment and storage medium
KR102557592B1 (en) Method and apparatus for displaying an image, electronic device and computer-readable storage medium
CN113315903B (en) Image acquisition method and device, electronic equipment and storage medium
CN113989424A (en) Three-dimensional virtual image generation method and device and electronic equipment
CN114697517A (en) Video processing method and device, terminal equipment and storage medium
CN111726531A (en) Image shooting method, processing method, device, electronic equipment and storage medium
CN111756985A (en) Image shooting method, device and storage medium
CN116939351A (en) Shooting method, shooting device, electronic equipment and readable 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