Clothing display method and device, electronic equipment and storage medium

文档序号:9457 发布日期:2021-09-17 浏览:100次 中文

1. A method of displaying a garment, comprising:

cutting off the inner side image of the garment from the original garment image of the garment to be displayed to obtain a target garment image;

determining a plurality of clothing feature points from the target clothing image, and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is a vertex of a three-dimensional model;

determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point;

and rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model.

2. The garment display method of claim 1, wherein the cropping of the garment interior image from the original garment image of the garment to be displayed to obtain the target garment image comprises:

performing semantic segmentation on the original clothing image to obtain a mask image, wherein the mask image is marked with category information of each pixel point, and the category information comprises the clothing inner side and the clothing outer side;

and cutting out the garment inner side image from the original garment image according to the mask image to obtain the target garment image, wherein the target garment image comprises a garment outer side image.

3. The garment presentation method of claim 1, wherein said determining a plurality of garment feature points from said target garment image comprises:

determining corresponding points of human body joints in the target clothing image;

and determining the plurality of clothing feature points according to the corresponding points of the human body joints in the target clothing image.

4. The garment presentation method of claim 1, after determining a plurality of garment feature points from the target garment image, further comprising:

and carrying out normalization processing on the coordinates of each clothing feature point according to the width and the height of the target clothing image to obtain texture mapping coordinates of each clothing feature point.

5. The garment display method according to claim 4, wherein the determining texture map coordinates of each model vertex according to the model vertex corresponding to each garment feature point comprises:

and determining the texture mapping coordinates of each clothing feature point as the texture mapping coordinates of the corresponding model vertex.

6. The garment presentation method as claimed in any one of claims 1 to 5, wherein said garment to be presented comprises a plurality of pieces, said rendering said target garment image to said three-dimensional model according to texture map coordinates of vertices of said each model for presenting said garment to be presented through said three-dimensional model, comprising:

determining an occlusion relationship for the plurality of garments to be displayed;

determining display information of an overlapping area of the plurality of garments to be displayed according to the occlusion relation;

rendering the target garment image to the three-dimensional model according to the display information of the overlapping area and the texture mapping coordinates of each model vertex so as to display the plurality of garments to be displayed through the three-dimensional model.

7. The garment presentation method according to any one of claims 1 to 5, further comprising, before determining the model vertex corresponding to each of the plurality of garment feature points:

acquiring gender information of the clothing to be displayed;

and acquiring the three-dimensional model according to the gender information.

8. A garment display device, comprising:

the tailoring module is used for tailoring the inner side image of the garment from the original garment image of the garment to be displayed to obtain a target garment image;

the first determining module is used for determining a plurality of clothing feature points from the target clothing image and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is a vertex of a three-dimensional model;

the second determining module is used for determining the texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point;

and the rendering module is used for rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model.

9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the garment display method of any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a garment presentation method as claimed in any one of claims 1 to 7.

Background

With the development of electronic commerce, the sales of on-line clothes are also increased very rapidly. When the clothes are sold on line, the clothes can be displayed through a virtual try-on technology, and the existing virtual try-on technology mainly comprises two types of two-dimensional virtual try-on and three-dimensional virtual try-on. The two-dimensional virtual try-on mainly comprises the steps that a two-dimensional clothing image is adapted to the body posture of a model through deformation, and then the deformed image is covered on the body model to realize the try-on effect display; the three-dimensional virtual try-on mainly comprises the steps of carrying out three-dimensional modeling on the clothes, and rendering an image of wearing the three-dimensional clothes on a three-dimensional model with an adjustable body figure through a computer graphics technology, so that the show of the try-on effect is realized.

In the process of implementing the invention, the inventor finds that the two-dimensional virtual try-on adapts to the body posture of the model through the garment deformation, the semantic information of the garment can not be processed, namely the garment area shielded by the body can not be processed, and the problem of poor display effect exists; the three-dimensional virtual try-on can improve the display effect to a certain extent, but needs to model each piece of clothes, and has the problem of high modeling cost.

Disclosure of Invention

The embodiment of the invention provides a clothing display method and device, electronic equipment and a storage medium, which can solve the problem of body shielding during clothing display, improve the display effect and reduce the modeling cost.

In a first aspect, an embodiment of the present invention provides a clothing display method, including:

cutting off the inner side image of the garment from the original garment image of the garment to be displayed to obtain a target garment image;

