Image processing method and device, equipment and storage medium

Through image processing technology, clothing images are extracted and stitched, the problem of insufficient convenience of clothing matching in the existing technology is solved, efficient and accurate clothing combination display is achieved, and user experience is improved.

CN119941501APending Publication Date: 2025-05-06HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311460486.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, in order to see the matching effect of different clothing combinations, it needs to be tried on in reality, which is time-consuming and labor-intensive and lacks convenience.

Method used

By obtaining two initial images, including body parts of the wearer's clothing, bone points are extracted based on image processing technology, clothing images are accurately extracted, and stitched, target images are generated, and appropriate clothing combination effects are displayed.

Benefits of technology

It realizes that the matching effect of different clothing combinations can be seen without trying on, which improves convenience, and the generated target image is closer to the actual outfit effect, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941501A_ABST
    Figure CN119941501A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image processing method and device, equipment and a storage medium. The method comprises the steps that a first initial image and a second initial image are acquired; the first initial image comprises information of a first body part wearing first clothes, and the second initial image comprises information of a second body part wearing second clothes; acquiring a first skeleton point of the first body part based on the first initial image, and acquiring a second skeleton point of the second body part based on the second initial image; extracting a first image from the first initial image based on the first skeleton point, and extracting a second image from the second initial image based on the second skeleton point; the first image is an image of a first body part wearing first clothes, and the second image is an image of a second body part wearing second clothes; and splicing the first image and the second image to obtain a target image. According to the method, the convenience can be met, the target image is closer to the actual wearing effect, and the user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and specifically to an image processing method, device, equipment and storage medium. Background Art

[0002] With the development of economy and technology, there are more and more types and styles of clothing. In order to see the matching effect of different clothing combinations, trying on clothes in reality is time-consuming and laborious, and inconvenient. For example, there are many clothes at home. In order to choose a suitable combination of clothes among them, you need to try them on one by one, which is time-consuming and laborious. For example, when shopping in a mall, it is difficult to predict the matching effect of the clothes in the mall and the clothes at home by imagination alone. In order to see the real matching effect, you need to take the clothes in the mall home to try them on, which is time-consuming and laborious. Summary of the invention

[0003] In view of this, the present application provides an image processing method, device, equipment and storage medium, so as to solve the problem in the prior art that in order to see the matching effects of different clothing combinations, it is time-consuming and laborious to try on clothes in reality, and the convenience is insufficient.

[0004] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising:

[0005] Acquire a first initial image and a second initial image; the first initial image includes information of a first body part wearing a first garment, and the second initial image includes information of a second body part wearing a second garment; the first body part is different from the second body part;

[0006] Acquire a first skeleton point of the first body part based on the first initial image, and acquire a second skeleton point of the second body part based on the second initial image;

[0007] A first image is extracted from the first initial image based on the first skeleton point, and a second image is extracted from the second initial image based on the second skeleton point; the first image is an image of a first body part wearing a first garment, and the second image is an image of a second body part wearing a second garment;

[0008] The first image and the second image are spliced ​​to obtain a target image; the target image includes information of a first body part wearing a first garment and a second body part wearing a second garment.

[0009] In a possible implementation manner of the first aspect, extracting the first image from the first initial image based on the first skeleton points, and extracting the second image from the second initial image based on the second skeleton points includes:

[0010] According to the clothing information contained in the first initial image, the first initial image is divided into a first sub-image and at least one second sub-image, wherein the first sub-image is an image containing information about the first body part wearing the first clothing; the second sub-image is an image containing first information, wherein the first information refers to other information in the first initial image except the information about the first body part wearing the first clothing;

[0011] According to the first skeleton point, determining the first sub-image including information matching the first skeleton point as the first image;

[0012] According to the clothing information included in the second initial image, the second initial image is divided into a third sub-image and at least one fourth sub-image, wherein the third sub-image is an image including information about the second body part wearing the second clothing; and the fourth sub-image is an image including second information, wherein the second information refers to other information in the second initial image except the information about the second body part wearing the second clothing;

[0013] According to the second skeleton point, the third sub-image including information matching the second skeleton point is determined as the second image.

[0014] In a possible implementation manner of the first aspect, extracting the first image from the first initial image based on the first skeleton points, and extracting the second image from the second initial image based on the second skeleton points includes:

[0015] Extracting an image portion corresponding to the first skeleton point from the first initial image according to the first skeleton point to obtain a first image;

[0016] An image portion corresponding to the second skeleton point is extracted from the second initial image according to the second skeleton point to obtain a second image.

[0017] In a possible implementation manner of the first aspect, the stitching the first image and the second image to obtain a target image includes:

[0018] Connecting the first skeleton point and the second skeleton point to obtain a target skeleton point;

[0019] Determine a first position of the first image in the target image based on the position of the first skeleton point in the target skeleton point; determine a second position of the second image in the target image based on the position of the second skeleton point in the target skeleton point;

[0020] The first image is set at the first position, and the second image is set at the second position to obtain a target image.

[0021] In a possible implementation manner of the first aspect, the step of performing splicing processing on the first skeleton point and the second skeleton point to obtain a target skeleton point includes:

[0022] Determine a reference skeleton point based on the first skeleton point and the second skeleton point; the reference skeleton point is a skeleton point included in both the first target skeleton point and the second target skeleton point;

[0023] The reference bone point of the first bone point is set at the reference bone point of the second bone point to obtain a target bone point.

[0024] In a possible implementation manner of the first aspect, setting the reference skeleton point of the first skeleton point at the reference skeleton point of the second skeleton point to obtain the target skeleton point includes:

[0025] When the reference skeletal points include n, the mth reference skeletal point of the first skeletal point is set at the mth reference skeletal point of the second skeletal point, and the positions of other reference skeletal points of the first skeletal point and / or the second skeletal point are adjusted until the adjusted other reference skeletal points of the first skeletal point and / or the second skeletal point coincide with the corresponding reference skeletal point; n is an integer greater than 1, and m is an integer greater than 0 and not greater than n;

[0026] The target bone point is obtained by adjusting other bone points of the first bone point according to the reference bone point of the first bone point and / or adjusting other bone points of the second bone point according to the reference bone point of the second bone point.

[0027] In a possible implementation manner of the first aspect, the stitching the first image and the second image to obtain a target image includes:

[0028] When the first image and the second image are spliced, if a first garment in the first image overlaps with a second garment in the second image, the first garment is displayed at the overlapped portion.

[0029] In a possible implementation of the first aspect, the first body part includes an upper body part, and the first clothing includes an upper body clothing; and / or the second body part includes a lower body part, and the second clothing includes a lower body clothing.

[0030] In a possible implementation manner of the first aspect, before acquiring a first skeleton point of the first body part based on the first initial image and acquiring a second skeleton point of the second body part based on the second initial image, the method further includes:

[0031] Determine a first initial skeleton point included in the first initial image and a second initial skeleton point included in the second initial image;

[0032] Determine a first target position in a first initial image according to the first initial skeleton point, and determine a second target position in a second initial image according to the second initial skeleton point;

[0033] The step of acquiring a first skeleton point of the first body part based on the first initial image and acquiring a second skeleton point of the second body part based on the second initial image comprises:

[0034] Acquire a first touch position in the first initial image, and when the first touch position is located at a first side of the first target position, extract a first skeleton point from the first initial skeleton points; the first side of the first target position refers to a region where information of a first body part wearing a first garment in the first initial image is located;

[0035] Obtain a second touch position in the second initial image, and when the second touch position is located on the second side of the second target position, extract a second skeleton point from the second initial skeleton point; the second side of the second target position refers to the area where information of the second body part wearing the second clothing in the second initial image is located.

[0036] In a possible implementation manner of the first aspect, before acquiring a first skeleton point of the first body part based on the first initial image and acquiring a second skeleton point of the second body part based on the second initial image, the method further includes:

[0037] Determine first angle information of a first body part contained in the first initial image, and second angle information of a second body part contained in the second initial image;

