CN115359194B - Image processing method, image processing device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN115359194B
CN115359194B CN202211284013.7A CN202211284013A CN115359194B CN 115359194 B CN115359194 B CN 115359194B CN 202211284013 A CN202211284013 A CN 202211284013A CN 115359194 B CN115359194 B CN 115359194B
Authority
CN
China
Prior art keywords
body contour
adjusted
contour points
points
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211284013.7A
Other languages
Chinese (zh)
Other versions
CN115359194A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211284013.7A priority Critical patent/CN115359194B/en
Publication of CN115359194A publication Critical patent/CN115359194A/en
Application granted granted Critical
Publication of CN115359194B publication Critical patent/CN115359194B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2021Shape modification

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The disclosure provides an image processing method, an image processing device, electronic equipment and a storage medium, relates to the technical field of artificial intelligence, in particular to the technical fields of augmented reality, virtual reality, computer vision, deep learning and the like, and can be applied to scenes such as a meta universe, virtual digital people and the like. The implementation scheme is as follows: determining a plurality of body contour points of a human body in an image, wherein each body contour point corresponds to a body part of the human body; dividing the plurality of body contour points into a plurality of groups according to body parts; determining a body contour point to be adjusted in the plurality of body contour points; determining whether the body contour points to be adjusted are in the same group; and adjusting the position of the body contour points to be adjusted in response to determining that the body contour points to be adjusted are in the same group.

Description