determining a plurality of clothing feature points from the target clothing image, and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is a vertex of a three-dimensional model;

determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point;

and rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model.

In a second aspect, an embodiment of the present invention provides a garment display device, including:

the tailoring module is used for tailoring the inner side image of the garment from the original garment image of the garment to be displayed to obtain a target garment image;

the first determining module is used for determining a plurality of clothing feature points from the target clothing image and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is a vertex of a three-dimensional model;

the second determining module is used for determining the texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point;

and the rendering module is used for rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model.

In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the clothing display method according to any one of the embodiments of the present invention.

In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the clothing display method according to any one of the embodiments of the present invention.

In the embodiment of the invention, the inner side image of the garment can be cut out from the original garment image of the garment to be displayed to obtain the target garment image; determining a plurality of clothing feature points from the target clothing image, and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is the vertex of the three-dimensional model; determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point; and rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model. Because the garment inner side image in the original garment image is an image which is shielded by a body, the problem that the garment is shielded by the body can be solved by rendering the target garment image obtained by cutting out the garment inner side image to the three-dimensional model; in addition, the target clothing image is rendered to the three-dimensional model for displaying according to the texture mapping coordinates, and the two-dimensional image is displayed through the three-dimensional model, so that the display effect is more real and natural, and the display effect is improved; furthermore, for the clothes to be displayed, only the original clothes image is needed to be obtained and the clothes characteristic points are needed to be determined, and three-dimensional modeling is not needed to be carried out on each piece of clothes to be displayed, so that the modeling cost is reduced.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.

Fig. 1 is a schematic flow chart of a garment display method according to an embodiment of the present invention.

Fig. 2 is another schematic flow chart of a garment displaying method according to an embodiment of the present invention.

Fig. 3a to fig. 3f are schematic diagrams of some display effects provided by the embodiment of the invention.

Fig. 4 is a schematic structural diagram of a garment display device according to an embodiment of the present invention.

Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

Fig. 1 is a schematic flow chart of a garment displaying method provided by an embodiment of the present invention, which may be performed by a garment displaying apparatus provided by an embodiment of the present invention, and the apparatus may be implemented in software and/or hardware. In a particular embodiment, the apparatus may be integrated in an electronic device, which may be, for example, a computer. The following embodiments will be described by taking as an example that the apparatus is integrated in an electronic device, and referring to fig. 1, the method may specifically include the following steps:

step 101, cutting out an image of the inner side of the garment from an original garment image of the garment to be displayed to obtain a target garment image.

For example, the garment to be displayed may include a shirt, a coat, a T-shirt, trousers, a one-piece dress, and the like, and the garment to be displayed may be one garment or a plurality of garments, and when there are a plurality of garments to be displayed, each garment to be displayed may correspond to one original garment image, and the original garment image may be an image obtained by shooting the garment to be displayed.

Specifically, after obtaining an original garment image of a garment to be displayed, semantic segmentation may be performed on the original garment image to segment a garment inner side, a garment outer side, a background, and the like in the original garment image. The inner side of the garment, namely the inner surface of the garment, when the garment to be displayed is shot, part of the inner surface of the garment (such as a back collar, a cuff, the inner side of a back skirt hem and the like) can be exposed, and normally, when the model wears the garment, the exposed part of the inner surface of the garment is hidden and invisible by the model; the outer side of the garment is the outer surface of the garment, when the model wears the garment, the outer surface is visible, and the outer surface is mainly used for displaying the appearance, style, material, color and the like of the garment; the background is the other part of the image except the clothing to be displayed, and the part may be blank, or may be a scene, other articles and the like which are put into the mirror when the clothing to be displayed is shot.

The original garment image can be cut according to the inner side, the outer side and the background of the segmented garment. For example, the inner garment image and the background image may be cropped from the original garment image of the garment to be displayed, thereby obtaining the target garment image including the outer garment image. When the clothing to be displayed has a plurality of pieces, a plurality of target clothing images can be obtained. For example, when the garment to be displayed includes a shirt and pants, a target garment image including an image of the outside of the shirt and a target garment image including an image of the outside of the pants may be obtained.

Step 102, determining a plurality of clothing feature points from the target clothing image, and determining a model vertex corresponding to each clothing feature point in the plurality of clothing feature points, wherein the model vertex is a vertex of the three-dimensional model.