[0038] When the difference between the first angle information and the second angle information exceeds a preset difference threshold, the first initial image and / or the second initial image is adjusted until the difference between the first angle information corresponding to the first initial image and the second angle information corresponding to the second initial image does not exceed the preset angle difference threshold.

[0039] In a possible implementation manner of the first aspect, after the first initial image and / or the second initial image is adjusted, the method further includes:

[0040] Perform image restoration processing on the adjusted first initial image and / or the adjusted second initial image, and update the first initial image and / or the second initial image.

[0041] In a possible implementation manner of the first aspect, the stitching the first image and the second image to obtain a target image includes:

[0042] The first image and the second image are stitched together to obtain a stitched image; the stitched image includes information about a first body part wearing a first garment and a second body part wearing a second garment;

[0043] Determine body contour information contained in the stitched image based on the first body part information and the second body part information in the stitched image;

[0044] Based on the information of the body contour, determining a region to be repaired in the stitched image; the region to be repaired is located inside the body contour in the stitched image, and the region to be repaired does not include the first image and the second image;

[0045] The region to be repaired in the stitched image is repaired according to the position of the region to be repaired in the stitched image to obtain a target image.

[0046] In a possible implementation manner of the first aspect, after the first image and the second image are spliced ​​to obtain a target image, the method further includes:

[0047] The target image is optimized and updated.

[0048] In a second aspect, an embodiment of the present application provides an image processing device, including:

[0049] A first acquisition unit is used to acquire a first initial image and a second initial image; the first initial image includes information of a first body part wearing a first garment, and the second initial image includes information of a second body part wearing a second garment; the first body part is different from the second body part;

[0050] a second acquisition unit, configured to acquire a first skeleton point of the first body part based on the first initial image, and acquire a second skeleton point of the second body part based on the second initial image;

[0051] a first processing unit, configured to extract a first image from the first initial image based on the first skeleton point, and to extract a second image from the second initial image based on the second skeleton point; the first image is an image of a first body part wearing a first garment, and the second image is an image of a second body part wearing a second garment;

[0052] The second processing unit is used to splice the first image and the second image to obtain a target image; the target image includes information of a first body part wearing a first garment and a second body part wearing a second garment.

[0053] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute any one of the methods described in the first aspect above.

[0054] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect.

[0055] Adopt the scheme provided in the embodiment of the present application, obtain the first initial image and the second initial image; the first initial image includes the information of the first body part wearing the first clothing, and the second initial image includes the information of the second body part wearing the second clothing; the first body part is different from the second body part; based on the first initial image, obtain the first skeleton point of the first body part, and based on the second initial image, obtain the second skeleton point of the second body part; extract the first image from the first initial image based on the first skeleton point, and extract the second image from the second initial image based on the second skeleton point; the first image is the image of the first body part wearing the first clothing, and the second image is the image of the second body part wearing the second clothing; splice the first image and the second image to obtain the target image; the target image includes the information of the first body part wearing the first clothing and the second body part wearing the second clothing. In the embodiment of the present application, the first image is extracted from the first initial image based on the first skeleton point, and the second image is extracted from the second initial image based on the second skeleton point. This extraction is more accurate, the first image is closer to the image of the first body part wearing the first clothing, and the second image is closer to the image of the second body part wearing the second clothing. The target image obtained after splicing the first image and the second image is closer to the actual dressing effect. In this way, after obtaining the first initial image and the second initial image, a target image of a partial body or a complete body consisting of the first body part and the second body part wearing the first apparel and the second apparel at the same time can be obtained, that is, the target image presents the matching effect of the first apparel and the second apparel, which can meet the user's demand for convenience; and the target image is closer to the actual matching effect, which can enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0057] Figure 1a-Figure 1c A schematic diagram of a scene of an image processing method in the related art;

[0058] Figure 2 A flowchart of an image processing method provided in an embodiment of the present application;

[0059] Figure 3a-3g A schematic diagram of a scene of an image processing method provided in an embodiment of the present application;

[0060] Figure 4a-4e A schematic diagram of another image processing method provided in an embodiment of the present application;

[0061] Figure 5a-5c A schematic diagram of another image processing method provided in an embodiment of the present application;

[0062] Figure 6 A flowchart of another image processing method provided in an embodiment of the present application;

[0063] Figure 7 A flowchart of another image processing method provided in an embodiment of the present application;

[0064] Figure 8 A flowchart of another image processing method provided in an embodiment of the present application;

[0065] Fig. 9 A flowchart of another image processing method provided in an embodiment of the present application;

[0066] Fig.10 A flowchart of another image processing method provided in an embodiment of the present application;

[0067] Fig.11 A flowchart of another image processing method provided in an embodiment of the present application;

[0068] Fig.12 A flowchart of another image processing method provided in an embodiment of the present application;

[0069] Figure 13a-13b A schematic diagram of another image processing method provided in an embodiment of the present application;

[0070] Fig.14A schematic diagram of another image processing method provided in an embodiment of the present application;

[0071] Fig.15 A schematic diagram of another image processing method provided in an embodiment of the present application;

[0072] Fig.16 A schematic diagram of another image processing method provided in an embodiment of the present application;

[0073] Fig.17 A schematic diagram of another image processing method provided in an embodiment of the present application;

[0074] Fig.18 A schematic diagram of another image processing method provided in an embodiment of the present application;

[0075] Fig.19 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;

[0076] Fig. 20 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0077] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0078] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0079] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0080] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0081] With the development of economy and technology, there are more and more types and styles of clothing. In order to see the matching effect of different clothing combinations, trying on clothes in reality is time-consuming and laborious, and inconvenient. For example, there are many clothes at home. In order to choose a suitable combination of clothes among them, you need to try them on one by one, which is time-consuming and laborious. For example, when shopping in a mall, it is difficult to predict the matching effect of the clothes in the mall and the clothes at home by imagination alone. In order to see the real matching effect, you need to take the clothes in the mall home to try them on, which is time-consuming and laborious.

[0082] The AI ​​virtual fitting in the prior art models the user's body through human body scanning technology, models the clothes to be tried on, matches the user's body model with the clothes model to be tried on, and thus obtains the virtual effect of the user trying on the clothes. The fitting effect obtained by this method is not completely consistent with the actual fitting effect, and lacks realism. In addition, this method has high implementation costs and is difficult to promote.

[0083] In some technologies, an upper body image with a top can be extracted from one image, and an image of a lower body with a bottom can be extracted from another image, and the upper body image with a top and the lower body image with a bottom can be spliced ​​together to synthesize a body image with both a top and a bottom. Figure 1a Extract the upper body image wearing a shirt from Figure 1b Extract the lower body image wearing a skirt from the image above, and synthesize the upper body image wearing a shirt and the lower body image wearing a skirt. Figure 1c The complete human body image shown in the figure is wearing both a shirt and a skirt. However, this method uses the horizontal line of the waist as the dividing line to extract the upper body image with tops or the lower body image with bottoms, which has the problem of inaccurate extraction, especially when the dividing line between the top and bottom is irregular, such as Figure 3a The clothing shown in the figure will result in a large difference between the synthesized image of a body wearing both tops and bottoms and the actual effect, which will lead to a poor user experience.

[0084] In response to the above problems, the embodiments of the present application provide an image processing method, device, equipment and storage medium to obtain a first initial image and a second initial image; the first initial image includes information about a first body part wearing a first garment, and the second initial image includes information about a second body part wearing a second garment; the first body part is different from the second body part; the first skeleton point of the first body part is obtained based on the first initial image, and the second skeleton point of the second body part is obtained based on the second initial image; the first image is extracted from the first initial image based on the first skeleton point, and the second image is extracted from the second initial image based on the second skeleton point; the first image is an image of the first body part wearing the first garment, and the second image is an image of the second body part wearing the second garment; the first image and the second image are spliced ​​to obtain a target image; the target image includes information about the first body part wearing the first garment and the second body part wearing the second garment. In the embodiments of the present application, the first image is extracted from the first initial image based on the first skeleton point, and the second image is extracted from the second initial image based on the second skeleton point. This extraction is more accurate, the first image is closer to the image of the first body part wearing the first garment, and the second image is closer to the image of the second body part wearing the second garment. In this way, the target image obtained by splicing the first image and the second image is more accurate and closer to the actual dressing effect, thereby improving the user experience.