Image processing method, image processing device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of artificial intelligence technologies, and in particular, to the field of technologies such as augmented reality, virtual reality, computer vision, and deep learning, which can be applied to scenes such as the meta universe and virtual digital people, and in particular, to an image processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
In recent years, with the gradual rise of technologies such as the metasma and the virtual digital man, image processing methods used in these scenes are continuously updated and iterated, especially image processing methods in scenes such as beauty pictures and beauty, and the realization effect in the case of facing multi-person images is also challenged in scenes such as the beauty of clouds, and how to provide an ideal body beauty effect for such multi-person images is still one of research hotspots and difficulties in the industry.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, the problems mentioned in this section should not be considered as having been acknowledged in any prior art, unless otherwise indicated.
Disclosure of Invention
The present disclosure provides an image processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
According to an aspect of the present disclosure, there is provided an image processing method comprising determining a plurality of body contour points of a human body in an image, wherein each body contour point corresponds to a body part of the human body; dividing the plurality of body contour points into a plurality of groups according to body parts; determining a body contour point to be adjusted in the plurality of body contour points; determining whether the body contour points to be adjusted are in the same group; and adjusting the position of the body contour points to be adjusted in response to determining that the body contour points to be adjusted are in the same group.
According to another aspect of the present disclosure, there is provided an image processing apparatus comprising a contour point determination module configured to determine a plurality of body contour points of a human body in an image, wherein each body contour point corresponds to a body part of the human body; a contour point grouping module configured to divide a plurality of body contour points into a plurality of groups by body part; a to-be-adjusted point determination module configured to determine a body contour point to be adjusted among the plurality of body contour points; a first determination module configured to determine whether the body contour points to be adjusted are in the same group; a first adjustment module configured to adjust a position of a body contour point to be adjusted in response to determining that the body contour point to be adjusted is in the same group.
According to another aspect of the present disclosure, there is provided an electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of the present disclosure as provided above.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of the present disclosure as provided above.
According to one or more embodiments of the present disclosure, a cosmetic effect on a human body in an image may be enhanced.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the embodiments and, together with the description, serve to explain the exemplary implementations of the embodiments. The illustrated embodiments are for purposes of illustration only and do not limit the scope of the claims. Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, according to an embodiment of the present disclosure;
FIG. 2 shows a flow diagram of an image processing method according to an embodiment of the present disclosure;
FIG. 3 shows a flow chart of a body part overlap determination process according to an embodiment of the present disclosure;
FIG. 4 shows a schematic diagram of the step of determining whether additional body contour points are present in the target body part according to an embodiment of the present disclosure;
FIG. 5 shows a schematic diagram of the steps of triangulation according to an embodiment of the present disclosure;
FIG. 6 shows a schematic diagram of the step of moving body contour points to be adjusted according to an embodiment of the present disclosure;
FIG. 7 shows a schematic diagram of the steps of comparing to a predetermined human body template according to an embodiment of the present disclosure;
fig. 8 shows a block diagram of the structure of an image processing apparatus according to an embodiment of the present disclosure;
fig. 9 shows a block diagram of the configuration of an image processing apparatus according to another embodiment of the present disclosure;
FIG. 10 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to define a positional relationship, a temporal relationship, or an importance relationship of the elements, and such terms are used only to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, based on the context, they may also refer to different instances.
The terminology used in the description of the various described examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the elements may be one or more. Furthermore, the term "and/or" as used in this disclosure is intended to encompass any and all possible combinations of the listed items.
In the related art, a method of image processing is generally realized by performing body contour deformation processing on a single whole body basis. In the image with a plurality of people, the image processing with a plurality of people is realized by performing deformation processing on the body contour of the first person in the image, then performing body contour deformation processing on the next person by taking the image output after the single person contour processing in the previous step as an input image, and repeating the operation until the body contour deformation processing of all the people in the image is completed.
However, in the implementation of this method, a body distortion phenomenon may occur, and it is difficult to achieve a good image processing effect, so an image processing method capable of enhancing the beauty effect of the human body in the image is needed.
In view of the above technical problem, according to one aspect of the present disclosure, an image processing method is provided.
Before describing in detail the image processing method according to an embodiment of the present disclosure, a schematic diagram of an exemplary system in which the various methods and apparatuses described herein may be implemented is first described in conjunction with fig. 1.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented, according to an embodiment of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the image processing method to be performed.
In some embodiments, the server 120 may also provide other services or software applications, which may include non-virtual environments and virtual environments. In certain embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof, which may be executed by one or more processors. A user operating a client device 101, 102, 103, 104, 105, and/or 106 may, in turn, utilize one or more client applications to interact with the server 120 to take advantage of the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Accordingly, fig. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
The user may use client devices 101, 102, 103, 104, 105, and/or 106 to instruct image processing and obtain results of the image processing. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that any number of client devices may be supported by the present disclosure.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and so forth. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, linux, or Linux-like operating systems (e.g., GOOGLE Chrome OS); or include various Mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, windows Phone, android. Portable handheld devices may include cellular telephones, smart phones, tablets, personal Digital Assistants (PDAs), and the like. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. The gaming system may include a variety of handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. Merely by way of example, one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a blockchain network, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of logical storage that may be virtualized to maintain virtual storage for the server). In various embodiments, the server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above, as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
In some implementations, the server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of the client devices 101, 102, 103, 104, 105, and/or 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and/or 106.
In some embodiments, the server 120 may be a server of a distributed system, or a server incorporating a blockchain. The server 120 may also be a cloud server, or a smart cloud computing server or a smart cloud host with artificial intelligence technology. The cloud Server is a host product in a cloud computing service system, and is used for solving the defects of high management difficulty and weak service expansibility in the conventional physical host and Virtual Private Server (VPS) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The database 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The database 130 may be of different types. In certain embodiments, the database used by the server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data to and from the database in response to the command.
In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key-value stores, object stores, or conventional stores supported by a file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
An image processing method according to an embodiment of the present disclosure is described in detail below.
FIG. 2 shows a flow diagram of an image processing method 200 according to an embodiment of the disclosure. As shown in fig. 2, the method 200 includes steps S201, S202, S203, S204, and S205.
In step S201, a plurality of body contour points of a human body in an image are determined, each body contour point corresponding to a body part of the human body.
In an example, the image may be a picture or photograph containing a single person or a plurality of persons. In some application scenarios, processing may be performed for parts of the body other than the head, neck, hands and feet for the purpose of body shaping the person in the image. For example, these parts may not be processed when determining body contour points. In other application scenarios, the processing of the head may be performed by the image processing method provided by the embodiment of the present disclosure, or may be performed by a dedicated image processing method for the head.
In an example, the body contour points of the human body in the image may be obtained by a known body contour detection algorithm. The body contour detection algorithm may take as input the front image and/or the side image of the body, with which the body contour is extracted to generate a plurality of body contour points. The body contour points may be feature points determined according to the algorithm.
In an example, the body contour detection algorithm may assign semantic information to the extracted body contour points, i.e. the body contour points are located at body parts of the human body and relative positions to other neighboring body contour points. Thus, each body contour point corresponds to a body part of the human body.
In step S202, a plurality of body contour points are divided into a plurality of groups by body part.
In an example, the basis for the body contour point grouping may be the semantic information given to the body contour points by the body contour detection algorithm described above. That is, the plurality of body contour points may be divided into a plurality of groups according to the body part according to semantic information of the body contour points.
In an example, the body contour points may be divided, for example, into groups of left arms, right arms, torso, left legs, and right legs, in terms of body parts. Such a grouping manner can give consideration to both image processing efficiency and image processing effect.
It will be appreciated that the number of groups may determine the accuracy of the body contouring, i.e. the cropping, in the image. The accuracy of image processing can be improved by dividing the body contour points into more groups to reduce the area of single image processing, where processing resources allow.
In step S203, a body contour point to be adjusted among the plurality of body contour points is determined.
In an example, the body contour point to be adjusted may be specified by a user, for example, the user may select a specific body contour point from a plurality of body contour points as the body contour point to be adjusted on an operation interface provided by an application or software related to body shaping processing.
In an example, the body contour points to be adjusted may be determined by a processing algorithm employed within an application or software associated with body contouring, such as a "one-touch" function. For example, a plurality of body contour points may be compared with a plurality of reference body contour points of a predetermined human body template to determine the body contour points to be adjusted.
In step S204, it is determined whether the body contour points to be adjusted are in the same group.
In an example, it may be determined that there are one or more body contour points to be adjusted, depending on the circumstances. When there is only one body contour point to be adjusted, the body contour point to be adjusted must be located in only one group. When there are a plurality of body contour points to be adjusted, according to the method of the embodiment of the present disclosure, it is necessary to determine whether the body contour points to be adjusted are in the same group, so as to process the body contour points to be adjusted in units of groups (i.e., in units of body parts), thereby avoiding mutual influence between different body parts during body beauty treatment.
In step S205, in response to determining that the body contour points to be adjusted are in the same group, the positions of the body contour points to be adjusted are adjusted.
In an example, adjusting the position of the body contour point to be adjusted may be shifting a single one of the body contour points, or shifting two body contour points that are approximately symmetrical in the same body part by increasing or decreasing the pitch (e.g., increasing or decreasing the pitch of two symmetrical body contour points in the left arm).
In an example, if a situation occurs in which the body contour points to be adjusted span multiple groups (i.e., multiple body parts), the positions of the body contour points to be adjusted in the respective groups may be adjusted, respectively. For example, assuming that the body contour points to be adjusted include a first contour point located at an arm and a second contour point located at a torso, the first contour point and the second contour point may be processed separately in units of groups (i.e., in units of body parts). Therefore, the mutual influence between the image processing of different body parts can be reduced, thereby reducing the distortion phenomenon, and enhancing the beautifying effect on the human body in the image.
According to the image processing method of the embodiment of the present disclosure, by dividing the body contour points of the human body in the image into a plurality of groups by the body part, and adjusting the positions of the body contour points to be adjusted in units of the divided groups (i.e., in units of the body part) to perform contour transformation processing, it is possible to eliminate the influence on other body parts due to the position adjustment of the body contour points to be adjusted in the body part when processing the contour of a certain body part, thereby reducing the distortion phenomenon, thereby enhancing the beauty effect on the human body in the image.
In the technical scheme of the present disclosure, the processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the information related to the image all conform to the regulations of the related laws and regulations, and do not violate the good custom of the public order.
Various aspects of an image processing method according to an embodiment of the present disclosure are further described below.
Fig. 3 shows a flow diagram of a body part overlap determination process 300 according to an embodiment of the present disclosure. The body-part overlap determination procedure 300 may be performed in step S205, for example, as described in connection with fig. 2. That is, when the position of the body contour point to be adjusted is adjusted, it can also be determined whether there is a situation of body part overlap, so as to further eliminate the influence on the human body shaping effect due to the body part overlap. Situations where there is a body-part overlap may include, for example, a situation where multiple people in an image overlap each other (e.g., one person's arm covers another person's arm), a situation where different body parts of a single person overlap each other (e.g., one person's arm covers his torso), a situation where a body part of a single person is occluded by an item (one person's arm is occluded by an object).
As shown in fig. 3, the body part overlap determination process 300 may include steps S301, S302, and S303.
In step S301, a body part corresponding to the body contour point to be adjusted may be determined as a target body part.
In an example, the body part may include, for example, a left arm, a right arm, a torso, a left leg, and a right leg. The body contour points may be divided, for example, into groups of left arms, right arms, torso, left legs, and right legs, according to body parts. For example, if the determined body contour point to be adjusted is located on the left arm, the left arm may be determined as the target body part.
In step S302, it may be determined whether there are additional body contour points in the target body part, the additional body contour points not having a correspondence relationship with the target body part.
In an example, the presence of an additional body contour point in the target body part, which has no correspondence with the target body part, may indicate that the target body part overlaps with other body parts. For example, overlapping the target body part with other body parts may refer to overlapping the target body part with other body parts of the same person (e.g., one person's arm covers his torso), or overlapping the target body part with some body part of another person in the image (e.g., one person's arm covers another person's arm). As another example, the target body part may also overlap with non-human objects in the image, such as a person's arm being blocked by something.
In step S303, in response to determining that no additional body contour points exist, the positions of the body contour points to be adjusted may be adjusted.
In an example, the absence of additional body contour points in the target body part may indicate that the target body part does not overlap with other body parts, and thus the position of the body contour points to be adjusted may be adjusted. Therefore, when the position of the body contour point to be adjusted is adjusted, the influence on the body shaping effect caused by the overlapping of body parts can be eliminated.
In an example, if there are additional body contour points in the target body part, the body contour points to be adjusted located in the target body part may not be adjusted to avoid affecting the body shaping effect.
According to the body part overlapping determining process disclosed by the embodiment of the disclosure, by adjusting the positions of the body contour points to be adjusted under the condition that the target body part is determined not to be overlapped with other body parts, the influence of additional body contour points, which do not belong to the part, in the target body part on the contour processing of the target body part can be avoided, so that the accuracy of image processing is further improved, and the beautifying effect on the human body in the image is enhanced.
Fig. 4 shows a schematic diagram of the step of determining whether additional body contour points are present in the target body part according to an embodiment of the present disclosure. This step may be, for example, step S302 described in connection with fig. 3.
As shown in fig. 4, an image 400 may be image processed, with a first human body 410 and a second human body 420 present in the image 400. The image 400 may represent, for example, a frontal photograph of a first body 410 and a second body 420. The black dots shown in fig. 4 may represent body contour points of the first and second human bodies 410 and 420.
In the example, in the body part of the first human body 410, there is an additional body contour point 412a within the area of the left arm 411, which body contour point 412a belongs to the torso 412. Thus, the body contour point 412a has no correspondence with the left arm 411, which may indicate that the left arm 411 of the human body 410 overlaps the torso 412.
In the example, in the body part of the first person 410, there are additional body contour points 421a, 421b and 421c within the area of the right arm 413, which belong to the left arm 421 of the second person 420. Thus, the body contour point 421a, the body contour point 421b, and the body contour point 421c have no correspondence with the right arm 413 of the first person 410, which may indicate that the right arm 413 of the first person 410 overlaps with the other persons in the image, i.e., the left arm 421 of the second person 420.
Accordingly, in the case where it is determined that the additional body contour point 412a exists in the left arm 411 of the first human body 410 and the additional body contour points 421a, 421b, and 421c exist in the right arm 413, the body contour points to be adjusted located in the left arm 411 and the right arm 413 may not be adjusted to avoid affecting the body beauty effect.
According to some embodiments, the image processing method of the present disclosure may further include: a plurality of body contour points of a human body are triangulated to form a plurality of initial triangles that do not overlap. Accordingly, adjusting the position of the body contour point to be adjusted may comprise: the body contour points to be adjusted are moved to form a plurality of adjusted triangles that are different from the plurality of initial triangles.
According to the triangulation step of the embodiment of the present disclosure, by triangulating a plurality of body contour points of a human body to form a plurality of initial triangles that do not overlap and moving the body contour points to be adjusted to form a plurality of adjusted triangles that are different from the plurality of initial triangles, it is possible to perform local image processing with respect to the plurality of initial triangles having the body contour points to be adjusted as vertices in a targeted manner. This processing method is small in calculation amount and fast in processing speed, and can enable a non-adjustment region (i.e., an initial triangle not having a body contour point to be adjusted as a vertex) in an image to have a good holding effect.
Fig. 5 shows a schematic diagram of the steps of triangulation according to an embodiment of the present disclosure.
As shown in fig. 5, a human body 510 in an image 500 is shown, as well as a plurality of body contour points (represented by black dots) of the human body 510. A plurality of body contour points of the human body 510 may be triangulated, the results of which are shown in fig. 5.
In an example, triangulation may be a geometric way of segmenting a face that should satisfy: each body contour point serves as a vertex of at least one initial triangle, i.e. no "free" body contour points are allowed to exist; there are no intersections of the edges of any different initial triangle other than the common vertex; there is no area overlap between any different initial triangles.
For convenience of explanation, fig. 5 illustrates body contour points 511, 512, 513, and 514 as examples. An initial triangle 515 with body contour points 511, 512, and 514 as vertices and an initial triangle 516 with body contour points 512, 513, and 514 as vertices are shown. Since the plurality of initial triangles cannot overlap each other, there cannot be both an initial triangle having the body contour point 511, the body contour point 512, and the body contour point 513 as vertices and an initial triangle having the body contour point 511, the body contour point 513, and the body contour point 514 as vertices.
It is understood that the triangulation results shown in fig. 5 are only an example, and that multiple body contour points of the human body 510 may be triangulated to form multiple initial triangles that are different from the non-overlapping triangles shown in fig. 5.
According to some embodiments, moving the body contour points to be adjusted to form a plurality of adjusted triangles that are different from the plurality of initial triangles may comprise: determining the moving distance of the body contour point to be adjusted; and moving the body contour points to be adjusted based on the movement distance to form a plurality of adjusted triangles.
According to the step of moving the body contour points to be adjusted of the embodiment of the present disclosure, by determining the moving distance of the body contour points to be adjusted and moving the body contour points to be adjusted based on the moving distance to form a plurality of adjusted triangles, image processing can be performed more finely, thereby enhancing the beauty effect on the human body in the image.
Fig. 6 shows a schematic diagram of the step of moving body contour points to be adjusted according to an embodiment of the present disclosure. As shown in fig. 6, a human body 610 in an image 600 is shown, as well as a plurality of body contour points (represented by black dots) of the human body 610. A plurality of body contour points of the human body 610 may be triangulated, the results of which are shown in fig. 6.
In the example, for convenience of explanation, the body contour point 611, the body contour point 612, the body contour point 613, the body contour point 614, and the body contour point 615 are used as examples. Assume that the body contour point to be adjusted is determined to be the body contour point 611, and that the body contour point 611 is determined to be moved by a movement distance 616 as shown in fig. 6 to reduce the circumference of the corresponding arm. Thus, moving the body contour point 611 to be adjusted to the position of the new body contour point 611a based on the moving distance 616 may form a plurality of adjusted triangles, including a triangle 621 with the body contour point 611a, the body contour point 612, and the body contour point 615 as vertices, a triangle 622 with the body contour point 611a, the body contour point 612, and the body contour point 613 as vertices, a triangle 622 with the body contour point 611a, the body contour point 613, and the body contour point 614 as vertices, and a triangle 624 with the body contour point 611a, the body contour point 614, and the body contour point 615 as vertices.
It is understood that the position shift of the body contour point 611 shown in fig. 6 is only an example, and the position shift of one or more other body contour points of the human body 610 may be performed.
According to some embodiments, determining the movement distance of the body contour point to be adjusted may comprise at least one of: determining the size of the moving distance based on the designation of the user; and comparing the body contour point to be adjusted with a reference body contour point of a preset human body template to determine the size of the movement distance.
By determining the moving distance of the body contour point to be adjusted based on the designation of the user, the user can be given more independent choices, so that the result of image processing conforms to the aesthetic sense of different users, and the image processing is more targeted for the user. The moving distance of the body contour point to be adjusted is determined by comparing the moving distance with the preset human body template, so that the image processing is more convenient and concise, and meanwhile, the image processing method has scientificity, and the image processing result conforms to the mass aesthetic feeling.
Fig. 7 shows a schematic diagram of the steps of comparing with a predetermined human body template according to an embodiment of the present disclosure. As shown in fig. 7, a human body 710 in an image 700 and a plurality of body contour points (represented by black dots) of the human body 710 are shown. A plurality of body contour points of the human body 710 may be triangulated, the results of which are shown in fig. 7. Fig. 7 also shows a predetermined body template 720, and a plurality of reference body contour points (indicated by black dots) of the predetermined body template 720.
In the example, for convenience of explanation, the body contour point 711 to be adjusted on the human body 710 and the reference body contour point 721 on the predetermined human body template 720 are exemplified.
According to some embodiments, the user may determine the size of the movement distance by specifying a specific numerical value of the movement distance, and may also determine the size of the movement distance by specifying the image processing magnitude. According to some embodiments, the size of the movement distance may also be determined by comparison with a predetermined body template.
In an example, as shown in fig. 7, the movement distance 730 of the body contour point 711 to be adjusted may be specified by the user. Alternatively or additionally, it may also be determined that the body contour point 711 should be moved to the position of the reference body contour point 721 of the predetermined body template 720 by comparing the body contour point of the human body 710 in the image 700 with the reference body contour point of the predetermined body template 720, whereupon the movement distance 730 may be determined.
According to some embodiments, determining a body contour point to be adjusted among the plurality of body contour points may comprise: selecting a specific body contour point from the plurality of body contour points as a body contour point to be adjusted based on the designation of the user; or comparing the plurality of body contour points with a plurality of reference body contour points of a predetermined human body template to determine the body contour points to be adjusted.
The body contour point to be adjusted in the plurality of body contour points is determined based on the specification of the user, so that more autonomous choices can be provided for the user, the result of image processing conforms to the aesthetic feelings of different users, and the image processing is more targeted for the user. The body contour points to be adjusted in the plurality of body contour points are determined by comparing the body contour points with the preset human body template, so that the image processing is more convenient and concise, and meanwhile, the image processing method has scientificity, and the image processing result conforms to the mass aesthetic feeling.
In an example, as shown in fig. 7, the user may be able to adjust the body contour points by specifying a particular body contour point, e.g., body contour point 711; one or more body contour points in the area of the right arm 740 may also be determined as body contour points to be adjusted by designating a specific body part, for example the right arm 740, as the body part to be adjusted.
In an example, as shown in fig. 7, information that the body contour point 711 has a large deviation from the reference body contour point 721 of the predetermined body template 720 can be obtained by comparing the body 710 in the image 700 with the reference body contour point of the predetermined body template 720, and then the body contour point 711 can be determined as the body contour point to be adjusted.
According to some embodiments, the image processing method of the present disclosure may further include: in response to determining that the body contour points to be adjusted are not in the same group, the positions of the body contour points to be adjusted in the respective groups are adjusted, respectively.
In an example, for a plurality of body contour points to be adjusted that are not in the same group, position adjustment may be performed sequentially in units of groups based on a predetermined order; on the premise of not influencing the body part contour of the non-belonging group, the positions of a plurality of body contour points to be adjusted, which are not in the same group, can be adjusted by taking the group as a unit.
Under the condition that the body contour points to be adjusted are determined not to be in the same group, the positions of the body contour points to be adjusted in the corresponding groups are respectively adjusted, so that mutual influence among different body parts during image processing can be avoided, the image processing process is more precise, and the beautifying effect on the human body in the image is enhanced.
According to some embodiments, adjusting the positions of the body contour points to be adjusted in the respective groups, respectively, may comprise: sequentially adjusting the positions of the body contour points to be adjusted in the corresponding group based on a predetermined processing order; or simultaneously the positions of the body contour points to be adjusted in the respective group.
In an example, if the positions of the body contour points to be adjusted in the corresponding groups are adjusted at the same time, the body part contours corresponding to different groups may affect each other, the positions of the body contour points to be adjusted in the groups that do not affect each other may be adjusted at the same time, and then the positions of the body contour points to be adjusted in the remaining groups that need to be adjusted may be adjusted.
By sequentially adjusting the positions of the body contour points to be adjusted in each group according to a predetermined sequence, the mutual influence between different body parts during image processing can be avoided, the image processing process is more precise, and the beauty effect on the human body in the image is enhanced. By simultaneously adjusting the positions of the body contour points to be adjusted in the respective groups, image processing can be performed more efficiently.
According to some embodiments, the body contour points to be adjusted may comprise two body contour points having a symmetrical positional relationship on the same body part, and in response to determining that the body contour points to be adjusted are in the same group, adjusting the positions of the body contour points to be adjusted may comprise: the two body contour points are moved towards each other or away from each other.
In an example, the processing of the image may be by moving two body contour points towards each other to make the human body in the image visually appear more slim. For example, moving two body contour points located on the inner and outer sides of an arm towards each other can achieve an effect of arm thinning. The image may also be processed by moving the two body contour points away from each other so that the human body in the image appears visually more voluminous. For example, moving two body contour points located on the left and right sides of the upper torso away from each other may achieve an effect of increasing the bust.
By moving two body contour points having a symmetrical positional relationship on the same body part toward each other, the human body in the image can be made visually slim. By moving two body contour points having a symmetrical positional relationship on the same body part away from each other, the human body in the image can be made to appear visually voluminous. Therefore, the human body in the image can be better beautified by processing different parts with pertinence.
According to some embodiments, the plurality of groups divided by body parts may include: a group of left arms, a group of right arms, a group of torso, a group of left legs, and a group of right legs.
By dividing the body part into the left arm, the right arm, the trunk, the left leg and the right leg, and thus dividing five corresponding groups, both the image processing efficiency and the image processing effect can be taken into consideration.
According to some embodiments, the image processing method disclosed by the disclosure can be suitable for image processing of a cloud end and can also be suitable for image processing of a mobile device end.
According to another aspect of the present disclosure, an image processing apparatus is also provided.
Fig. 8 shows a block diagram of an image processing apparatus 800 according to an embodiment of the present disclosure.
As shown in fig. 8, the apparatus 800 includes: a contour point determination module 810 configured to determine a plurality of body contour points of a human body in an image, each body contour point corresponding to a body part of the human body; a contour point grouping module 820 configured to divide a plurality of body contour points into a plurality of groups by body part; a to-be-adjusted point determining module 830 configured to determine a body contour point to be adjusted among the plurality of body contour points; a first decision module 840 configured to determine whether the body contour points to be adjusted are in the same group; a first adjustment module 850 configured to adjust the position of the body contour points to be adjusted in response to determining that the body contour points to be adjusted are in the same group.
According to the embodiment of the disclosure, the human body in the image is divided into a plurality of groups according to the body part, the position of the body contour point to be adjusted is adjusted by taking the divided groups as units, and the contour deformation processing is performed, so that when the contour of a certain body part is processed, the influence of the position adjustment of the body contour point to be adjusted on the body part on the contours of other body parts can be eliminated, the distortion phenomenon is reduced, and the better image processing effect and the better body beautifying effect are realized.
Since the contour point determining module 810, the contour point grouping module 820, the to-be-adjusted point determining module 830, the first determining module 840, and the first adjusting module 850 may respectively correspond to steps S201 to S205 described in fig. 2, details of various aspects thereof are not repeated here.
In addition, the apparatus 800 and the modules comprised therein may also comprise further sub-modules, which will be explained in detail below in connection with fig. 9.
Fig. 9 shows a block diagram of an image processing apparatus 900 according to another embodiment of the present disclosure.
As shown in fig. 9, the apparatus 900 may include a contour point determining module 910, a contour point grouping module 920, a point to be adjusted determining module 930, a first determining module 940, and a first adjusting module 950. The contour point determining module 910, the contour point grouping module 920, the to-be-adjusted point determining module 930, the first determining module 940 and the first adjusting module 950 may correspond to the contour point determining module 810, the contour point grouping module 820, the to-be-adjusted point determining module 830, the first determining module 840 and the first adjusting module 850 shown in fig. 8, and therefore details thereof are not repeated herein.
In an example, the first adjustment module 950 may include: a target body part determination module 951 configured to determine a body part corresponding to a body contour point to be adjusted as a target body part; a second decision module 952 configured to determine whether there are additional body contour points in the target body part, the additional body contour points having no correspondence with the target body part; and a second adjustment module 953 configured to adjust the position of the body contour points to be adjusted in response to determining that no additional body contour points are present.
Therefore, whether extra body contour points exist in the target body part or not is determined, and the positions of the body contour points to be adjusted are adjusted in the target body part which is not overlapped with other body parts, so that the influence of the position adjustment of the body contour points to be adjusted in the target body part on the contours of other body parts can be reduced, the influence of the extra body contour points in the target body part on the contour processing of the target body part can be avoided, the accuracy of image processing is improved, and a better image processing effect is realized.
In an example, the apparatus 900 may further include: a triangulation module 960 configured to triangulate a plurality of body contour points of a human body to form a plurality of initial triangles that do not overlap. The first adjusting module 950 may further include a third adjusting module 954 configured to move the body contour points to be adjusted to form a plurality of adjusted triangles that are different from the plurality of initial triangles.
Thus, local image processing can be performed on a plurality of initial triangles with the body contour points to be adjusted as vertices in a targeted manner by triangulating a plurality of body contour points of a human body to form a plurality of non-overlapping initial triangles, moving the body contour points to be adjusted to form a plurality of adjusted triangles different from the plurality of initial triangles. The processing method has small calculation amount and high processing speed, and can ensure that the non-adjustment area in the image, namely the initial triangle which does not take the body contour point to be adjusted as the vertex, has good holding effect.
In an example, the third adjusting module 954 may include a movement distance determining module 954-1 configured to determine a movement distance of the body contour point to be adjusted; and a fourth adjusting module 954-2 configured to move the body contour points to be adjusted based on the moving distance to form a plurality of adjusted triangles.
Therefore, by determining the moving distance of the body contour point to be adjusted and moving the body contour point to be adjusted based on the moving distance to form a plurality of adjusted triangles, image processing can be performed more finely, and a better image processing effect can be achieved.
In an example, the movement distance determination module 954-1 may include a movement distance estimation module 954-1a configured to perform at least one of: determining the size of the moving distance based on the designation of the user; and comparing the body contour point to be adjusted with a reference body contour point of a preset human body template to determine the size of the movement distance.
Therefore, the moving distance of the body contour point to be adjusted is determined based on the specification of the user, more independent selections can be given to the user, the image processing result is in accordance with the aesthetic feelings of different users, and the image processing is more targeted to the user. The moving distance of the body contour point to be adjusted is determined by comparing the moving distance with the preset human body template, so that the image processing is more convenient and concise, and meanwhile, the image processing method has scientificity, and the image processing result conforms to the mass aesthetic feeling.
In an example, the to-be-adjusted point determining module 930 may include a contour point selecting module 931 configured to perform: selecting a specific body contour point from the plurality of body contour points as a body contour point to be adjusted based on the designation of the user; or comparing the plurality of body contour points with a plurality of reference body contour points of a predetermined human body template to determine the body contour points to be adjusted.
Therefore, more independent choices can be provided for the user by determining the body contour points to be adjusted in the plurality of body contour points based on the specification of the user, so that the image processing result conforms to the aesthetic feelings of different users, and the image processing is more targeted for the user. The body contour points to be adjusted in the plurality of body contour points are determined by comparing the body contour points with the preset human body template, so that the image processing is more convenient and concise, and meanwhile, the image processing method has scientificity, and the image processing result conforms to the mass aesthetic feeling.
In an example, the apparatus 900 may further include a loop module 970 configured to adjust the positions of the body contour points to be adjusted in the respective groups, respectively, in response to determining that the body contour points to be adjusted are not in the same group.
Therefore, by responding to the fact that the body contour points to be adjusted are not in the same group and respectively adjusting the positions of the body contour points to be adjusted in the corresponding group, mutual influence among different body parts during image processing can be avoided, the image processing process is finer, and better image processing effect is achieved.
In an example, the loop module 970 may include a sequential execution module 971 configured to perform: sequentially adjusting the positions of the body contour points to be adjusted in the corresponding group based on a predetermined processing order; or simultaneously adjust the position of the body contour points to be adjusted in the respective group.
Therefore, by sequentially adjusting the positions of the body contour points to be adjusted in each group according to a preset sequence, the mutual influence between different body parts during image processing can be avoided, the image processing process is finer, and the beautifying effect on the human body in the image is enhanced. By simultaneously adjusting the positions of the body contour points to be adjusted in the respective groups, image processing can be performed more efficiently.
In an example, the body contour points to be adjusted may include two body contour points having a symmetrical positional relationship on the same body part. The first adjusting module 950 may further include: a symmetry adjustment module 955 configured to move the two body contour points towards each other or away from each other.
Thus, by moving two body contour points having a symmetrical positional relationship on the same body part toward each other, the human body in the image can be visually made to appear slimmer. By moving two body contour points having a symmetrical positional relationship on the same body part away from each other, the human body in the image can be made to appear visually voluminous. In this way, by performing targeted processing on different parts, a better body shaping effect in the image can be achieved.
In an example, the plurality of groups divided by body parts may include: a group of left arms, a group of right arms, a group of torso, a group of left legs, and a group of right legs.
Thus, by dividing the body part into the left arm, the right arm, the torso, the left leg, and the right leg, and thereby dividing five corresponding groups, both the image processing efficiency and the image processing effect can be taken into consideration.
According to another aspect of the present disclosure, there is also provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the above embodiments.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method in the above-described embodiments.
Referring to fig. 10, a block diagram of a structure of an electronic device 1000, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the electronic device 1000 includes a computing unit 1001 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a Random Access Memory (RAM) 1003. In the RAM1003, various programs and data necessary for the operation of the electronic apparatus 1000 can be stored. The calculation unit 1001, the ROM 1002, and the RAM1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
A number of components in the electronic device 1000 are connected to the I/O interface 1005, including: input section 1006, output section 1007, storage section 1008, and communication section 1009. The input unit 1006 may be any type of device capable of inputting information to the electronic device 1000, and the input unit 1006 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and/or a remote controller. Output unit 1007 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. The storage unit 1008 may include, but is not limited to, a magnetic disk, an optical disk. The communications unit 1009 allows the electronic device 1000 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and/or chipsets, such as bluetooth (TM) devices, 802.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
Computing unit 1001 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 1001 executes the respective methods and processes described above, such as an image processing method. For example, in some embodiments, the image processing method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of a computer program may be loaded and/or installed onto the electronic device 1000 via the ROM 1002 and/or the communication unit 1009. When the computer program is loaded into the RAM1003 and executed by the computing unit 1001, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform the image processing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be performed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical aspects of the present disclosure can be achieved.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the above-described methods, systems and apparatus are merely exemplary embodiments or examples and that the scope of the present invention is not limited by these embodiments or examples, but only by the claims as issued and their equivalents. Various elements in the embodiments or examples may be omitted or may be replaced with equivalents thereof. Further, the steps may be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the present disclosure.

Claims (14)

1. An image processing method comprising:
determining a plurality of body contour points of a human body in an image, wherein each body contour point corresponds to a body part of the human body;
dividing the plurality of body contour points into a plurality of groups by the body part, wherein a same group corresponds to a same body part, wherein the plurality of groups divided by the body part include: a group of left arms, a group of right arms, a group of torso, a group of left legs, and a group of right legs;
determining a body contour point to be adjusted among the plurality of body contour points;
determining whether the body contour points to be adjusted are in the same group corresponding to the same body part;
adjusting the position of the body contour points to be adjusted in response to determining that the body contour points to be adjusted are in the same group corresponding to the same body part, comprising:
determining a body part corresponding to the body contour point to be adjusted as a target body part;
determining whether additional body contour points are present in the target body part, wherein the additional body contour points do not have a correspondence with the target body part; and
adjusting the position of the body contour point to be adjusted in response to determining that the additional body contour point is not present; and
in response to determining that the body contour points to be adjusted are not in the same group corresponding to the same body part, adjusting the positions of the body contour points to be adjusted in the respective different groups, respectively,
the method further comprises the following steps: triangulating the plurality of body contour points of the human body to form a plurality of non-overlapping initial triangles, wherein the adjusting the position of the body contour points to be adjusted comprises: moving the body contour points to be adjusted to form a plurality of adjusted triangles that are different from the plurality of initial triangles.
2. The method of claim 1, wherein said moving the body contour points to be adjusted to form a plurality of adjusted triangles different from the plurality of initial triangles comprises:
determining the moving distance of the body contour point to be adjusted; and
moving the body contour points to be adjusted based on the movement distance to form the plurality of adjusted triangles.
3. The method of claim 2, wherein the determining a movement distance of the body contour point to be adjusted comprises at least one of:
determining the size of the moving distance based on the designation of a user; and
and comparing the body contour point to be adjusted with a reference body contour point of a preset human body template to determine the size of the moving distance.
4. The method of claim 1, wherein the determining a body contour point of the plurality of body contour points to be adjusted comprises:
selecting a specific body contour point from the plurality of body contour points as the body contour point to be adjusted based on a designation of a user; or
Comparing the plurality of body contour points with a plurality of reference body contour points of a predetermined human body template to determine the body contour points to be adjusted.
5. The method according to claim 1, wherein said individually adjusting the positions of the body contour points to be adjusted in the respective different groups comprises:
sequentially adjusting the positions of the body contour points to be adjusted in the different groups based on a predetermined processing sequence; or
Simultaneously adjusting the positions of the body contour points to be adjusted in the respective different groups.
6. The method according to claim 1, wherein the body contour points to be adjusted include two body contour points having a symmetrical positional relationship on the same body part,
wherein said adjusting the position of the body contour point to be adjusted in response to determining that the body contour point to be adjusted is in the same group corresponding to the same body part comprises:
moving the two body contour points towards or away from each other.
7. An image processing apparatus comprising:
a contour point determination module configured to determine a plurality of body contour points of a human body in an image, wherein each body contour point corresponds to a body part of the human body;
a contour point grouping module configured to divide the plurality of body contour points into a plurality of groups by the body part, wherein a same group corresponds to a same body part, wherein the plurality of groups divided by the body part include: a group of left arms, a group of right arms, a group of torso, a group of left legs, and a group of right legs;
a to-be-adjusted point determination module configured to determine a body contour point to be adjusted among the plurality of body contour points;
a first determination module configured to determine whether the body contour points to be adjusted are in a same group corresponding to a same body part;
a first adjustment module configured to adjust a position of the body contour points to be adjusted in response to determining that the body contour points to be adjusted are in a same group corresponding to a same body part, the first adjustment module comprising:
a target body part determination module configured to determine a body part corresponding to the body contour point to be adjusted as a target body part;
a second determination module configured to determine whether additional body contour points exist in the target body part, wherein the additional body contour points do not have a corresponding relationship with the target body part; and
a second adjustment module configured to adjust a position of the body contour point to be adjusted in response to determining that the additional body contour point is not present; and
a rotation module configured to adjust positions of the body contour points to be adjusted in respective different groups, respectively, in response to determining that the body contour points to be adjusted are not in a same group corresponding to a same body part,
the device further comprises: a triangulation module configured to triangulate the plurality of body contour points of the human body to form a plurality of non-overlapping initial triangles, wherein the first adjustment module further comprises: a third adjustment module configured to move the body contour points to be adjusted to form a plurality of adjusted triangles that are different from the plurality of initial triangles.
8. The apparatus of claim 7, wherein the third adjustment module comprises:
a movement distance determination module configured to determine a movement distance of the body contour point to be adjusted; and
a fourth adjustment module configured to move the body contour points to be adjusted based on the movement distance to form the plurality of adjusted triangles.
9. The apparatus of claim 8, wherein the movement distance determination module comprises a movement distance estimation module configured to perform at least one of:
determining the size of the moving distance based on the designation of a user; and
and comparing the body contour point to be adjusted with a reference body contour point of a preset human body template to determine the size of the movement distance.
10. The apparatus of claim 7, wherein the to-be-adjusted point determining module comprises a contour point selecting module configured to perform:
selecting a specific body contour point from the plurality of body contour points as the body contour point to be adjusted based on a designation of a user; or
Comparing the plurality of body contour points with a plurality of reference body contour points of a predetermined human body template to determine the body contour points to be adjusted.
11. The apparatus of claim 7, wherein the loop module comprises a sequential execution module configured to perform:
sequentially adjusting the positions of the body contour points to be adjusted in the different groups based on a predetermined processing sequence; or
Simultaneously adjusting the positions of the body contour points to be adjusted in the respective different groups.
12. The apparatus according to claim 7, wherein the body contour points to be adjusted include two body contour points having a symmetrical positional relationship on the same body part,
wherein the first adjusting module comprises:
a symmetry adjustment module configured to move the two body contour points towards or away from each other.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
CN202211284013.7A 2022-10-20 2022-10-20 Image processing method, image processing device, electronic equipment and storage medium Active CN115359194B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211284013.7A CN115359194B (en) 2022-10-20 2022-10-20 Image processing method, image processing device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211284013.7A CN115359194B (en) 2022-10-20 2022-10-20 Image processing method, image processing device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115359194A CN115359194A (en) 2022-11-18
CN115359194B true CN115359194B (en) 2023-03-14

Family

ID=84008209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211284013.7A Active CN115359194B (en) 2022-10-20 2022-10-20 Image processing method, image processing device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115359194B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470322A (en) * 2018-03-09 2018-08-31 北京小米移动软件有限公司 Handle the method, apparatus and readable storage medium storing program for executing of facial image
CN109325907A (en) * 2018-09-18 2019-02-12 北京旷视科技有限公司 Image landscaping treatment method, apparatus and system
CN111652795A (en) * 2019-07-05 2020-09-11 广州虎牙科技有限公司 Face shape adjusting method, face shape adjusting device, live broadcast method, live broadcast device, electronic equipment and storage medium
CN113256799A (en) * 2021-06-07 2021-08-13 广州虎牙科技有限公司 Three-dimensional face model training method and device
WO2021169394A1 (en) * 2020-02-25 2021-09-02 荣耀终端有限公司 Depth-based human body image beautification method and electronic device
CN114913549A (en) * 2022-05-25 2022-08-16 北京百度网讯科技有限公司 Image processing method, apparatus, device and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389801B (en) * 2015-10-20 2018-09-21 厦门美图之家科技有限公司 Character contour setting method, character image weakening method, system and camera terminal
CN111105348A (en) * 2019-12-25 2020-05-05 北京市商汤科技开发有限公司 Image processing method and apparatus, image processing device, and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470322A (en) * 2018-03-09 2018-08-31 北京小米移动软件有限公司 Handle the method, apparatus and readable storage medium storing program for executing of facial image
CN109325907A (en) * 2018-09-18 2019-02-12 北京旷视科技有限公司 Image landscaping treatment method, apparatus and system
CN111652795A (en) * 2019-07-05 2020-09-11 广州虎牙科技有限公司 Face shape adjusting method, face shape adjusting device, live broadcast method, live broadcast device, electronic equipment and storage medium
WO2021169394A1 (en) * 2020-02-25 2021-09-02 荣耀终端有限公司 Depth-based human body image beautification method and electronic device
CN113256799A (en) * 2021-06-07 2021-08-13 广州虎牙科技有限公司 Three-dimensional face model training method and device
CN114913549A (en) * 2022-05-25 2022-08-16 北京百度网讯科技有限公司 Image processing method, apparatus, device and medium

Also Published As

Publication number Publication date
CN115359194A (en) 2022-11-18

Similar Documents

Publication Publication Date Title
CN116051729B (en) Three-dimensional content generation method and device and electronic equipment
CN114972958B (en) Key point detection method, neural network training method, device and equipment
CN115482325B (en) Picture rendering method, device, system, equipment and medium
CN116245998B (en) Rendering map generation method and device, and model training method and device
CN115661375B (en) Three-dimensional hair style generation method and device, electronic equipment and storage medium
CN114913549B (en) Image processing method, device, equipment and medium
CN115511779B (en) Image detection method, device, electronic equipment and storage medium
CN115359194B (en) Image processing method, image processing device, electronic equipment and storage medium
CN114120448B (en) Image processing method and device
CN115393514A (en) Training method of three-dimensional reconstruction model, three-dimensional reconstruction method, device and equipment
CN115601555A (en) Image processing method and apparatus, device and medium
CN116030185A (en) Three-dimensional hairline generating method and model training method
CN115761855A (en) Face key point information generation, neural network training and three-dimensional face reconstruction method
CN114049472A (en) Three-dimensional model adjustment method, device, electronic apparatus, and medium
CN114092556A (en) Method, apparatus, electronic device, medium for determining human body posture
CN115147306A (en) Image processing method, image processing device, electronic equipment and storage medium
CN114119154A (en) Virtual makeup method and device
CN115423827B (en) Image processing method, image processing device, electronic equipment and storage medium
CN115345981B (en) Image processing method, image processing device, electronic equipment and storage medium
CN115619981B (en) Three-dimensional hairstyle generation method and model training method
CN116824014B (en) Data generation method and device for avatar, electronic equipment and medium
CN115937430B (en) Method, device, equipment and medium for displaying virtual object
CN116030191B (en) Method, device, equipment and medium for displaying virtual object
CN114327718B (en) Interface display method, device, equipment and medium
CN114882331A (en) Image processing method, apparatus, device and 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