For example, the corresponding points of the human body joints in the target clothing image may be determined, and the plurality of clothing feature points may be determined according to the corresponding points of the human body joints in the target clothing image. For example, the points corresponding to the human body joints in the target clothing image may be directly determined as clothing feature points, or some points may be selected from the points corresponding to the human body joints in the target clothing image as clothing feature points. The joints of the human body include, but are not limited to, shoulder joints, elbow joints, vertebral joints, hip joints, knee joints, etc. When the types of the clothes to be displayed (such as coats and trousers) are different, the determined characteristic points of the clothes are different.

For example, the shape or contour of the garment in the target garment image can be detected, a plurality of garment feature points are determined according to the shape or contour of the garment, and the number of the specific garment feature points can be set according to actual requirements. For example, a clothing contour line in the target clothing image may be detected, and all or part of the points may be selected from the clothing contour line as clothing feature points, and one clothing feature point may be one pixel point. When the types or styles of the clothes to be displayed are different, the determined characteristic points of the clothes are also different.

In a specific implementation, a three-dimensional model for displaying the clothing to be displayed may be established in advance, and after a plurality of clothing feature points are determined from the target clothing image, a model vertex corresponding to each clothing feature point in the three-dimensional model may be determined. Specifically, for example, the three-dimensional model may be expanded to a two-dimensional plane, a mapping relationship between points of the target clothing image and the two-dimensional plane is established, and a model vertex corresponding to each clothing feature point is determined according to the mapping relationship.

And 103, determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point.

In the embodiment of the present invention, in order to distinguish from a three-dimensional coordinate system (expressed by X, Y, Z, where X denotes a horizontal direction, Y denotes a vertical direction, and Z denotes a direction perpendicular to the XY plane), a two-dimensional coordinate system may be expressed by UV, where the horizontal direction is U, the vertical direction is V, and texture map coordinates are UV coordinates. Specifically, the texture map coordinates of each clothing feature point may be determined first, and the texture map coordinates of each clothing feature point may be determined as the texture map coordinates of the corresponding model vertex, and in addition, the image smoothing interpolation processing may be performed by software at the gap position between the points.

And 104, rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model.

In a specific rendering process, it may be understood that attribute information of the clothing feature point having the same texture map coordinate as the model vertex is migrated to the corresponding model vertex, and the attribute information may include a pixel value, illumination, shadow, brightness, and the like. When a plurality of clothes to be displayed are available, the target clothes images corresponding to the plurality of clothes to be displayed can be rendered to the three-dimensional model, so that the plurality of clothes to be displayed can be displayed through the three-dimensional model at the same time.

In the embodiment of the invention, the inner side image of the garment can be cut out from the original garment image of the garment to be displayed to obtain the target garment image; determining a plurality of clothing feature points from the target clothing image, and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is the vertex of the three-dimensional model; determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point; and rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model. Because the garment inner side image in the original garment image is an image which is shielded by a body, the problem that the garment is shielded by the body can be solved by rendering the target garment image obtained by cutting out the garment inner side image to the three-dimensional model; in addition, the target clothing image is rendered to the three-dimensional model for display according to the texture mapping coordinates, the display effect is more real and natural, and the display effect is improved; furthermore, for the clothes to be displayed, only the original clothes image is needed to be obtained and the clothes characteristic points are needed to be determined, and three-dimensional modeling is not needed to be carried out on each piece of clothes to be displayed, so that the modeling cost is reduced.

The following further illustrates the garment displaying method according to an embodiment of the present invention, as shown in fig. 2, the garment displaying method according to an embodiment of the present invention may include the following steps:

step 201, performing semantic segmentation on an original clothing image of the clothing to be displayed to obtain a mask image.

For example, the garment to be displayed may include a shirt, a coat, a T-shirt, pants, a dress, etc., and the original garment image may be an image obtained by photographing the garment to be displayed. Specifically, a semantic segmentation model can be adopted to perform semantic segmentation on an original garment image of a garment to be displayed to obtain a mask image, wherein the mask image is marked with category information of each pixel point in the image, and the category information comprises a garment inner side, a garment outer side and a background.

Step 202, cutting out the inner side image of the garment from the original garment image according to the mask image to obtain the target garment image.