[0085] See also Figure 2 , is a flow chart of an image processing method provided in an embodiment of the present application. Figure 2 As shown, the method includes:

[0086] Step S201: Acquire a first initial image and a second initial image.

[0087] The first initial image includes information about a first body part wearing a first garment, and the second initial image includes information about a second body part wearing a second garment; the first body part is different from the second body part.

[0088] In the embodiment of the present application, the first initial image is an image including information of the first body part wearing the first clothing item, and the second initial image is an image including information of the second body part wearing the second clothing item. For example, the first body part may be the upper body part, the second body part may be the lower body part, the first clothing item may be an upper body clothing item such as a top, a bag, and an upper body accessory, and the second clothing item may be a lower body clothing item such as a bottom, a shoe, a sock, and a bottom body accessory, that is, the first initial image includes information of the upper body part wearing the upper body clothing item, and the second initial image includes information of the lower body part wearing the lower body clothing item. For example, the first body part may be a foot, and the first clothing item may be a shoe, a sock, and the like.

[0089] In some embodiments, the first initial image may be an image including information about a first body part of a user wearing a first garment, or an image including information about a first body part of a person other than the user wearing the first garment. Similarly, the second initial image may be an image including information about a second body part of a user wearing a second garment, or an image including information about a second body part of a person other than the user wearing the second garment.

[0090] In some embodiments, in order to make the image obtained based on the first initial image and the second initial image closer to the actual dressing effect, the information of the first body part and the information of the second body part in the first initial image may be the information of the body part of the same person.

[0091] In some embodiments, the first initial image and / or the second initial image may be images taken on-site by a user and stored, or may be images stored in advance, and this application does not impose any limitation on this.

[0092] Exemplarily, the first initial image and the second initial image may be as follows: Figure 3a , Figure 3b , Figure 4a , Figure 4b , Figure 5a and Figure 5b Image shown.

[0093] Step S202: acquiring first skeleton points of the first body part based on the first initial image, and acquiring second skeleton points of the second body part based on the second initial image.

[0094] In the embodiment of the present application, the human skeleton point is a key point that characterizes the human skeleton information and can be used to describe the body posture. After obtaining the first initial image and the second initial image, the first skeleton point corresponding to the first body part in the first initial image can be obtained based on the first initial image, and the second skeleton point corresponding to the second body part in the second initial image can be obtained based on the second initial image.

[0095] After acquiring the first initial image and the second initial image, the image processing device can acquire the first skeleton point of the first body part based on the first initial image and acquire the second skeleton point of the second body part based on the second initial image by using algorithms such as MobilePose, OpenPose, and AlphaPose. Of course, other skeleton point detection algorithms can also be used to acquire the first skeleton point of the first body part based on the first initial image and acquire the second skeleton point of the second body part based on the second initial image, and this application does not limit this.

[0096] Step S203: extracting a first image from the first initial image based on the first skeleton points, and extracting a second image from the second initial image based on the second skeleton points.

[0097] The first image is an image of a first body part wearing a first item of clothing, and the second image is an image of a second body part wearing a second item of clothing.

[0098] In the embodiment of the present application, the first skeleton point is a key point representing the skeleton information of the first body part in the first initial image, and therefore, by extracting the first image in the first initial image based on the first skeleton point, the accuracy of extracting the first image in the first initial image can be improved. Similarly, the second skeleton point is a key point representing the skeleton information of the second body part in the second initial image, and therefore, by extracting the second image in the second initial image based on the second skeleton point, the accuracy of extracting the second image in the second initial image can be improved.

[0099] As a possible implementation, Figure 6 As shown, step S203 extracts the first image from the first initial image based on the first skeleton point, and extracts the second image from the second initial image based on the second skeleton point, including:

[0100] Step S601: dividing the first initial image into a first sub-image and at least one second sub-image according to clothing information contained in the first initial image.

[0101] The first sub-image is an image containing information about the first body part wearing the first clothing item. The second sub-image is an image containing first information, wherein the first information refers to other information in the first initial image except the information about the first body part wearing the first clothing item.

[0102] In an embodiment of the present application, after obtaining the first initial image, the first initial image can be divided into multiple sub-images according to the clothing information in the first initial image, including a sub-image containing information of the first body part wearing the first clothing, i.e., the first sub-image; and also including a sub-image containing other information in the first initial image except the information of the first body part wearing the first clothing, i.e., the second sub-image.

[0103] Step S602: According to the first skeleton point, determine the first sub-image including information matching the first skeleton point as the first image.

[0104] In the embodiment of the present application, the first sub-image is an image containing information of the first body part wearing the first clothing, which matches the first skeleton point, and thus the first sub-image is determined as the first image.

[0105] Step S603: dividing the second initial image into a third sub-image and at least one fourth sub-image according to the clothing information contained in the second initial image.

[0106] The third sub-image is an image containing information about the second body part wearing the second article of clothing; the fourth sub-image is an image containing second information, wherein the second information refers to other information in the second initial image except for the information about the second body part wearing the second article of clothing.

[0107] In an embodiment of the present application, after obtaining the second initial image, the second initial image can be divided into multiple sub-images according to the clothing information in the second initial image, including a sub-image containing information of the second body part wearing the second clothing, i.e., the third sub-image; and also including a sub-image containing other information in the second initial image except the information of the second body part wearing the second clothing, i.e., the fourth sub-image.

[0108] Step S604: According to the second skeleton point, determine the third sub-image including information matching the second skeleton point as the second image.

[0109] In the embodiment of the present application, the third sub-image is an image containing information of the second body part wearing the second clothing, which matches the second skeleton point, and thus the third sub-image is determined as the second image.

[0110] As a possible implementation, Figure 7 As shown, step S203 extracts the first image from the first initial image based on the first skeleton point, and extracts the second image from the second initial image based on the second skeleton point, including:

[0111] Step S701: extracting an image portion corresponding to a first skeleton point from a first initial image according to the first skeleton point to obtain a first image.

[0112] In the embodiment of the present application, after the first skeleton point is obtained, the image portion attached to the first skeleton point can be extracted from the first initial image, and the image portion is used as the first image.

[0113] Step S702: extracting an image portion corresponding to the second skeleton point from the second initial image according to the second skeleton point to obtain a second image.

[0114] In the embodiment of the present application, after the second skeleton point is acquired, the image portion attached to the second skeleton point can be extracted from the second initial image, and the image portion is used as the second image.

[0115] For example, assuming that the first body part is the upper body part, the first clothing is the upper body clothing, the second body part is the lower body part, the second clothing is the lower body clothing, and the first initial image is as follows: Figure 3a As shown, the second initial image is Figure 3b Based on the first initial image, the first bone point of the upper body is obtained. Figure 3cAs shown, based on the first skeleton point, the first image including the information of the upper body part of the upper body clothing is extracted from the first initial image as shown in FIG. Figure 3d As shown in , the upper body clothing includes a coat and an inner garment. The coat in the first initial image exceeds the hips, but is still completely extracted into the first image, and the extraction is accurate. The second skeleton point of the lower body is obtained based on the second initial image. The second skeleton point is as follows Figure 3e As shown, the second image including the information of the upper body part of the lower body clothing extracted from the second initial image based on the second skeleton point is as shown in FIG. Figure 3f As shown, the lower body clothing includes pants and shoes.

