CN111104827A - Image processing method and device, electronic equipment and readable storage medium - Google Patents

Image processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111104827A
CN111104827A CN201811260231.0A CN201811260231A CN111104827A CN 111104827 A CN111104827 A CN 111104827A CN 201811260231 A CN201811260231 A CN 201811260231A CN 111104827 A CN111104827 A CN 111104827A
Authority
CN
China
Prior art keywords
user
key point
image
human body
key points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811260231.0A
Other languages
Chinese (zh)
Inventor
唐堂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Microlive Vision Technology Co Ltd
Original Assignee
Beijing Microlive Vision 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 Microlive Vision Technology Co Ltd filed Critical Beijing Microlive Vision Technology Co Ltd
Priority to CN201811260231.0A priority Critical patent/CN111104827A/en
Publication of CN111104827A publication Critical patent/CN111104827A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/23Recognition of whole body movements, e.g. for sport training
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Psychiatry (AREA)
  • Social Psychology (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The disclosure provides an image processing method, an image processing device, electronic equipment and a readable storage medium, and belongs to the technical field of image processing. The method comprises the following steps: acquiring a user image to be processed; detecting key point information of human body key points of a user in a user image; determining the limb actions of the user in the user image according to the key point information of the key points of the human body; and carrying out corresponding special effect processing on the user image according to the special effect corresponding to the limb action. Through the scheme, the user image can be subjected to corresponding special effect processing based on the limb action of the user in the user image, so that the added special effect can be changed based on the change of the limb action of the user, the user can feel the change of the special effect according to the change of the action of the user, the interestingness of the special effect processing of the image is improved, the user experience is improved, and the requirements of the user are better met.

Description

Image processing method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method and apparatus, an electronic device, and a storage medium.
Background
With the improvement of living standard of people, terminal application programs become an indispensable part of life of people. In order to meet the use requirements of people, the functions of application programs are also becoming powerful, and the interactive functions of applications have become one of the common functions of application programs.
Currently, users have been able to take or distribute images through applications anytime and anywhere. In order to make the display effect of the image richer and more distinctive, the user can add special effects to the image. In the prior art, the increase of the special effect is usually based on the selection of the preset special effect to perform corresponding processing on the image increase, and in the mode, a user cannot well participate in the adding process of the special effect, so that the user experience is poor, and the actual application requirements of the user cannot be well met.
Disclosure of Invention
The present disclosure aims to solve at least one of the above technical drawbacks. The technical scheme adopted by the disclosure is as follows:
in a first aspect, the present disclosure provides an image processing method, including:
acquiring a user image to be processed;
detecting key point information of human body key points of a user in a user image;
determining the limb actions of the user in the user image according to the key point information of the key points of the human body;
and carrying out corresponding special effect processing on the user image according to the special effect corresponding to the limb action.
In an optional implementation manner of the first aspect, before performing corresponding special effect processing on the user image according to a special effect corresponding to the body motion, the method further includes:
and determining the special effect corresponding to the limb action according to the corresponding relation between the pre-configured action and the special effect.
In an optional implementation manner of the first aspect, detecting keypoint information of human body keypoints of a user in the user image includes:
determining a human body part of a user included in a user image;
and detecting key point information of human key points corresponding to the human body part in the user image according to the human body part.
In an optional implementation of the first aspect, the method further comprises:
and setting key point information of other human body key points of the user as a pre-configured first default value, wherein the other human body key points are human body key points except the human body key points corresponding to the human body part.
In an optional implementation manner of the first aspect, if there is keypoint information of undetected human keypoints, the method further includes:
key point information of undetected human body key points is set as a second default value which is preset;
alternatively, the first and second electrodes may be,
and determining key point information of undetected human key points according to the detected key point information of the human key points.
In an optional implementation of the first aspect, the keypoint information of the human body keypoints comprises the positions of the keypoints, or comprises the positions of the keypoints and the visibility of the keypoints.
In an optional implementation manner of the first aspect, determining the limb movement of the user in the user image according to the key point information of the key point of the human body includes:
and inputting the key point information of the key points of the human body into a pre-configured action recognition model, and obtaining the limb action of the user based on the output of the action recognition model.
In an optional implementation manner of the first aspect, before inputting the key point information of the human body key point into the preconfigured motion recognition model, the method further includes:
and correspondingly preprocessing the key point information of the key points of the human body according to a pre-configured data processing mode. .
In an alternative embodiment of the first aspect, the user image is a current video frame image in a user video recorded in real time, or a locally stored user image.
In an optional implementation manner of the first aspect, if the user image is a current video frame image in a user video recorded in real time, performing corresponding special effect processing on the user image according to a special effect corresponding to the body motion, includes:
determining the limb movement of a user in each frame of video frame image in appointed video frame images in a user video, wherein the appointed video frame images are continuous video frame images which are before and/or after the current video frame image and the number of the frames of the continuous video frame images is equal to a set value;
if the limb action of the user in each frame of video frame image in the designated video frame image is the same as the limb action of the user in the current video frame image, corresponding special effect processing is carried out on the user image according to the special effect corresponding to the limb action.
In an optional implementation manner of the first aspect, the human body keypoints are keypoints of the following keypoints determined according to the keypoint configuration parameters:
a left eye key point, a right eye key point, a left ear key point, a right ear key point, a nose key point, a left shoulder key point, a right shoulder key point, a left elbow key point, a right elbow key point, a left wrist key point, a right wrist key point, a left waist key point, a left hip key point, a right hip key point, a left knee key point, a right knee key point, a left ankle key point, a right ankle key point;
the key point configuration parameters comprise configuration parameters for specifying key points and/or configuration parameters of the number of key points.
In a second aspect, the present disclosure provides an image processing apparatus comprising:
the image processing device comprises a to-be-processed image acquisition module, a processing module and a processing module, wherein the to-be-processed image acquisition module is used for acquiring a to-be-processed user image, and the user image comprises a user;
the key point detection module is used for detecting key point information of human body key points of the user in the user image;
the user action identification module is used for determining the limb actions of the user in the user image according to the key point information of the key points of the human body;
and the special effect processing module is used for carrying out corresponding special effect processing on the user image according to the special effect corresponding to the limb action.
In an optional implementation manner of the second aspect, the special effects processing module is further configured to:
and determining the special effect corresponding to the limb action according to the corresponding relation between the pre-configured action and the special effect.
In an optional implementation manner of the second aspect, the key point detecting module is specifically configured to:
determining a human body part of a user included in a user image;
and detecting key point information of human key points corresponding to the human body part in the user image according to the human body part.
In an optional implementation manner of the second aspect, the key point detection module is further configured to:
and setting key point information of other human body key points of the user as a pre-configured first default value, wherein the other human body key points are human body key points except the human body key points corresponding to the human body part.
In an optional implementation manner of the second aspect, the key point detection module is further configured to:
and when the key point information of the undetected human body key points exists, setting the key point information of the undetected human body key points as a second default value which is preset, or determining the key point information of the undetected human body key points according to the key point information of the detected human body key points.
In an alternative implementation of the second aspect, the keypoint information of the human body keypoints comprises the positions of the keypoints, or alternatively comprises the positions of the keypoints and the visibility of the keypoints.
In an optional implementation manner of the second aspect, the user action recognition module is specifically configured to:
and inputting the key point information of the key points of the human body into a pre-configured action recognition model, and obtaining the limb action of the user based on the output of the action recognition model.
In an optional implementation manner of the second aspect, the user action recognition module is further configured to:
before the key point information of the key points of the human body is input into the pre-configured action recognition model, the key point information of the key points of the human body is correspondingly pre-processed according to a pre-configured data pre-processing mode.
In an alternative embodiment of the second aspect, the user image is a current video frame image in a user video recorded in real time, or a locally stored user image.
In an optional implementation manner of the second aspect, the special effect processing module is specifically configured to:
when the user image is a current video frame image in a user video recorded in real time, determining the body movement of the user in each frame of video frame image in an appointed video frame image in the user video, wherein the appointed video frame image is a continuous video frame image which is before and/or after the current video frame image and has the frame number equal to a set value;
if the limb action of the user in each frame of video frame image in the designated video frame image is the same as the limb action of the user in the current video frame image, corresponding special effect processing is carried out on the user image according to the special effect corresponding to the limb action.
In an optional implementation manner of the second aspect, the human body keypoints are keypoints of the following keypoints determined according to the keypoint configuration parameters:
a left eye key point, a right eye key point, a left ear key point, a right ear key point, a nose key point, a left shoulder key point, a right shoulder key point, a left elbow key point, a right elbow key point, a left wrist key point, a right wrist key point, a left waist key point, a left hip key point, a right hip key point, a left knee key point, a right knee key point, a left ankle key point, a right ankle key point;
the key point configuration parameters comprise configuration parameters for specifying key points and/or configuration parameters of the number of key points.
In a third aspect, the present disclosure provides an electronic device comprising a memory and a processor;
the memory has stored therein computer program instructions;
a processor for reading computer program instructions to perform the video generation method as shown in the first aspect of the present disclosure or any one of the optional embodiments of the first aspect.
In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer program instructions stored therein, which when executed by a processor, implement the video generation method shown in the first aspect of the present disclosure or any one of the optional embodiments of the first aspect.
The technical scheme provided by the disclosure has the following beneficial effects: according to the image processing method, the image processing device, the electronic equipment and the readable storage medium, the user image can be subjected to corresponding special effect processing based on the body action of the user in the user image, so that the added special effect can be changed based on the change of the body action of the user, the user can feel the change of the special effect according to the change of the action of the user, the interestingness of the special effect processing of the image is improved, the user experience is improved, and the requirements of the user are better met.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings used in the description of the embodiments of the present disclosure will be briefly described below.
Fig. 1 shows a schematic flow chart of an image processing method provided in an embodiment of the present disclosure;
fig. 2 shows a schematic structural diagram of an image processing apparatus provided in an embodiment of the present disclosure;
fig. 3 shows a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of illustrating the present disclosure and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in detail with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
Fig. 1 shows a schematic flowchart of an image processing method provided in an embodiment of the present disclosure, and as shown in fig. 1, the method may be specifically executed by a terminal device or a server, and the method mainly includes the following steps:
step S110: acquiring a user image to be processed;
in the embodiment of the present disclosure, the user is included in the user image, which means an image including part or all of the body (limb) part of the user. It will be appreciated that the body parts may include primarily the head, neck, torso, limbs, etc.
Step S120: detecting key point information of human body key points of a user in a user image;
step S130: determining the limb actions of the user in the user image according to the key point information of the key points of the human body;
the limb movement may refer to a movement of any one of the user's body parts, such as a head movement, a hand movement, a leg movement, or a trunk movement of the user.
Step S140: and carrying out corresponding special effect processing on the user image according to the special effect corresponding to the limb action.
According to the image processing method, the corresponding special effect processing can be performed on the user image based on the limb action of the user in the user image, so that the added special effect can be changed based on the change of the limb action of the user, the user can feel the change of the special effect according to the change of the action of the user, the interestingness of the special effect processing on the image is improved, the user experience is improved, and the requirements of the user are better met.
In the embodiment of the present disclosure, before performing corresponding special effect processing on the user image according to the special effect corresponding to the limb action, the method further includes:
and determining the special effect corresponding to the limb action according to the corresponding relation between the pre-configured action and the special effect.
In practical application, the corresponding relation between different limb actions and corresponding special effects can be preconfigured according to practical application requirements, when a specific limb action of a user in a user image is detected, the special effect corresponding to the specific limb action can be determined according to the corresponding relation, and therefore the user image is correspondingly processed based on the special effect.
It is understood that the degree of refinement of the correspondence between different limb actions and corresponding special effects is configurable, that is, the granularity of refinement of the actions is configurable as required. For example, in an alternative manner, the correspondence between the motions and the special effects may include a correspondence between a plurality of designated head motions and a certain special effect, a correspondence between a plurality of upper limb motions and a certain special effect, and the like; in another optional manner, the correspondence between the actions and the effects may be further refined, for example, the correspondence between the actions and the effects may include a correspondence between one specific head action and one effect, a correspondence between another specific head action and another effect, and the like.
It should be noted that, in practical applications, if the special effect corresponding to the limb movement of the user cannot be determined according to the corresponding relationship between the preconfigured movement and the special effect, the user image may be correspondingly processed according to the preconfigured processing rule, where the processing rule may be configured as required. For example, in an alternative, the processing rule may not process the user image, and may also provide a corresponding prompt message to the user, such as displaying a prompt message such as "no detected qualified action" on the user interface, so that the user can perform a corresponding operation or action according to the prompt message.
In an optional embodiment of the present disclosure, the human body key point is a key point of the following key points determined according to the key point configuration parameter:
a left eye key point, a right eye key point, a left ear key point, a right ear key point, a nose key point, a left shoulder key point, a right shoulder key point, a left elbow key point, a right elbow key point, a left wrist key point, a right wrist key point, a left waist key point, a left hip key point, a right hip key point, a left knee key point, a right knee key point, a left ankle key point, a right ankle key point;
the key point configuration parameters comprise configuration parameters for specifying key points and/or configuration parameters of the number of key points.
In practical application, which human body feature points need to be detected specifically, can be configured according to application needs and application scenes through the key point configuration parameters. For example, in an alternative, the human key points to be detected may include the above 19 key points, or some of the above human key points. It will be appreciated that the configured human keypoints that need to be detected can at least determine a limb movement of at least one body part of the user.
The configuration parameters of the specified key points are used for indicating specific human key points needing to be detected, and the number of the key points is used for indicating the number of the key points needing to be detected. It can be understood that the number of the key points is not greater than the number of the key points corresponding to the configuration parameters for specifying the key points, that is, the number of the key points is not greater than the number of all the specified key points to be detected. For example, the human key points that need to be detected and are indicated by the configuration parameters of the specified key points include a left-eye key point, a right-eye key point, a left-ear key point, a right-ear key point, a nose key point, a left-shoulder key point, a right-shoulder key point, a left-elbow key point, a right-wrist key point, a left-waist key point, and a left-waist key point, which are 13 key points in total, the number of key points indicated by the configuration parameters of the number of key points is not greater than 13, when the number of key points indicated by the configuration parameters of the number of key points is less than 13, the corresponding number of key points in the 13 key points may be detected at random, and the corresponding key points in the 13 specified key points may also be detected according to other preset configuration information.
In an optional embodiment of the present disclosure, detecting keypoint information of human body keypoints of a user in a user image includes:
determining a human body part of a user included in a user image;
and detecting key point information of human key points corresponding to the human body part in the user image according to the human body part.
In practical applications, in order to improve the efficiency of image processing and reduce the resource consumption of image processing on terminal equipment, the human body part of the user included in the user image can be determined before the detection of the key point information of the human body key point, so that only the human body key point of the human body part included in the image can be detected when the key point information of the human body key point is detected. For example, if the user image includes only a part of the user's body, for example, an upper body part, only the human body key points corresponding to the upper body part may be detected at the time of detection. The specific limitation of the upper body part can be set as required, that is, the range of the human body part corresponding to the upper body can be set as required.
In an optional embodiment of the present disclosure, the image processing method may further include:
and setting key point information of other human body key points of the user as a pre-configured first default value, wherein the other human body key points are human body key points except the human body key points corresponding to the human body part.
In practical applications, in the above scheme that only key point information of human body key points corresponding to a human body part of a user included in a user image needs to be detected, a user limb motion in the user image may be determined based on the key point information of the detected human body key points, or key point information of human body key points other than the human body key points corresponding to the human body part of the user included in the user image may be set as a default value, and a limb motion of the user in the user image may be determined based on the detected human body key points and the human body key points set as the default value.
For example, the human body part of the user included in the user image is the upper half of the user, and if other key points (e.g., a left knee key point, a right knee key point, a left ankle key point, a right ankle key point, and the like) of the detected human body key points other than the key points corresponding to the upper half of the body part (e.g., a left eye key point, a right eye key point, a left ear key point, a right ear key point, a nose key point, a left shoulder key point, a right shoulder key point, and the like) are required to be added, these other key points may not be used when determining the body motion of the user, or key point information of these other key points may be set as a default value.
In an optional embodiment of the present disclosure, if there is key point information of undetected human key points, the image processing method further includes:
key point information of undetected human body key points is set as a second default value which is preset;
alternatively, the first and second electrodes may be,
and determining key point information of undetected human key points according to the detected key point information of the human key points.
Because different human key points have a specific corresponding relationship, and the relative positions or distances between different human key points are usually within a certain range, for example, the relative position relationship between an ear key point (a left ear key point or a right ear key point) and a nose key point is generally relatively fixed, so that the relative position relationship between the ear key point and the nose key point can be preconfigured, and when the key point information of one key point of the ear key point and the nose key point is detected, the key point information of the other key point can be determined according to the relative position relationship between the ear key point and the nose key point. Therefore, the key point information of some human key points which can not be detected can be determined according to the key point information of some detected human key points and the preset incidence relation between different key points.
In practical applications, if one or some of the key point information of the human body key points that need to be detected is not detected, the key point information of the human body key points that are not detected may be set as a default value, or the key point information of the human body key points that are not detected may be determined according to the key point information of the human body key points that have been detected. For example, when performing limb movement recognition of a user, key point information requiring 10 specific (pre-configured) human key points is configured, and if only key point information of 8 specific human key points is detected in an image of the user, key point information of the other 2 specific human key points may be set as a default value, or key point information of the other 2 specific human key points may be calculated according to key point information of one or more human key points in the detected key point information of the 8 specific human key points.
It is understood that the first default value and the second default value may be the same or different.
In an alternative embodiment of the present disclosure, the key point information of the human body key points includes positions of the key points, or includes the positions of the key points and visibility of the key points.
The position of the key point is the coordinate of the key point in the user image, the visibility of the key point is whether the key point can be detected in the user image, if so, the visibility is that the key point can not be detected, and if not, the visibility is invisible. In practical applications, the information of the key points to be detected can be configured as required, such as only the positions of the key points to be detected, or the positions and the visibility of the key points to be detected.
It is to be understood that, when the key point information includes the positions of the key points and the visibility of the key points, when the key point information of the human body key points is set to the first default value or the second default value, only the positions of the key points may be set to the default values, or the positions of the key points and the visibility of the key points may be set to the default values. For example, for undetected human body key points, the position information thereof may be set to a default value, such as (0,0) position coordinates, and invisible or invisible visibility of the corresponding identifier, and of course, the visibility may also be set to a default value, such as 0.
It should be noted that, in practical applications, when detecting the position of the key point of the human body, i.e. the coordinate in the user image, the specific position of the origin of coordinates may be configured according to practical needs.
In an optional embodiment of the present disclosure, determining a limb movement of a user in a user image according to key point information of a human body key point includes:
and inputting the key point information of the key points of the human body into a pre-configured action recognition model, and obtaining the limb action of the user based on the output of the action recognition model.
The motion recognition model is a recognition model which is obtained through training and used for performing the limb motion of the user based on the key point information of the human body key points, namely a classification model of the limb motion of the user, inputs the key point information of the human body key points and outputs the identification information of the limb motion.
In practical applications, the motion recognition model may be configured as required, and in an alternative, the motion recognition model may be a convolutional neural network, or may be a deep learning network or other classification model.
In an optional embodiment of the present disclosure, before inputting the key point information of the human body key point into the preconfigured motion recognition model, the method may further include:
and correspondingly preprocessing the key point information of the key points of the human body according to a pre-configured data preprocessing mode.
Wherein, the data preprocessing mode can be at least one of the following modes:
performing corresponding format conversion on the key point information of the key points of the human body according to the input data format corresponding to the action recognition model;
and smoothing the key point information of the key points of the human body.
The method includes performing corresponding format conversion on the key point information of the key points of the human body according to an input data format corresponding to the motion recognition model, and may include one or more of the following:
a. sorting the key point information of the human body key points according to a pre-configured key point sequence;
b. and normalizing the positions of the key points in the obtained information of all the key points according to the specified original position and the specified normalized size.
In practical applications, because formats of input data corresponding to different motion recognition models may be different, in practical applications, if a format of detected key point information of a human key point is different from a data format that can be recognized by the motion recognition model, the key point information of the human key point needs to be converted into a data format that can be recognized by the motion recognition model, the converted key point information is input to the motion recognition model, and a user's body motion is obtained according to an output of the motion recognition model.
For the above-mentioned mode a, in practical applications, when the motion recognition model is obtained based on training of the training data, when the keypoint information of each group of human keypoints in the training data is input into the model, the keypoint information may be sequentially input into the model according to the above-mentioned order of keypoints. Correspondingly, when the action recognition model obtained through training recognizes key point information of human key points in the user image to be processed to obtain the body action of the user, the key point information of the human key points can be sorted according to the key point sequence, and then the sorted key point information of the human key points is input into the model to improve the recognition accuracy of the body action. For example, in an example, when the motion recognition model is trained, the training is performed based on the key point information of the key points such as the left shoulder key point, the right shoulder key point, the left elbow key point, the right elbow key point, the left wrist key point, and the right wrist key point of the user in the user image, and when the training is performed, the key point information of the key points in each frame of the user image is input in the order of the key point information of the left shoulder key point, the key point information of the right shoulder key point, the key point information of the left elbow key point, the key point information of the right elbow key point, the key point information of the left wrist key point, and the key point information of the right wrist key point, and when the user performs the work recognition, the detected key point information of the key points may be sorted according to the input order.
As for the above-described mode b, in order to realize the spatial normalization processing of data. In practical applications, a linear normalization processing mode may be adopted, for example, the spatial normalization processing may be performed on the keypoint information based on a predetermined origin and a predetermined normalization size in a rigid body transformation mode. As an example, if a nose key point of a user in an image can be designated as an origin, and a distance between the nose key point and an ear key point is taken as a normalized size, specifically, the distance between the nose key point and the ear key point can be normalized to 1, then normalized data corresponding to the positions of the human key points can be obtained according to the distances between the positions of the human key points and the origin and the normalized size, where if the distance between the nose key point and the ear key point is 10 centimeters, and the distance between a certain human key point and the nose key point is 20 centimeters, then the normalized data corresponding to the key point is 2.
For the smoothing of data, that is, the above-mentioned manner of smoothing the key point information of the key points of the human body, in practical applications, the specific manner of smoothing the key point information may be configured according to actual needs.
In an optional embodiment of the present disclosure, the user image is a current video frame image in a user video recorded in real time, or a locally stored user image.
That is, the user image may be an image including a user part photographed in real time or a user image stored locally in the terminal device. The locally stored user image may be a user image, or a video frame image in the locally stored user video.
In an optional embodiment of the present disclosure, if the user image is a current video frame image in a user video recorded in real time, performing corresponding special effect processing on the user image according to a special effect corresponding to the body motion, includes:
determining the limb movement of a user in each frame of video frame image in appointed video frame images in a user video, wherein the appointed video frame images are continuous video frame images which are before and/or after the current video frame image and the number of the frames of the continuous video frame images is equal to a set value;
if the limb action of the user in each frame of video frame image in the designated video frame image is the same as the limb action of the user in the current video frame image, corresponding special effect processing is carried out on the user image according to the special effect corresponding to the limb action.
In the embodiment of the disclosure, when the user image is the current video frame image in the user video recorded in real time, because the user images of multiple frames can be acquired within a short set time, and the probability of the change of the user limb action in the user images of multiple continuous frames is generally low, in order to improve the accuracy of the user limb action recognition, after the user limb action in the current video frame image is determined, before the user image is correspondingly processed according to the special effect corresponding to the limb action, whether the limb action of the user in each video frame image in the multiple video frame images before and/or after the image is the same as the limb action in the current video frame image can be further determined, when the limb action is the same as the corresponding special effect processing of the current video frame image, when the limb action is not the same as the corresponding special effect processing of the user in the multiple video frame images, the corresponding processing can be performed according to the pre-configured processing mode, the processing mode may be configured as required, for example, the user image may not be subjected to special effect processing, or the processing may be performed according to a preconfigured special effect. That is, the special effect processing may be performed on the user image based on the body motion of the user in the multi-frame image that is continuous with the current video frame image.
In practical application, the number of frames of the designated video frame image, that is, the setting value, may be configured as needed. The designated video frame image is specifically an image before the current video frame image, or an image after the current video frame image, or an image before the current video frame image and an image after the current video frame image, and may also be configured as required.
Optionally, in practical application, when performing corresponding special effect processing on the current video frame image, corresponding special effect processing may also be performed on the specified video frame image.
As an example, the set value of the video frame image is specified to be 5, the video frame image is specified to be an image after the current video frame, and when it is determined that the body motion of the user in the current video frame image is motion a, if the body motion of the user in each frame of video frame image in the consecutive 5 frames of images after the current video frame image is motion a, according to the special effect corresponding to the motion a, the corresponding special effect processing may be performed on both the current video frame image and the 5 frames of images after the current video frame image.
Based on the same principle as the method shown in fig. 1, an image processing apparatus is also provided in the embodiment of the present disclosure, and as shown in fig. 2, the image processing apparatus 200 may include an image to be processed acquisition module 210, a key point detection module 220, a user action recognition module 230, and a special effect processing module 240. Wherein:
a to-be-processed image obtaining module 210, configured to obtain a to-be-processed user image;
a key point detecting module 220, configured to detect key point information of a human body key point of a user in the user image;
the user action recognition module 230 is configured to determine a body action of the user in the user image according to the key point information of the human body key point;
the special effect processing module 240 is configured to perform corresponding special effect processing on the user image according to a special effect corresponding to the limb movement.
The image processing device provided by the disclosure can perform corresponding special effect processing on the user image based on the limb action of the user in the user image, so that the added special effect can be changed based on the change of the limb action of the user, the user can feel the change of the special effect according to the change of the action of the user, the interestingness of special effect processing on the image is improved, the user experience is improved, and the requirements of the user are better met.
It is to be understood that the above modules of the image processing apparatus 200 in the embodiment of the present disclosure have functions of implementing the corresponding steps in the image processing method shown in fig. 1, and the functions may be implemented by hardware or by hardware executing corresponding software, where the hardware or software includes one or more modules corresponding to the above functions. The modules can be realized independently or by integrating a plurality of modules. For the functional description of each module of the image processing apparatus, reference may be made to the corresponding description in the image processing method shown in fig. 1 in the foregoing, and details are not repeated here.
In an optional embodiment of the present disclosure, the special effect processing module 240 may be further configured to:
and determining the special effect corresponding to the limb action according to the corresponding relation between the pre-configured action and the special effect.
In an optional embodiment of the disclosure, the key point detecting module 220 may be specifically configured to:
determining a human body part of a user included in a user image;
and detecting key point information of human key points corresponding to the human body part in the user image according to the human body part.
In an optional embodiment of the disclosure, the keypoint detection module 230 may be further configured to:
and setting key point information of other human body key points of the user as a pre-configured first default value, wherein the other human body key points are human body key points except the human body key points corresponding to the human body part.
In an optional embodiment of the disclosure, the keypoint detection module 230 may be further configured to:
and when the key point information of the undetected human body key points exists, setting the key point information of the undetected human body key points as a second default value which is preset, or determining the key point information of the undetected human body key points according to the key point information of the detected human body key points.
In an alternative embodiment of the present disclosure, the key point information of the human body key points includes positions of the key points, or includes the positions of the key points and visibility of the key points.
In an optional embodiment of the present disclosure, the user action recognition module 230 may be specifically configured to:
and inputting the key point information of the key points of the human body into a pre-configured action recognition model, and obtaining the limb action of the user based on the output of the action recognition model.
In an optional embodiment of the present disclosure, the user action recognition module 230 may be further configured to:
before the key point information of the key points of the human body is input into the pre-configured action recognition model, the key point information of the key points of the human body is correspondingly pre-processed according to a pre-configured data pre-processing mode.
In an optional embodiment of the present disclosure, the user image is a current video frame image in a user video recorded in real time, or a locally stored user image.
In an optional embodiment of the present disclosure, the special effect processing module 240 may be specifically configured to:
when the user image is a current video frame image in a user video recorded in real time, determining the body movement of the user in each frame of video frame image in an appointed video frame image in the user video, wherein the appointed video frame image is a continuous video frame image which is before and/or after the current video frame image and has the frame number equal to a set value;
if the limb action of the user in each frame of video frame image in the designated video frame image is the same as the limb action of the user in the current video frame image, corresponding special effect processing is carried out on the user image according to the special effect corresponding to the limb action.
In an optional embodiment of the present disclosure, the human body key point is a key point of the following key points determined according to the key point configuration parameter:
a left eye key point, a right eye key point, a left ear key point, a right ear key point, a nose key point, a left shoulder key point, a right shoulder key point, a left elbow key point, a right elbow key point, a left wrist key point, a right wrist key point, a left waist key point, a left hip key point, a right hip key point, a left knee key point, a right knee key point, a left ankle key point, a right ankle key point;
the key point configuration parameters comprise configuration parameters for specifying key points and/or configuration parameters of the number of key points.
It is to be understood that the actions performed by the modules in the apparatus in the embodiments of the present disclosure correspond to the steps in the method in the embodiments of the present disclosure, and for the detailed functional description of the modules in the apparatus, reference may be specifically made to the description in the corresponding method shown in the foregoing, and details are not described here again.
Based on the same principle as the image processing method of the embodiment of the present disclosure, an electronic device is further provided in the embodiment of the present disclosure, and the electronic device includes a memory and a processor, where the memory stores computer program instructions, and the processor is configured to read the computer program instructions to execute the method shown in any one of the embodiments of the present disclosure.
Based on the same principle as the image processing method of the embodiment of the present disclosure, a computer-readable storage medium is also provided in the embodiment of the present disclosure, in which computer program instructions are stored, and when the computer program instructions are executed by a processor, the processor implements the method shown in any embodiment of the present disclosure.
An electronic device is also provided in the embodiments of the present disclosure, as shown in fig. 3, which shows a schematic structural diagram of an electronic device (e.g., a terminal device or a server) 800 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device 800 may include a processing means (e.g., central processing unit, graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects the internet protocol addresses from the at least two internet protocol addresses and returns the internet protocol addresses; receiving an internet protocol address returned by the node evaluation equipment; wherein the obtained internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of execution is not necessarily sequential, but may be performed alternately or in alternation with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (13)

1. An image processing method, comprising:
acquiring a user image to be processed;
detecting key point information of human body key points of the user in the user image;
determining the limb action of the user in the user image according to the key point information of the human body key point;
and carrying out corresponding special effect processing on the user image according to the special effect corresponding to the limb action.
2. The method according to claim 1, wherein before performing corresponding special effect processing on the user image according to the special effect corresponding to the limb action, the method further comprises:
and determining a special effect corresponding to the limb action according to the corresponding relation between the pre-configured action and the special effect.
3. The method according to claim 1 or 2, wherein the detecting of the key point information of the human key points of the user in the user image comprises:
determining a human body part of the user included in the user image;
and detecting key point information of human key points corresponding to the human body part in the user image according to the human body part.
4. The method of claim 3, further comprising:
and setting the key point information of other human body key points of the user as a pre-configured first default value, wherein the other human body key points are human body key points except the human body key points corresponding to the human body part.
5. The method according to claim 1 or 2, wherein if there is key point information of the human body key points that is not detected, the method further comprises:
setting key point information of the undetected human body key points as a pre-configured second default value;
alternatively, the first and second electrodes may be,
and determining key point information of the undetected human key points according to the detected key point information of the human key points.
6. The method according to any one of claims 1 to 5, wherein the key point information of the human body key points comprises positions of key points or comprises positions of key points and visibility of key points.
7. The method according to any one of claims 1 to 6, wherein the determining the limb movement of the user in the user image according to the key point information of the human body key point comprises:
and inputting the key point information of the human body key points into a pre-configured action recognition model, and obtaining the limb action of the user based on the output of the action recognition model.
8. The method of claim 7, wherein before inputting the keypoint information of the human keypoints into a preconfigured motion recognition model, further comprising:
and correspondingly preprocessing the key point information of the human body key points according to a pre-configured data preprocessing mode.
9. The method according to any one of claims 1 to 8, wherein the user image is a current video frame image in a user video recorded in real time or a locally stored user image.
10. The method according to claim 9, wherein if the user image is a current video frame image in a user video recorded in real time, performing corresponding special effect processing on the user image according to a special effect corresponding to the body motion includes:
determining the body movement of the user in each frame of video frame image in the appointed video frame images of the user video, wherein the appointed video frame images are continuous video frame images which are before and/or after the current video frame image and the number of the frames of the continuous video frame images is equal to a set value;
and if the body action of the user in each frame of video frame image in the appointed video frame image is the same as the body action of the user in the current video frame image, carrying out corresponding special effect processing on the user image according to the special effect corresponding to the body action.
11. An image processing apparatus characterized by comprising:
the image processing device comprises a to-be-processed image acquisition module, a to-be-processed image processing module and a processing module, wherein the to-be-processed image acquisition module is used for acquiring a to-be-processed user image;
the key point detection module is used for detecting key point information of human body key points of the user in the user image;
the user action identification module is used for determining the limb action of the user in the user image according to the key point information of the human body key point;
and the special effect processing module is used for carrying out corresponding special effect processing on the user image according to the special effect corresponding to the limb action.
12. An electronic device comprising a memory and a processor;
the memory having stored therein computer program instructions;
the processor for reading the computer program instructions to perform the image processing method of any of claims 1 to 10.
13. A computer-readable storage medium, characterized in that the storage medium has stored therein computer program instructions which, when executed by a processor, implement the image processing method of any one of claims 1 to 10.
CN201811260231.0A 2018-10-26 2018-10-26 Image processing method and device, electronic equipment and readable storage medium Pending CN111104827A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811260231.0A CN111104827A (en) 2018-10-26 2018-10-26 Image processing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811260231.0A CN111104827A (en) 2018-10-26 2018-10-26 Image processing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN111104827A true CN111104827A (en) 2020-05-05

Family

ID=70419016

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811260231.0A Pending CN111104827A (en) 2018-10-26 2018-10-26 Image processing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111104827A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586261A (en) * 2020-05-19 2020-08-25 北京字节跳动网络技术有限公司 Target video processing method and device and electronic equipment
CN111626258A (en) * 2020-06-03 2020-09-04 上海商汤智能科技有限公司 Sign-in information display method and device, computer equipment and storage medium
CN111640203A (en) * 2020-06-12 2020-09-08 上海商汤智能科技有限公司 Image processing method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586261A (en) * 2020-05-19 2020-08-25 北京字节跳动网络技术有限公司 Target video processing method and device and electronic equipment
CN111586261B (en) * 2020-05-19 2022-05-03 北京字节跳动网络技术有限公司 Target video processing method and device and electronic equipment
CN111626258A (en) * 2020-06-03 2020-09-04 上海商汤智能科技有限公司 Sign-in information display method and device, computer equipment and storage medium
CN111626258B (en) * 2020-06-03 2024-04-16 上海商汤智能科技有限公司 Sign-in information display method and device, computer equipment and storage medium
CN111640203A (en) * 2020-06-12 2020-09-08 上海商汤智能科技有限公司 Image processing method and device
CN111640203B (en) * 2020-06-12 2024-04-12 上海商汤智能科技有限公司 Image processing method and device

Similar Documents

Publication Publication Date Title
CN109902659B (en) Method and apparatus for processing human body image
EP3876140B1 (en) Method and apparatus for recognizing postures of multiple persons, electronic device, and storage medium
CN111107278B (en) Image processing method and device, electronic equipment and readable storage medium
CN110349081B (en) Image generation method and device, storage medium and electronic equipment
CN111476783B (en) Image processing method, device and equipment based on artificial intelligence and storage medium
CN109993150B (en) Method and device for identifying age
CN111445583B (en) Augmented reality processing method and device, storage medium and electronic equipment
CN110349232B (en) Image generation method and device, storage medium and electronic equipment
CN110059623B (en) Method and apparatus for generating information
CN111815666B (en) Image processing method and device, computer readable storage medium and electronic equipment
CN111104827A (en) Image processing method and device, electronic equipment and readable storage medium
CN110009059A (en) Method and apparatus for generating model
EP4287068A1 (en) Model training method, scene recognition method, and related device
CN109754464A (en) Method and apparatus for generating information
CN111589138B (en) Action prediction method, device, equipment and storage medium
CN110956571B (en) SLAM-based virtual-real fusion method and electronic equipment
CN114998935A (en) Image processing method, image processing device, computer equipment and storage medium
CN113610034B (en) Method and device for identifying character entities in video, storage medium and electronic equipment
CN111126159A (en) Method, apparatus, electronic device, and medium for tracking pedestrian in real time
CN112714263B (en) Video generation method, device, equipment and storage medium
CN113409468A (en) Image processing method and device, electronic equipment and storage medium
CN111447379B (en) Method and device for generating information
CN110189364B (en) Method and device for generating information, and target tracking method and device
CN110717467A (en) Head pose estimation method, device, equipment and storage medium
CN114996515A (en) Training method of video feature extraction model, text generation method and device

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