For example, the size of the mask image may be the same as that of the original garment image, the garment inner side region, the garment outer side region, and the background region in the original garment image may be determined according to the type information of each pixel point in the mask image, and the garment inner side image and the background image in the original garment image are cut off according to the region division, so as to obtain the target garment image including the garment outer side image.

And step 203, determining corresponding points of the human body joints in the target clothing image.

And 204, determining a plurality of clothing feature points according to corresponding points of the human body joints in the target clothing image.

For example, the corresponding points of the human body joints in the target clothing image may be directly determined as clothing feature points, or partial points may be selected from the corresponding points of the human body joints in the target clothing image as clothing feature points. The joints of the human body include, but are not limited to, shoulder joints, elbow joints, vertebral joints, hip joints, knee joints, etc. When the types (such as coats and trousers) of the clothes to be displayed are different, the determined clothes feature points are also different, one clothes feature point can be a pixel point, and the number of the specific clothes feature points can be set according to actual requirements.

And step 205, performing normalization processing on the coordinates of each clothing feature point according to the width and the height of the target clothing image to obtain texture mapping coordinates of each clothing feature point.

Specifically, the U value in the coordinates of each clothing feature point may be divided by the image width value, and the V value may be divided by the image height value, so as to normalize the coordinates of each clothing feature point for facilitating the subsequent calculation.

And step 206, acquiring the gender information of the clothes to be displayed.

For example, the gender information may be information indicating the gender of a person suitable for the garment to be displayed, and the gender information may be, for example, male, female, and the like. Further, in order to present a more accurate display effect, the gender information may also be: men, women, boys, girls, etc.

And step 207, acquiring a three-dimensional model according to the gender information.

Illustratively, the three-dimensional model may be obtained from a preset model library, which may include various models, such as a male model, a female model, a boy model, a girl model, and the like. For example, if the sex information of the clothing to be displayed is boys, a model of boys may be obtained, and if the sex information of the clothing to be displayed is women, a model of women may be obtained.

And 208, determining a model vertex corresponding to each clothing feature point, wherein the model vertex is the vertex of the three-dimensional model.

Specifically, for example, the three-dimensional model may be expanded to a two-dimensional plane, a mapping relationship between points of the target clothing image and the two-dimensional plane is established, and a model vertex corresponding to each clothing feature point is determined according to the mapping relationship.

Step 209, determine the texture map coordinates of each clothing feature point as the texture map coordinates of the corresponding model vertex.

That is, the model vertex corresponding to each clothing feature point has coordinates (U, V) of a two-dimensional coordinate system in addition to coordinates (X, Y, Z) of a three-dimensional coordinate system.

Step 210, determining the shielding relationship of a plurality of clothes to be displayed.

When multiple garments to be displayed are provided, the occlusion relationship of the multiple garments to be displayed can be determined. Specifically, the shielding relationship of the plurality of garments to be displayed may be determined according to preset data (i.e., preset shielding relationship), or the shielding relationship of the plurality of garments to be displayed may be determined according to user input data acquired from a preset interface. The specific occlusion relationship may be, for example: the jacket covers trousers, the coat covers shirts, T-shirts and the like.

And step 211, determining display information of the overlapping areas of the plurality of clothes to be displayed according to the shielding relation.

I.e., determining which garment the overlapping areas of the plurality of garments to be displayed show. For example, when the plurality of clothes to be displayed include a jacket and trousers, if the shielding relationship is that the jacket shields the trousers, the display information of the overlapping area of the jacket and the trousers can be determined as the jacket; for another example, if the occlusion relationship is that the shirt occludes the shirt for a jacket, then the displayed information for the overlapping area of the shirt and jacket may be determined to be the jacket.

And 212, rendering the target clothing image to the three-dimensional model according to the display information of the overlapping area and the texture mapping coordinates of each model vertex so as to display a plurality of pieces of clothing to be displayed through the three-dimensional model.

In a specific rendering process, it may be understood that attribute information of the clothing feature point having the same texture map coordinate as the model vertex is migrated to the corresponding model vertex, and the attribute information may include a pixel value, illumination, shadow, brightness, and the like.

Specifically, when there are a plurality of garments to be displayed and there are overlapping areas between the plurality of garments to be displayed, there may be a plurality of garment feature points whose texture map coordinates are the same as those of a certain model vertex, and it may be specifically determined which garment feature point attribute information is migrated to the corresponding model vertex according to the display information of the overlapping area. For example, if the plurality of garments to be displayed include a jacket and a pair of pants, and the display information of the overlapping area of the jacket and the pair of pants is the jacket, the attribute information of the garment feature point corresponding to the jacket may be migrated to the corresponding vertex of the model.