[0116] For example, assuming that the first body part is the upper body part, the first clothing is the upper body clothing, the second body part is the lower body part, the second clothing is the lower body clothing, and the first initial image is as follows: Figure 4a As shown, the second initial image is Figure 4b Based on the first initial image, the first skeleton point of the upper body part is obtained, and based on the first skeleton point, the first image including the information of the upper body part of the upper body clothing is extracted from the first initial image. Figure 4c As shown, the upper body clothing includes a coat and a shoulder bag. The first image includes the shoulder bag that blocks the lower body clothing in the first initial image, and the extraction is accurate. The second skeleton point of the lower body part is obtained based on the second initial image, and the second image including the information of the upper body part of the lower body clothing extracted from the second initial image based on the second skeleton point is as shown in FIG. Figure 4d As shown, the lower body clothing includes a skirt and shoes and socks. Part of the skirt in the second initial image is blocked by the shoulder bag, and the unblocked part of the skirt is still extracted into the second image, and the extraction is accurate.

[0117] Step S204: stitching the first image and the second image to obtain a target image.

[0118] The target image includes information of a first body part wearing a first garment and a second body part wearing a second garment.

[0119] In an embodiment of the present application, the first image is an image of a first body part wearing a first item of clothing, and the second image is an image of a second body part wearing a second item of clothing. The first image and the second image are spliced ​​together to obtain a target image that includes information about a body part or a complete body formed by the first body part and the second body part wearing both the first item of clothing and the second item of clothing.

[0120] In some embodiments, the first body part and the second body part can constitute a complete body, and the target image is an image of the complete body wearing the first clothing and the second clothing at the same time.

[0121] The first image is extracted from the first initial image based on the first skeleton point, and the second image is extracted from the second initial image based on the second skeleton point. This extraction is more accurate, and the first image is closer to the image of the first body part wearing the first clothing item, and the second image is closer to the image of the second body part wearing the second clothing item. The target image obtained after splicing the first image and the second image is closer to the actual wearing effect. In this way, after obtaining the first initial image and the second initial image, a target image of a partial body or a complete body consisting of the first body part and the second body part wearing the first clothing item and the second clothing item at the same time can be obtained, that is, the target image presents the wearing effect of the first clothing item and the second clothing item, which can meet the user's demand for convenience; and the target image is closer to the actual wearing effect, which can improve the user experience.

[0122] As a possible implementation, Figure 8 As shown, step S204 performs splicing processing on the first image and the second image to obtain a target image including:

[0123] Step S2041: Connect the first skeleton point and the second skeleton point to obtain a target skeleton point.

[0124] In an embodiment of the present application, the first skeleton point is the skeleton point corresponding to the first body part in the first initial image, the second skeleton point is the skeleton point corresponding to the second body part in the second initial image, and the target skeleton point obtained after splicing the first skeleton point and the second skeleton point is the skeleton point in the target image.

[0125] As described in the above example, the first body part is the upper body, the second body part is the lower body, the first bone point is the bone point corresponding to the upper body in the first initial image, and the second bone point is the bone point corresponding to the lower body in the second initial image. The target bone point obtained by splicing the first bone point and the second bone point is the whole body bone point in the target image.

[0126] As a possible implementation, Fig. 9 As shown, step S2041 combines the first skeleton point and the second skeleton point to obtain a target skeleton point, including:

[0127] Step S901: Determine a reference skeleton point based on the first skeleton point and the second skeleton point.

[0128] The reference skeleton point is a skeleton point included in both the first target skeleton point and the second target skeleton point.

[0129] In the embodiment of the present application, the first skeleton point includes a reference skeleton point, and the second skeleton point also includes a reference skeleton point. The reference skeleton point may be a skeleton point at the intersection of the first body part and the second body part.

[0130] As described in the above example, the first body part is the upper body, the second body part is the lower body, the first bone point is the bone point corresponding to the upper body in the first initial image, and the second bone point is the bone point corresponding to the lower body in the second initial image. The reference bone point can be the bone point of the hip.

[0131] Step S902: Set the reference bone point of the first bone point at the reference bone point of the second bone point to obtain the target bone point.

[0132] In an embodiment of the present application, the first body part corresponding to the first skeletal point and the second body part corresponding to the second skeletal point intersect at the reference skeletal point. Therefore, the reference skeletal point of the first skeletal point and the reference skeletal point of the second skeletal point should be set at the same position.

[0133] As a possible implementation, Fig.10 As shown, step S902 sets the reference bone point of the first bone point at the reference bone point of the second bone point, and obtains the target bone point including:

[0134] Step S9021: When there are n reference bone points, set the mth reference bone point of the first bone point at the mth reference bone point of the second bone point, and adjust the positions of other reference bone points of the first bone point and / or the second bone point until the adjusted other reference bone points of the first bone point and / or the second bone point coincide with the corresponding reference bone points.

[0135] Wherein, n is an integer greater than 1, and m is an integer greater than 0 and not greater than n.

[0136] In an embodiment of the present application, when the number of reference skeletal points is n, the n reference skeletal points of the first skeletal point may not be simultaneously set at the corresponding reference skeletal points in the second skeletal point. For example, when the size difference between the first body part corresponding to the first skeletal point and the second body part corresponding to the second skeletal point is large, the n reference skeletal points of the first skeletal point may not be simultaneously set at the corresponding reference skeletal points in the second skeletal point. At this time, the mth reference skeletal point of the first skeletal point may be set at the mth reference skeletal point of the second skeletal point, and the positions of the other reference skeletal points of the first skeletal point may be adjusted until the adjusted other reference skeletal points of the first skeletal point coincide with the corresponding reference skeletal points in the second skeletal point, and / or the positions of the other reference skeletal points of the second skeletal point may be adjusted until the adjusted other reference skeletal points of the second skeletal point coincide with the corresponding reference skeletal points in the first skeletal point.

[0137] It should be noted that the coincidence of two reference bone points means that the distance between the two reference bone points is less than a preset distance threshold.

[0138] Exemplarily, assuming that the first body part is the upper body part, the second body part is the lower body part, the first skeleton point is the skeleton point corresponding to the upper body part in the first initial image, the second skeleton point is the skeleton point corresponding to the lower body part in the second initial image, and the reference skeleton point is the skeleton point of the hip. Assuming that the skeleton point of the hip includes three skeleton points, namely the left skeleton point of the hip, the right skeleton point of the hip and the center skeleton point of the hip, the center skeleton point of the hip in the first skeleton point can be set at the center skeleton point of the hip in the second skeleton point, and the positions of the left skeleton point of the hip and the right skeleton point of the hip in the first skeleton point are adjusted until the adjusted left skeleton point of the hip and the right skeleton point of the hip in the first skeleton point coincide with the left skeleton point of the hip and the right skeleton point of the hip in the second skeleton point.

[0139] Step S9022: adjusting other skeleton points of the first skeleton point according to the reference skeleton point of the first skeleton point and / or adjusting other skeleton points of the second skeleton point according to the reference skeleton point of the second skeleton point to obtain the target skeleton point.

[0140] In the embodiment of the present application, after adjusting the reference bone point in the first bone point, it is necessary to adjust the other bone points in the first bone point according to the reference bone point in the adjusted first bone point, so that the adjusted first bone point is more natural. After adjusting the reference bone point in the second bone point, it is necessary to adjust the other bone points in the second bone point according to the reference bone point in the adjusted second bone point, so that the adjusted second bone point is more natural.

[0141] Step S2042: Determine a first position of the first image in the target image based on the position of the first skeleton point in the target skeleton point; determine a second position of the second image in the target image based on the position of the second skeleton point in the target skeleton point.

[0142] In the embodiment of the present application, the first skeleton point and the first image correspond to each other, and therefore, the first position of the first image in the target image can be determined based on the position of the first skeleton point in the target skeleton point.