When a plurality of clothes to be displayed are available, the target clothes images of the plurality of clothes to be displayed can be rendered to the three-dimensional model at one time, and the target clothes images of the plurality of clothes to be displayed can be rendered to the three-dimensional model at multiple times.

In the embodiment of the invention, the inner side image of the garment can be cut out from the original garment image of the garment to be displayed to obtain the target garment image; determining a plurality of clothing feature points from the target clothing image, and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is the vertex of the three-dimensional model; determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point; and rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model. Because the garment inner side image in the original garment image is an image which is shielded by a body, the problem that the garment is shielded by the body can be solved by rendering the target garment image obtained by cutting out the garment inner side image to the three-dimensional model; in addition, the target clothing image is rendered to the three-dimensional model for display according to the texture mapping coordinates, the display effect is more real and natural, and the display effect is improved; furthermore, for the clothes to be displayed, only the original clothes image is needed to be obtained and the clothes characteristic points are needed to be determined, and three-dimensional modeling is not needed to be carried out on each piece of clothes to be displayed, so that the modeling cost is reduced.

In addition, when the clothing to be displayed comprises a plurality of pieces, the display information of the clothing overlapping area can be determined according to the shielding relation, and the target clothing image is rendered according to the display information of the clothing overlapping area and the texture mapping coordinates of each model vertex, so that the shielding problem among the clothing is solved, and the display effect of the clothing is further improved. When the matching display of a plurality of clothes is carried out, only the image of each clothes is obtained and the characteristic points of the clothes are determined, the matching effect of the clothes of different types does not need to be generated in advance, the controllability is high, the matching display of the clothes of different brands and types is convenient, and the application scene of the clothes display is expanded.

The following describes the method for displaying the clothes provided by the embodiment of the invention by taking the clothes to be displayed as the women's coat as an example.

For example, if the original garment image of the garment to be displayed is shown in fig. 3a and is an image of a woman's coat, the inner side image (back neckline in fig. 3 a) and the background image of the garment can be cut out from the original garment image to obtain the target garment image shown in fig. 3 b. The plurality of clothing feature points determined in the target clothing image may be, as shown in fig. 3c, points corresponding to joints of the human body in the target clothing image.

Since the original garment image is a lady coat, a model of the lady model can be obtained, for example, as shown in fig. 3 d. Next, determining a model vertex corresponding to each clothing feature point in the model of the female model, determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point, rendering the target clothing image 3b to the model of the female model 3d according to the texture mapping coordinates of each model vertex, wherein the display effect after rendering can be as shown in fig. 3 e.

Further, when it is also desired to show the trousers on the model of the female model in fig. 3d, the shielding relationship between the jacket and the trousers can be determined: the upper garment shields the trousers, namely the upper garment is displayed in the garment overlapping area, then the target garment image of the trousers is rendered to the model drawing 3d of the female model, and the effect shown after the rendering is as shown in the figure 3f, so that the effect of simultaneously displaying the upper garment and the trousers by using the model drawing 3d of the female model is realized.

It should be noted that the effect diagrams shown in the embodiments of the present disclosure are intended to illustrate the clothing display method according to the embodiments of the present disclosure, and the content presented in the specific interface (including but not limited to feature points, pictures, expressions, etc.) does not constitute a limitation on the scheme.

Fig. 4 is a structural diagram of a clothing display apparatus according to an embodiment of the present invention, which is suitable for performing the clothing display method according to an embodiment of the present invention. As shown in fig. 4, the apparatus may specifically include:

a cropping module 401, configured to crop out an image of an inner side of a garment from an original garment image of the garment to be displayed, so as to obtain a target garment image;

a first determining module 402, configured to determine a plurality of clothing feature points from the target clothing image, and determine a model vertex corresponding to each clothing feature point in the plurality of clothing feature points, where the model vertex is a vertex of a three-dimensional model;

a second determining module 403, configured to determine texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point;

a rendering module 404, configured to render the target garment image to the three-dimensional model according to the texture map coordinates of each model vertex, so as to display the garment to be displayed through the three-dimensional model.

In an embodiment, the cropping module 401 is specifically configured to:

performing semantic segmentation on the original clothing image to obtain a mask image, wherein the mask image is marked with category information of each pixel point, and the category information comprises the clothing inner side and the clothing outer side;

and cutting out the garment inner side image from the original garment image according to the mask image to obtain the target garment image, wherein the target garment image comprises a garment outer side image.

In one embodiment, the determining the plurality of clothing feature points from the target clothing image by the first determining module 402 includes:

determining corresponding points of human body joints in the target clothing image;

and determining the plurality of clothing feature points according to the corresponding points of the human body joints in the target clothing image.

In one embodiment, the apparatus further comprises:

and the normalization module is used for performing normalization processing on the coordinates of each clothing feature point according to the width and the height of the target clothing image to obtain texture mapping coordinates of each clothing feature point.

In an embodiment, the second determining module 403 is specifically configured to:

and determining the texture mapping coordinates of each clothing feature point as the texture mapping coordinates of the corresponding model vertex.

In an embodiment, the garment to be displayed comprises a plurality of pieces, and the rendering module 404 is specifically configured to:

determining an occlusion relationship for the plurality of garments to be displayed;

determining display information of an overlapping area of the plurality of garments to be displayed according to the occlusion relation;

rendering the target garment image to the three-dimensional model according to the display information of the overlapping area and the texture mapping coordinates of each model vertex so as to display the plurality of garments to be displayed through the three-dimensional model.

In one embodiment, the apparatus further comprises:

the acquisition module is used for acquiring the gender information of the clothing to be displayed; and acquiring the three-dimensional model according to the gender information.

It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the functional module, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.

The device provided by the embodiment of the invention can cut the inner side image of the garment from the original garment image of the garment to be displayed to obtain the target garment image; determining a plurality of clothing feature points from the target clothing image, and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is the vertex of the three-dimensional model; determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point; and rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model. Because the garment inner side image in the original garment image is an image which is shielded by a body, the problem that the garment is shielded by the body can be solved by rendering the target garment image obtained by cutting out the garment inner side image to the three-dimensional model; in addition, the target clothing image is rendered to the three-dimensional model for display according to the texture mapping coordinates, the display effect is more real and natural, and the display effect is improved; furthermore, for the clothes to be displayed, only the original clothes image is needed to be obtained and the clothes characteristic points are needed to be determined, and three-dimensional modeling is not needed to be carried out on each piece of clothes to be displayed, so that the modeling cost is reduced.

The embodiment of the invention also provides electronic equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the garment display method provided by any one of the embodiments is realized.

The embodiment of the invention also provides a computer readable medium, wherein a computer program is stored on the computer readable medium, and when the computer program is executed by a processor, the garment display method provided by any one of the embodiments is realized.

Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.

As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.

The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.

In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.

It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

The modules and/or units described in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware. The described modules and/or units may also be provided in a processor, and may be described as: a processor includes a cropping module, a first determination module, a second determination module, and a rendering module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.

As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:

cutting off the inner side image of the garment from the original garment image of the garment to be displayed to obtain a target garment image; determining a plurality of clothing feature points from the target clothing image, and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is a vertex of a three-dimensional model; determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point; and rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model.

According to the technical scheme of the embodiment of the invention, the inner side image of the garment can be cut out from the original garment image of the garment to be displayed to obtain the target garment image; determining a plurality of clothing feature points from the target clothing image, and determining a model vertex corresponding to each clothing feature point in the clothing feature points, wherein the model vertex is the vertex of the three-dimensional model; determining texture mapping coordinates of each model vertex according to the model vertex corresponding to each clothing feature point; and rendering the target clothing image to the three-dimensional model according to the texture mapping coordinates of each model vertex so as to display the clothing to be displayed through the three-dimensional model. Because the garment inner side image in the original garment image is an image which is shielded by a body, the problem that the garment is shielded by the body can be solved by rendering the target garment image obtained by cutting out the garment inner side image to the three-dimensional model; in addition, the target clothing image is rendered to the three-dimensional model for display according to the texture mapping coordinates, the display effect is more real and natural, and the display effect is improved; furthermore, for the clothes to be displayed, only the original clothes image is needed to be obtained and the clothes characteristic points are needed to be determined, and three-dimensional modeling is not needed to be carried out on each piece of clothes to be displayed, so that the modeling cost is reduced.

The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:颅脑穿刺术前三维模型的建模方法、系统、装置、介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!