[0143] In some embodiments, the positional relationship between the first skeleton point and the first image in the first initial image can be determined based on the position of the first skeleton point in the first initial image and the position of the first image in the first initial image. The positional relationship between the first skeleton point and the first image in the target image is consistent with the positional relationship between the first skeleton point and the first image in the first initial image. Therefore, the positional relationship between the first skeleton point and the first image in the target image can be determined based on the positional relationship between the first skeleton point and the first image in the first initial image. Based on the position of the first skeleton point in the target skeleton point, the position of the first skeleton point in the target image can be determined, and based on the positional relationship between the first skeleton point and the first image in the target image, the first position of the first image in the target image can be determined.

[0144] Likewise, the second skeleton point and the second image correspond to each other, and therefore, the second position of the second image in the target image can be determined based on the position of the second skeleton point in the target skeleton point.

[0145] In some embodiments, the positional relationship between the second skeleton point and the second image in the second initial image can be determined based on the position of the second skeleton point in the second initial image and the position of the second image in the second initial image. The positional relationship between the second skeleton point and the second image in the target image is consistent with the positional relationship between the second skeleton point and the second image in the second initial image. Therefore, the positional relationship between the second skeleton point and the second image in the target image can be determined based on the positional relationship between the second skeleton point and the second image in the second initial image. Based on the position of the second skeleton point in the target skeleton point, the position of the second skeleton point in the target image can be determined, and based on the positional relationship between the second skeleton point and the second image in the target image, the second position of the second image in the target image can be determined.

[0146] Step S2043: set the first image at the first position and the second image at the second position to obtain a target image.

[0147] In an embodiment of the present application, after determining the first position of the first image in the target image and the second position of the second image in the target image, the first image can be set at the first position in the target image, and the second image can be set at the second position of the target image, so that the target image is obtained. The first position of the first image in the target image is determined according to the position of the first skeleton point in the target skeleton point, and the second position of the second image in the target image is determined according to the position of the second skeleton point in the target skeleton point. The first skeleton point is a key point that characterizes the skeleton information of the first body part in the first initial image, and the second skeleton point is a key point that characterizes the skeleton information of the second body part in the second initial image. The target skeleton point is obtained by splicing the first skeleton point and the second skeleton point. In this way, the splicing process of the first image and the second image is more accurate, the body posture in the target image is more natural, and is closer to the actual dressing effect, which can enhance the user experience.

[0148] As a possible implementation method, the first image and the second image are spliced ​​to obtain a target image including:

[0149] When the first image and the second image are spliced, if the first clothing in the first image overlaps with the second clothing in the second image, the first clothing is displayed at the overlapped position.

[0150] In an embodiment of the present application, the first clothing in the first image and the second clothing in the second image may overlap. At this time, in order to make the target image more natural and closer to the actual wearing effect, the first clothing can be displayed at the overlapping position.

[0151] As a possible implementation, the first body part includes an upper body part, and the first clothing includes an upper body clothing; and / or, the second body part includes a lower body part, and the second clothing includes a lower body clothing.

[0152] In the embodiment of the present application, in an actual dressing scene, the upper body clothing usually blocks other clothing. Therefore, if the upper body clothing in the first image extracted from the first initial image overlaps with the second clothing in the second image extracted from the second initial image, the upper body clothing is displayed at the overlapped portion, so that the target image can retain the original dressing effect of the upper body clothing in the first initial image, making the target image closer to the actual dressing effect.

[0153] In actual dressing scenes, the lower body clothing is usually blocked by other clothing. Therefore, if the first clothing in the first image extracted from the first initial image overlaps with the lower body clothing in the second image extracted from the second initial image, the other clothing is displayed at the overlapped position.

[0154] Exemplarily, assuming that the first body part is the upper body part and the second body part is the lower body part, such as Figure 3a The first initial image is shown as Figure 3b The second initial image is shown. The upper body clothing in the first image overlaps with the lower body clothing in the second image. The upper body clothing is displayed at the overlapped position. Figure 3g The target image is shown.

[0155] As a possible implementation, step S204 performs splicing processing on the first image and the second image to obtain a target image including:

[0156] Step S1101: stitching the first image and the second image to obtain a stitched image.

[0157] The spliced ​​image includes information of a first body part wearing a first garment and a second body part wearing a second garment.

[0158] In an embodiment of the present application, the first image and the second image may be spliced ​​based on the positional relationship between the first body part and the second body part to obtain a spliced ​​image. The positional relationship between the first image and the second image in the spliced ​​image is consistent with the positional relationship between the first body part and the second body part.

[0159] Step S1102: Based on the information of the first body part and the information of the second body part in the stitched image, determine the body contour information contained in the stitched image.

[0160] In the embodiment of the present application, after the stitched image is obtained, information about the body contour of the body part or the complete body formed by the first body part and the second body part in the stitched image may be determined.

[0161] Step S1103: Based on the body contour information, determine the area to be repaired in the stitched image.

[0162] The area to be repaired is located inside the body contour in the spliced ​​image, and the area to be repaired does not include the first image and the second image.

[0163] In an embodiment of the present application, the interior of the body contour in the stitched image corresponds to a body part or a complete body composed of a first body part and a second body part, and should include an image corresponding to the first body part or an image corresponding to the second body part. If there is an area inside the body contour in the stitched image that does not include the first image and the second image, then the area is determined as the area to be repaired.

[0164] Step S1104: Perform repair processing on the area to be repaired in the stitched image according to the position of the area to be repaired in the stitched image to obtain a target image.

[0165] In the embodiment of the present application, the image of the area to be repaired is determined according to the position of the area to be repaired in the spliced ​​image, so that the area to be repaired in the spliced ​​image is repaired to obtain a target image. In this way, the body part or the whole body in the target image is more complete and the target image is more beautiful.

[0166] refer to Fig.12 , is a flow chart of an image processing method provided in an embodiment of the present application. Fig.12 As shown, the method includes:

[0167] Step S1201: Acquire a first initial image and a second initial image.

[0168] Please refer to step S201 for details, which will not be described again here.

[0169] Step S1202: Determine first angle information of a first body part contained in the first initial image and second angle information of a second body part contained in the second initial image.

[0170] In an embodiment of the present application, the first angle information of the first body part contained in the first initial image may be the inclination angle information of the body part contained in the first initial image, and the second angle information of the second body part contained in the second initial image may be the inclination angle information of the body part contained in the second initial image.

[0171] It should be noted that when the difference between the first angle information and the second angle information exceeds the preset difference threshold, steps S1203-S1210 are executed; when the difference between the first angle information and the second angle information does not exceed the preset difference threshold, steps S1205-S1210 are executed.

[0172] Step S1203, when the difference between the first angle information and the second angle information exceeds a preset difference threshold, adjust the first initial image and / or the second initial image until the difference between the first angle information corresponding to the first initial image and the second angle information corresponding to the second initial image does not exceed the preset angle difference threshold.

[0173] In an embodiment of the present application, in order to make the body posture in the target image more natural and the presentation effect better, when the difference between the first angle information and the second angle information is too large, the first initial image and / or the second initial image can be adjusted until the first angle information corresponding to the first initial image and the second angle information corresponding to the second initial image do not exceed the preset angle difference threshold.

[0174] The difference between the first angle information and the second angle information can be the difference between the value of the first angle information and the value of the second angle information, or the ratio between the value of the first angle information and the value of the second angle information, or the value of other parameters that can characterize the difference between the first angle information and the second angle information. This application does not impose any restrictions on this.

[0175] Step S1204: performing image restoration processing on the adjusted first initial image and / or the adjusted second initial image, and updating the first initial image and / or the second initial image.

[0176] In an embodiment of the present application, the adjusted first initial image and / or the adjusted second initial image can be repaired to make the adjusted first initial image and / or the adjusted second initial image more beautiful and closer to the actual wearing effect.

[0177] For example, the missing body part information in the adjusted first initial image and / or the adjusted second initial image may be repaired.

[0178] Exemplarily, assuming that the first body part is the upper body part and the second body part is the lower body part, such as Figure 5a The first initial image is shown as Figure 5b The second initial image is shown in FIG. 1 , and the difference between the first angle information in the first initial image and the second angle information in the second initial image exceeds the angle difference threshold. The second initial image is adjusted until the second angle information of the adjusted second initial image does not exceed the angle difference threshold with the first angle information of the first initial image, and the adjusted second initial image is repaired and updated. The target image obtained based on the first initial image and the second initial image in this example is shown in FIG. Figure 5c As shown, the postures of the body parts in the target image are more natural and closer to the actual dressing effect.

[0179] Step S1205: Determine the first initial skeleton points contained in the first initial image and the second initial skeleton points contained in the second initial image.

[0180] In an embodiment of the present application, the first initial skeleton point in the first initial image may be a key point corresponding to the skeleton information of the body part or the complete body included in the first initial image, and the second initial skeleton point in the second initial image may be a key point corresponding to the skeleton information of the body part or the complete body included in the second initial image.

[0181] Step S1206: determine a first target position in the first initial image according to the first initial skeleton point, and determine a second target position in the second initial image according to the second initial skeleton point.

[0182] In an embodiment of the present application, the first target position may be an intersection position between the first body part and the second body part in the first initial image, and the second target position may be an intersection position between the first body part and the second body part in the second initial image.

[0183] In some embodiments, the first target position may be a skeletal point position at the intersection of the first body part and the second body part in the first initial image, and the second target position may be a skeletal point position at the intersection between the first body part and the second body part in the second initial image.

[0184] For example, assuming that the first body part is the upper body part and the second body part is the lower body part, the first target position may be a position corresponding to a hip bone point in the first initial bone point, and the second target position may be a position corresponding to a hip bone point in the second initial bone point.

[0185] Step S1207a: Acquire a first touch position in the first initial image, and when the first touch position is located at a first side of the first target position, extract a first skeleton point from the first initial skeleton points.

[0186] The first side of the first target position refers to a region where information of the first body part wearing the first clothing in the first initial image is located.

[0187] In an embodiment of the present application, the image processing device can obtain a first touch position in the first initial image in response to a user's touch operation on the first initial image. After obtaining the first touch position in the first initial image, the positional relationship between the first touch position and the first target position can be detected. When the first touch position is located on the first side of the first target position, the first skeleton point is extracted from the first initial skeleton point.

[0188] As described in the above example, assuming that the first body part is the upper body part, the first target position is the position corresponding to the hip bone point in the first initial bone point, and the first side of the first target position can be above the first target position. Figure 3a The first initial image is shown as Fig.13a The first touch position in the first initial image is shown. The first touch position is above the position corresponding to the hip bone point in the first initial bone point, and the first bone point corresponding to the upper body part is extracted from the first initial bone point. In some embodiments, the first bone point can be extracted from the first initial bone point when the ordinate of the first touch position is greater than the ordinate of the first target position.

[0189] Step S1207b: Acquire a second touch position in the second initial image, and when the second touch position is located at a second side of the second target position, extract a second skeleton point from the second initial skeleton points.

[0190] The second side of the second target position refers to a region where information of the second body part wearing the second clothing in the second initial image is located.

[0191] In an embodiment of the present application, the image processing device can obtain a second touch position in the second initial image in response to a user's touch operation on the second initial image. After obtaining the second touch position in the second initial image, the positional relationship between the second touch position and the second target position can be detected. When the second touch position is located on the second side of the second target position, the second skeleton point is extracted from the second initial skeleton point.

[0192] As described in the above example, assuming that the second body part is the lower body part, the second target position is the position corresponding to the hip bone point in the second initial bone point, and the second side of the second target position can be below the second target position. Figure 3b The second initial image is shown as Fig.13b The second touch position in the second initial image is shown. The second touch position is below the position corresponding to the hip bone point in the second initial bone point, and the second bone point corresponding to the lower body part is extracted in the second initial bone point. In some embodiments, the second bone point can be extracted in the second initial bone point when the ordinate of the second touch position is less than the ordinate of the second target position.

[0193] In this way, if Fig.14 As shown, after the user selects the first initial image and the second initial image, the image processing device can obtain the first initial image and the second initial image; after the user performs a touch operation, the image processing device can extract the first skeleton point and the second skeleton point corresponding to the first body part and the second body part from the first initial skeleton point and the second skeleton point based on the user's first touch position and the second touch position, and perform subsequent steps to obtain the target image, thereby improving the intelligence level of the image processing device and enhancing the user experience.

[0194] Step S1208: extracting a first image from the first initial image based on the first skeleton points, and extracting a second image from the second initial image based on the second skeleton points.

[0195] Please refer to step S203 for details, which will not be described again here.

[0196] Step S1209: stitch the first image and the second image together to obtain a target image.

[0197] For details, please refer to step S204, which will not be described again here.

[0198] Step S1210: Optimize the target image and update the target image.

[0199] In the embodiment of the present application, after the first image and the second image are spliced ​​to obtain the target image, the target image can be optimized and updated to make the target image more beautiful and natural. For example, the target image can be optimized by burr removal, smoothing, feathering, etc.

[0200] Exemplary, reference Fig.15 , Fig.16 and Fig.17 , is a scene diagram of an image processing method provided by an embodiment of the present application. Assume that the first body part is the upper body part, the first clothing is the upper body clothing, the second body part is the lower body part, the second clothing is the lower body clothing, and the first initial image is as follows Figure 3a As shown, the second initial image is Figure 3b As shown. After acquiring the first initial image, the second initial image, the first touch position and the second touch position, pre-extraction processing is performed, wherein the pre-extraction processing includes human posture detection and human posture correction. Human posture detection includes: determining the first angle information of the first body part in the first initial image and the second angle information of the second body part in the second initial image. Human posture correction includes: when the difference between the first angle information and the second angle information exceeds the angle difference threshold, adjusting the first initial image and the second initial image until the difference between the first angle information of the first initial image and the second angle information of the second initial image does not exceed the angle difference threshold, and repairing the adjusted first initial image and the second initial image, and then performing extraction processing.

[0201] In this example, the difference between the first angle information and the second angle information is less than the angle difference threshold, and the extraction process step is performed. The extraction process includes image segmentation and skeleton point acquisition. The first initial skeleton point of the body part in the first initial image is acquired, and the hip skeleton point in the first initial skeleton point is determined. Fig.13a As shown, it is the first touch position in the first initial image. In response to the user's touch operation on the first touch position, the positional relationship between the first touch position and the hip bone point in the first initial image is detected. In this example, the first touch position is above the hip bone point in the first initial bone point. At this time, the first bone point of the upper body part is extracted in the first initial bone point. The first initial image is segmented based on the first bone point to obtain a first image including information of the upper body part wearing upper body clothing. The second initial bone point of the body part in the second initial image is obtained, and the hip bone point in the second initial bone point is determined. As shown in Fig.13bAs shown, it is the second touch position in the second initial image. In response to the user's touch operation on the second touch position, the positional relationship between the second touch position and the hip bone point in the second initial image is detected. In this example, the second touch position is below the hip bone point in the second initial bone point. At this time, the second bone point of the lower body is extracted from the second initial bone point. The second initial image is segmented based on the second bone point to obtain a second image including information of the lower body wearing the lower body clothing.

[0202] The hip bone point in the first bone point is set at the hip bone point in the second bone point, and the first bone point and the second bone point are spliced ​​to obtain the target bone point. Based on the position of the first bone point in the target bone point, the first position of the first image in the target image is determined, and based on the position of the second bone point in the target bone point, the second position of the second image in the target image is determined, and the first image is set at the first position and the second image is set at the second position to obtain a spliced ​​image.

[0203] After the stitched image is obtained, stitching post-processing is performed. The stitching post-processing includes hole detection, hole repair and optimization processing. Hole detection includes: determining the outer contour of the body part of the stitched image, and determining the area inside the outer contour of the stitched image that does not contain the first image and the second image as the area to be repaired, such as Fig.18 The figure shows the area to be repaired in the stitched image in this example. Hole repair includes: based on the position of the area to be repaired in the stitched image, performing image repair and color coordination on the stitched image to obtain a repaired stitched image. Optimization processing includes: performing burr removal and smoothing feathering on the repaired stitched image to obtain a target image, such as Figure 3g Shown is the target image obtained in this example.

[0204] For example, assuming that the first body part is the upper body part, the first clothing is the upper body clothing, the second body part is the lower body part, the second clothing is the lower body clothing, and the first initial image is as follows: Figure 4a As shown, the second initial image is Figure 4b Based on the first initial image, the first skeleton point of the upper body part is obtained, and based on the first skeleton point, the first image including the information of the upper body part of the upper body clothing is extracted from the first initial image. Figure 4c As shown, the upper body clothing includes a coat and a shoulder bag. The first image includes the shoulder bag that blocks the lower body clothing in the first initial image, and the extraction is accurate. The second skeleton point of the lower body part is obtained based on the second initial image, and the second image including the information of the upper body part of the lower body clothing extracted from the second initial image based on the second skeleton point is as shown in FIG. Figure 4dAs shown in the figure, the lower body clothing includes a skirt and shoes and socks. The second image includes the skirt that is blocked by the shoulder bag in the second initial image, and the extraction is accurate. The first image and the second image are spliced, and the missing skirt part in the second image that is blocked by the shoulder bag in the second initial image and other areas to be repaired in the spliced ​​image are repaired to obtain the target image, as shown in FIG. Figure 4e As shown, there is little difference between the target image and the actual dressing effect, which improves the user experience.

[0205] refer to Fig.19 , is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application. Fig.19 As shown, the device comprises:

[0206] The first acquisition unit 1901 is used to acquire a first initial image and a second initial image.

[0207] The first initial image includes information about a first body part wearing a first garment, and the second initial image includes information about a second body part wearing a second garment; the first body part is different from the second body part.

[0208] The second acquisition unit 1902 is used to acquire the first skeleton point of the first body part based on the first initial image, and acquire the second skeleton point of the second body part based on the second initial image.

[0209] The first processing unit 1903 is configured to extract a first image from the first initial image based on the first skeleton points, and to extract a second image from the second initial image based on the second skeleton points.

[0210] The first image is an image of a first body part wearing a first item of clothing, and the second image is an image of a second body part wearing a second item of clothing.

[0211] The second processing unit 1904 is used to perform splicing processing on the first image and the second image to obtain a target image.

[0212] The target image includes information of a first body part wearing a first garment and a second body part wearing a second garment.

[0213] As a possible implementation, the first processing unit 1903 is specifically used to divide the first initial image into a first sub-image and at least one second sub-image according to the clothing information contained in the first initial image. The first sub-image is an image containing information about a first body part wearing a first clothing item; the second sub-image is an image containing the first information, wherein the first information refers to other information in the first initial image except the information about the first body part wearing the first clothing item. According to the first skeleton point, the first sub-image containing information matching the first skeleton point is determined as the first image. According to the clothing information contained in the second initial image, the second initial image is divided into a third sub-image and at least one fourth sub-image, wherein the third sub-image is an image containing information about a second body part wearing a second clothing item; the fourth sub-image is an image containing the second information, wherein the second information refers to other information in the second initial image except the information about the second body part wearing the second clothing item. According to the second skeleton point, the third sub-image containing information matching the second skeleton point is determined as the second image.

[0214] As a possible implementation, the first processing unit 1903 is specifically configured to extract an image portion corresponding to the first skeleton point in the first initial image according to the first skeleton point to obtain the first image. And to extract an image portion corresponding to the second skeleton point in the second initial image according to the second skeleton point to obtain the second image.

[0215] As a possible implementation method, the second processing unit 1904 is specifically used to splice the first skeleton point and the second skeleton point to obtain the target skeleton point; based on the position of the first skeleton point in the target skeleton point, determine the first position of the first image in the target image; based on the position of the second skeleton point in the target skeleton point, determine the second position of the second image in the target image; set the first image at the first position and the second image at the second position to obtain the target image.

[0216] As a possible implementation method, the second processing unit 1904 is specifically used to determine a reference skeleton point based on the first skeleton point and the second skeleton point; the reference skeleton point is a skeleton point included in both the first target skeleton point and the second target skeleton point; the reference skeleton point of the first skeleton point is set at the reference skeleton point of the second skeleton point to obtain the target skeleton point.

[0217] As a possible implementation method, the second processing unit 1904 is specifically used to set the mth reference bone point of the first bone point at the mth reference bone point of the second bone point when the reference bone points include n points, and adjust the positions of other reference bone points of the first bone point and / or the second bone point until the adjusted first bone point and / or other reference bone points of the second bone point coincide with the corresponding reference bone point; n is an integer greater than 1, and m is an integer greater than 0 and not greater than n; adjust the other bone points of the first bone point and / or the other bone points of the second bone point according to the reference bone point of the first bone point and / or adjust the other bone points of the second bone point according to the reference bone point of the first bone point to obtain the target bone point.

[0218] As a possible implementation, the second processing unit 1904 is specifically configured to display the first clothing at the overlapped portion when splicing the first image and the second image if the first clothing in the first image overlaps with the second clothing in the second image.

[0219] As a possible implementation, the first body part includes an upper body part, and the first clothing includes an upper body clothing; and / or, the second body part includes a lower body part, and the second clothing includes a lower body clothing.

[0220] As a possible implementation method, the second acquisition unit 1902 is also used to determine the first initial skeleton point contained in the first initial image and the second initial skeleton point contained in the second initial image; determine the first target position in the first initial image according to the first initial skeleton point, and determine the second target position in the second initial image according to the second initial skeleton point.

[0221] The second acquisition unit 1902 is specifically used to determine the first touch position in the first initial image, and when the first touch position is located on the first side of the first target position, the first skeleton point is extracted from the first initial skeleton point; the first side of the first target position refers to the area where the information of the first body part wearing the first clothing in the first initial image is located; the second touch position in the second initial image is acquired, and when the second touch position is located on the second side of the second target position, the second skeleton point is extracted from the second initial skeleton point; the second side of the second target position refers to the area where the information of the second body part wearing the second clothing in the second initial image is located.

[0222] As a possible implementation method, the second acquisition unit 1902 is also used to determine the first angle information of the first body part contained in the first initial image, and the second angle information of the second body part contained in the second initial image; when the difference between the first angle information and the second angle information exceeds a preset difference threshold, adjust the first initial image and / or the second initial image until the difference between the first angle information corresponding to the first initial image and the second angle information corresponding to the second initial image does not exceed the preset angle difference threshold.

[0223] As a possible implementation manner, the second acquisition unit 1902 is further configured to perform image restoration processing on the adjusted first initial image and / or the adjusted second initial image, and update the first initial image and / or the second initial image.

[0224] As a possible implementation method, the second processing unit 1904 is specifically used to stitch the first image and the second image to obtain a stitched image; the stitched image includes information of a first body part wearing a first garment and information of a second body part wearing a second garment; based on the information of the first body part and the information of the second body part in the stitched image, the information of the body contour contained in the stitched image is determined; based on the information of the body contour, an area to be repaired is determined in the stitched image; the area to be repaired is located inside the body contour in the stitched image, and the first image and the second image are not included in the area to be repaired; the area to be repaired in the stitched image is repaired according to the position of the area to be repaired in the stitched image to obtain a target image.

[0225] As a possible implementation manner, the second processing unit 1904 is further configured to optimize the target image and update the target image.

[0226] Corresponding to the above embodiments, the present application also provides an electronic device. Fig. 20 The schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is as follows. The electronic device 2000 may include: a processor 2001, a memory 2002, and a communication unit 2003. These components communicate via one or more buses. It can be understood by those skilled in the art that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiment of the present invention. It may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0227] The communication unit 2003 is used to establish a communication channel so that the electronic device can communicate with other devices, receive user data sent by other devices or send user data to other devices.

[0228] The processor 2001 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 2002, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 2001 can only include a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0229] The memory 2002 is used to store the execution instructions of the processor 2001. The memory 2002 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0230] When the execution instruction in the memory 2002 is executed by the processor 2001, the electronic device 2000 can execute Figure 2 or Fig.12 Some or all of the steps in the illustrated embodiments.

[0231] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the image processing method provided by the present invention. The storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0232] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.

[0233] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

Claims

1. An image processing method, characterized in that: The method comprises: Acquire a first initial image and a second initial image; the first initial image includes information of a first body part wearing a first garment, and the second initial image includes information of a second body part wearing a second garment; the first body part is different from the second body part; Acquire a first skeleton point of the first body part based on the first initial image, and acquire a second skeleton point of the second body part based on the second initial image; A first image is extracted from the first initial image based on the first skeleton point, and a second image is extracted from the second initial image based on the second skeleton point; the first image is an image of a first body part wearing a first garment, and the second image is an image of a second body part wearing a second garment; The first image and the second image are spliced ​​to obtain a target image; the target image includes information of a first body part wearing a first garment and a second body part wearing a second garment.

2. The method according to claim 1, characterized in that The step of extracting the first image from the first initial image based on the first skeleton point and extracting the second image from the second initial image based on the second skeleton point comprises: According to the clothing information contained in the first initial image, the first initial image is divided into a first sub-image and at least one second sub-image, wherein the first sub-image is an image containing information about the first body part wearing the first clothing; the second sub-image is an image containing first information, wherein the first information refers to other information in the first initial image except the information about the first body part wearing the first clothing; According to the first skeleton point, determining the first sub-image including information matching the first skeleton point as the first image; According to the clothing information included in the second initial image, the second initial image is divided into a third sub-image and at least one fourth sub-image, wherein the third sub-image is an image including information about the second body part wearing the second clothing; and the fourth sub-image is an image including second information, wherein the second information refers to other information in the second initial image except the information about the second body part wearing the second clothing; According to the second skeleton point, the third sub-image including information matching the second skeleton point is determined as the second image.

3. The method according to claim 1, characterized in that The step of extracting the first image from the first initial image based on the first skeleton point and extracting the second image from the second initial image based on the second skeleton point comprises: Extracting an image portion corresponding to the first skeleton point from the first initial image according to the first skeleton point to obtain a first image; An image portion corresponding to the second skeleton point is extracted from the second initial image according to the second skeleton point to obtain a second image.

4. The method according to any one of claims 1 to 3, characterized in that: The step of performing stitching processing on the first image and the second image to obtain a target image comprises: Connecting the first skeleton point and the second skeleton point to obtain a target skeleton point; Determine a first position of the first image in the target image based on the position of the first skeleton point in the target skeleton point; determine a second position of the second image in the target image based on the position of the second skeleton point in the target skeleton point; The first image is set at the first position, and the second image is set at the second position to obtain a target image.

5. The method according to claim 4, characterized in that The step of performing splicing processing on the first skeleton point and the second skeleton point to obtain a target skeleton point comprises: Determine a reference skeleton point based on the first skeleton point and the second skeleton point; the reference skeleton point is a skeleton point included in both the first target skeleton point and the second target skeleton point; The reference bone point of the first bone point is set at the reference bone point of the second bone point to obtain a target bone point.

6. The method according to claim 5, characterized in that The step of setting the reference bone point of the first bone point at the reference bone point of the second bone point to obtain the target bone point comprises: When the reference skeletal points include n, the mth reference skeletal point of the first skeletal point is set at the mth reference skeletal point of the second skeletal point, and the positions of other reference skeletal points of the first skeletal point and / or the second skeletal point are adjusted until the adjusted other reference skeletal points of the first skeletal point and / or the second skeletal point coincide with the corresponding reference skeletal point; n is an integer greater than 1, and m is an integer greater than 0 and not greater than n; The target bone point is obtained by adjusting other bone points of the first bone point according to the reference bone point of the first bone point and / or adjusting other bone points of the second bone point according to the reference bone point of the second bone point.

7. The method according to any one of claims 1 to 6, characterized in that: The step of performing stitching processing on the first image and the second image to obtain a target image comprises: When the first image and the second image are spliced, if a first garment in the first image overlaps with a second garment in the second image, the first garment is displayed at the overlapped portion.

8. The method according to claim 7, characterized in that The first body part includes an upper body part, and the first clothing includes an upper body clothing; and / or the second body part includes a lower body part, and the second clothing includes a lower body clothing.

9. The method according to any one of claims 1 to 8, characterized in that: Before acquiring the first skeleton point of the first body part based on the first initial image and acquiring the second skeleton point of the second body part based on the second initial image, the method further includes: Determine a first initial skeleton point included in the first initial image and a second initial skeleton point included in the second initial image; Determine a first target position in a first initial image according to the first initial skeleton point, and determine a second target position in a second initial image according to the second initial skeleton point; The acquiring a first skeleton point of the first body part based on the first initial image and the acquiring a second skeleton point of the second body part based on the second initial image comprises: Acquire a first touch position in the first initial image, and when the first touch position is located at a first side of the first target position, extract a first skeleton point from the first initial skeleton points; the first side of the first target position refers to a region where information of a first body part wearing a first garment in the first initial image is located; Obtain a second touch position in the second initial image, and when the second touch position is located on the second side of the second target position, extract a second skeleton point from the second initial skeleton point; the second side of the second target position refers to the area where information of the second body part wearing the second clothing in the second initial image is located.

10. The method according to any one of claims 1 to 9, characterized in that: Before acquiring the first skeleton point of the first body part based on the first initial image and acquiring the second skeleton point of the second body part based on the second initial image, the method further includes: Determine first angle information of a first body part contained in the first initial image, and second angle information of a second body part contained in the second initial image; When the difference between the first angle information and the second angle information exceeds a preset difference threshold, the first initial image and / or the second initial image is adjusted until the difference between the first angle information corresponding to the first initial image and the second angle information corresponding to the second initial image does not exceed the preset angle difference threshold.

11. The method according to claim 10, characterized in that After adjusting the first initial image and / or the second initial image, the method further includes: Perform image restoration processing on the adjusted first initial image and / or the adjusted second initial image, and update the first initial image and / or the second initial image.

12. The method according to any one of claims 1 to 11, characterized in that: The step of performing stitching processing on the first image and the second image to obtain a target image comprises: The first image and the second image are stitched together to obtain a stitched image; the stitched image includes information about a first body part wearing a first garment and a second body part wearing a second garment; Determining information of a body contour contained in the stitched image based on information of the first body part and information of the second body part in the stitched image; Based on the information of the body contour, determining a region to be repaired in the stitched image; the region to be repaired is located inside the body contour in the stitched image, and the region to be repaired does not include the first image and the second image; The region to be repaired in the stitched image is repaired according to the position of the region to be repaired in the stitched image to obtain a target image.

13. The method according to claim 1, after splicing the first image and the second image to obtain a target image, further comprises: The target image is optimized and updated.

14. An image processing device, characterized in that: include: A first acquisition unit is used to acquire a first initial image and a second initial image; the first initial image includes information of a first body part wearing a first garment, and the second initial image includes information of a second body part wearing a second garment; the first body part is different from the second body part; a second acquisition unit, configured to acquire a first skeleton point of the first body part based on the first initial image, and acquire a second skeleton point of the second body part based on the second initial image; a first processing unit, configured to extract a first image from the first initial image based on the first skeleton point, and to extract a second image from the second initial image based on the second skeleton point; the first image is an image of a first body part wearing a first garment, and the second image is an image of a second body part wearing a second garment; The second processing unit is used to splice the first image and the second image to obtain a target image; the target image includes information of a first body part wearing a first garment and a second body part wearing a second garment.

15. An electronic device, characterized in that: It comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method according to any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 13.