CN113065176B - Object attachment method, device, equipment and computer readable storage medium - Google Patents

Object attachment method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN113065176B
CN113065176B CN202110380188.7A CN202110380188A CN113065176B CN 113065176 B CN113065176 B CN 113065176B CN 202110380188 A CN202110380188 A CN 202110380188A CN 113065176 B CN113065176 B CN 113065176B
Authority
CN
China
Prior art keywords
target
attachment
attached
model
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110380188.7A
Other languages
Chinese (zh)
Other versions
CN113065176A (en
Inventor
魏志国
李静
高伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Grimmbro Technology Co ltd
Original Assignee
Shenzhen Grimmbro Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Grimmbro Technology Co ltd filed Critical Shenzhen Grimmbro Technology Co ltd
Priority to CN202110380188.7A priority Critical patent/CN113065176B/en
Publication of CN113065176A publication Critical patent/CN113065176A/en
Application granted granted Critical
Publication of CN113065176B publication Critical patent/CN113065176B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/12Cloth

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Human Computer Interaction (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses an object attachment method, an object attachment device and a computer-readable storage medium, wherein the object attachment method comprises the steps of firstly positioning an attachment area where a target attachment object is to be attached to a target model to be attached, then judging the intersection condition of the target attachment object and the attachment area to judge the intention of a user, and when the target attachment object is intersected with the attachment area, considering that the user has the intention of attaching the target attachment object to the target model to be attached at the moment, directly converting the target attachment object to the position of the attachment area in a mode of changing the actual positioning coordinates of the target attachment object to display the target attachment object as being automatically attached to the target attachment model, so that the user is not required to slowly move the position of the target attachment object to the attachment area by using a mouse or a keyboard, and the position adjustment efficiency of the target attachment object is improved.

Description

Object attachment method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an object attachment method, an object attachment apparatus, an object attachment device, and a computer-readable storage medium.
Background
With the combination of computer technology and traditional design industries, various design software brings great convenience to daily work of designers. When the existing clothing matching software is used for loading a model, clothing is generally adjusted to a corresponding position on the model body through a mouse and a keyboard, and when a plurality of pieces of clothing are required to be overlapped and matched, the clothing is often required to be sequentially dragged or moved to be placed according to the inside and outside sequence of the clothing. Based on this, even when the designer overlaps and assembles the model for many times, the designer still needs to move or drag slowly piece by piece, so that the whole process is very time-consuming, and the technical problem that the efficiency of adjusting the position of the clothes in the existing clothes matching software is low is reflected.
Disclosure of Invention
The invention mainly aims to provide an object attachment method, an object attachment device, object attachment equipment and a computer-readable storage medium, and aims to solve the technical problem of low efficiency of adjusting clothing positions in existing clothing matching software.
In order to achieve the above object, the present invention provides an object attaching method including:
determining a target attachment object and a target model to be attached;
according to the target attachment object and the target model to be attached, positioning an attachment area of the target attachment object on the target model to be attached;
when the target attachment object intersects with the attachment area, acquiring actual positioning coordinates of the target attachment object, and changing coordinate data of the actual positioning coordinates into coordinate data of attachment positioning coordinates, wherein the attachment positioning coordinates are positioning coordinates when the target attachment object is attached to the target model to be attached.
Optionally, when there are a plurality of attached objects and a plurality of models to be attached, the step of determining the target attached object and the target model to be attached includes:
upon receiving a target selection instruction, determining the target attachment object from the plurality of attachment objects based on the target selection instruction;
judging whether a model selection instruction sent by a user is received;
and if so, determining a model to be attached selected by a user from the plurality of models to be attached as the target model to be attached based on the model selection instruction.
Optionally, after the step of determining whether a model selection instruction sent by a user is received, the method further includes:
if not, selecting the model to be attached closest to the target attachment object from the multiple models to be attached as the target model to be attached.
Optionally, the attachment object comprises a piece of apparel, the model to be attached comprises a mannequin,
before the step of determining the target attachment object and the target to-be-attached model, the method further includes:
acquiring a plurality of first modeling data sets of the clothes and a plurality of second modeling data sets of the human body models;
according to the first modeling data set and the second modeling data set, each dress is positioned to a corresponding part of each human body model, and reference coordinates of each dress on the corresponding part are recorded, so that the attachment area is determined based on the reference coordinates;
the target attachment object comprises a target garment, the target model to be attached comprises a target mannequin, and the step of positioning the attachment area of the target attachment object corresponding to the target model to be attached according to the target attachment object and the target model to be attached comprises the following steps of:
acquiring specification data of the target clothes and target reference coordinates of the target clothes corresponding to the target mannequin;
and drawing a shadow prompting area on the target human body model based on the specification data and the target reference coordinate to be used as the attachment area.
Optionally, before the step of acquiring the actual positioning coordinates of the target attached object and changing the coordinate data of the actual positioning coordinates into the coordinate data of the attached positioning coordinates when the target attached object intersects with the attached area, the method further includes:
judging whether the target attachment object intersects with the attachment area;
the step of judging whether the target attachment object intersects with the attachment area comprises the following steps:
positioning a display area where the target attachment object is located in real time, and acquiring real-time vertex coordinates of the display area;
judging whether the display area is overlapped with the attachment area or not based on the attachment vertex coordinates of the attachment area and the real-time vertex coordinates;
if so, judging that the target attachment object is intersected with the attachment area;
and if not, judging that the target attachment object and the attachment area are not intersected.
Optionally, the display area is the same size as the attachment area,
when the target attachment object intersects with the attachment area, the step of acquiring the actual positioning coordinate of the target attachment object and changing the coordinate data of the actual positioning coordinate into the coordinate data of the attachment positioning coordinate comprises:
and when the target attachment object is detected to intersect with the attachment area, taking the real-time vertex coordinate as the actual positioning coordinate, and correspondingly changing the real-time vertex coordinate into the attachment vertex coordinate so as to attach the target attachment object to the corresponding position on the target model to be attached.
Optionally, when a plurality of attached objects are drawn on the target model to be attached,
after the step of acquiring the actual positioning coordinate of the target attached object and changing the coordinate data of the actual positioning coordinate into the coordinate data of the attached positioning coordinate when the target attached object intersects with the attached area, the method further includes:
acquiring a focus coordinate clicked by a mouse;
according to the layer display sequence of the plurality of attached objects on the model to be attached with the target, matching the focus coordinates with the part coordinate groups corresponding to the plurality of attached objects one by one to determine the target attached object clicked by the mouse;
redrawing a plurality of the attached objects on the target model to be attached based on the target attached object so as to redraw and display the target attached object on the uppermost layer.
Further, to achieve the above object, the present invention also provides an object attaching apparatus including:
the target determining module is used for determining a target attachment object and a target model to be attached;
the area positioning module is used for positioning an attachment area of the target attachment object on the target model to be attached according to the target attachment object and the target model to be attached;
and the coordinate changing module is used for acquiring the actual positioning coordinate of the target attachment object when the target attachment object is intersected with the attachment area, and changing the coordinate data of the actual positioning coordinate into the coordinate data of the attachment positioning coordinate, wherein the attachment positioning coordinate is the positioning coordinate when the target attachment object is attached to the target model to be attached.
Optionally, when there are a plurality of attachment objects and a plurality of models to be attached, the target determination module includes:
a target object determination unit configured to determine, when a target selection instruction is received, the target attachment object from the plurality of attachment objects based on the target selection instruction;
the instruction receiving and judging unit is used for judging whether a model selection instruction sent by a user is received or not;
and if so, determining a model to be attached selected by the user from the plurality of models to be attached as the target model to be attached based on the model selection instruction.
Optionally, the goal determining module comprises:
and the system default selection unit is used for selecting the model to be attached closest to the target attachment object from the plurality of models to be attached as the target model to be attached if the model to be attached is not the target attachment object.
Optionally, the attachment object comprises a piece of apparel, the model to be attached comprises a mannequin,
the object attaching apparatus further includes:
the modeling data acquisition unit is used for acquiring a plurality of first modeling data sets of the clothes and a plurality of second modeling data sets of the human body models;
the dress part positioning unit is used for positioning each dress to a corresponding part of each human body model according to the first modeling data set and the second modeling data set, and recording reference coordinates of each dress on the corresponding part so as to determine the attachment area based on the reference coordinates;
the target attachment object comprises a target garment, the target to-be-attached model comprises a target mannequin,
the zone location module includes:
the specification reference acquisition unit is used for acquiring the specification data of the target clothes and target reference coordinates of the target clothes on the target mannequin;
and the shadow area drawing unit is used for drawing a shadow prompt area on the target human body model based on the specification data and the target reference coordinate to be used as the attachment area.
Optionally, the object attaching apparatus further comprises:
the area intersection judging module is used for judging whether the target attachment object intersects with the attachment area;
the area intersection judging module comprises:
the vertex coordinate acquisition unit is used for positioning the display area where the target attachment object is located in real time and acquiring real-time vertex coordinates of the display area;
the area overlapping judging unit is used for judging whether the display area is overlapped with the attachment area or not based on the attachment vertex coordinate of the attachment area and the real-time vertex coordinate;
a first intersection determination unit configured to determine that the target attachment object intersects the attachment area if yes;
and the second intersection judging unit is used for judging that the target attachment object and the attachment area do not intersect with each other if the target attachment object and the attachment area do not intersect with each other.
Optionally, the display area is the same size as the attachment area,
the coordinate modification module includes:
and the vertex coordinate changing unit is used for taking the real-time vertex coordinate as the actual positioning coordinate when the target attachment object is detected to be intersected with the attachment area, and correspondingly changing the real-time vertex coordinate into the attachment vertex coordinate so as to attach the target attachment object to the corresponding position on the target model to be attached.
Optionally, when a plurality of attached objects are drawn on the target model to be attached,
the object attaching apparatus further includes:
the focus coordinate acquisition module is used for acquiring a focus coordinate clicked by a mouse;
the target object determining module is used for matching the focus coordinates with the part coordinate groups corresponding to the multiple attached objects one by one according to the layer display sequence of the multiple attached objects on the target model to be attached so as to determine the target attached objects clicked by the mouse;
and the object redrawing module is used for redrawing the plurality of attached objects on the target model to be attached based on the target attached object so as to redraw and display the target attached object on the uppermost layer.
Further, to achieve the above object, the present invention also provides an object attaching apparatus including: a memory, a processor and an object attachment program stored on the memory and executable on the processor, the object attachment program when executed by the processor implementing the steps of the method as described above.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having an object attachment program stored thereon, which when executed by a processor, implements the steps of the above method.
The invention provides an object attachment method, an object attachment device, object attachment equipment and a computer-readable storage medium. The object attaching method comprises the steps of firstly positioning an attaching area where a target attaching object is to be attached to a target model to be attached, then judging the user intention by judging the intersection condition of the target attaching object and the attaching area, and when the target attaching object is intersected with the attaching area, considering that the user has the intention of attaching the target attaching object to the target model to be attached at the moment, directly converting the target attaching object to the position of the attaching area in a mode of changing the actual positioning coordinate of the target attaching object to display the target attaching object as automatically attached to the target attaching model, so that the operation that the user uses a mouse or a keyboard to slowly move the position of the target attaching object to the attaching area is avoided, the position adjusting efficiency of the target attaching object is improved, and when the target attaching object is a piece of clothing in clothing matching software and the target model to be attached is a human body model in the clothing matching software, the technical problem that the position adjusting efficiency of the piece of clothing in the existing clothing matching software is low can be solved.
Drawings
FIG. 1 is a schematic diagram of an object attachment apparatus in a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of the object attaching method according to the present invention;
FIG. 3 is a schematic view of a human model before short-sleeved clothing in clothing matching software according to a second embodiment of the object attaching method of the present invention;
FIG. 4 is a schematic diagram showing the effect of short-sleeved dress on a human model in clothing matching software according to a second embodiment of the object attaching method of the present invention;
fig. 5 is a schematic diagram of the object attachment method according to the third embodiment of the present invention before the layer switching operation in the clothing matching software;
fig. 6 is a schematic diagram illustrating an effect of the third embodiment of the object attachment method of the present invention before switching the layers in the clothing matching software;
fig. 7 is a functional block diagram of the object attaching apparatus of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic diagram of an object attachment device structure of a hardware operating environment according to an embodiment of the present invention.
The object attachment device in the embodiment of the invention is a terminal device with a display function.
As shown in fig. 1, the object attaching apparatus may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The optional user interface 1003 may include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory). The memory 1005 may alternatively be a memory device separate from the processor 1001 described above.
It will be understood by those skilled in the art that the object attachment arrangement shown in fig. 1 does not constitute a limitation of the object attachment arrangement and may comprise more or less components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an object attachment program.
In the object attachment apparatus shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the object attachment program stored in the memory 1005 and perform the following operations:
determining a target attachment object and a target model to be attached;
according to the target attachment object and the target model to be attached, positioning an attachment area of the target attachment object on the target model to be attached;
when the target attachment object intersects with the attachment area, acquiring actual positioning coordinates of the target attachment object, and changing coordinate data of the actual positioning coordinates into coordinate data of attachment positioning coordinates, wherein the attachment positioning coordinates are positioning coordinates when the target attachment object is attached to the target model to be attached.
Further, when there are a plurality of attached objects and a plurality of models to be attached, the step of determining the target attached object and the target model to be attached includes:
when a target selection instruction is received, determining the target attachment object from a plurality of attachment objects based on the target selection instruction;
judging whether a model selection instruction sent by a user is received;
and if so, determining a model to be attached selected by a user from the plurality of models to be attached as the target model to be attached based on the model selection instruction.
Further, after the step of determining whether a model selection instruction issued by the user is received, the processor 1001 may be configured to call the object attach program stored in the memory 1005, and perform the following operations:
if not, selecting the model to be attached closest to the target attachment object from the multiple models to be attached as the target model to be attached.
Further, the attachment object comprises a dress, the model to be attached comprises a mannequin,
prior to the step of determining the target attachment object and the target to-be-attached model, the processor 1001 may be configured to call an object attachment program stored in the memory 1005, and perform the following operations:
acquiring a plurality of first modeling data sets of the clothes and a plurality of second modeling data sets of the human body models;
according to the first modeling data set and the second modeling data set, each dress is positioned to a corresponding part of each human body model, and reference coordinates of each dress on the corresponding part are recorded, so that the attachment area is determined based on the reference coordinates;
the target attachment object comprises a target garment, the target to-be-attached model comprises a target mannequin,
the step of positioning the attachment area of the target attachment object on the target model to be attached according to the target attachment object and the target model to be attached comprises the following steps:
acquiring specification data of the target clothes and target reference coordinates of the target clothes corresponding to the target mannequin;
and drawing a shadow prompting area on the target human body model based on the specification data and the target reference coordinate to be used as the attachment area.
Further, before the step of acquiring the actual positioning coordinates of the target attachment object when the target attachment object intersects with the attachment area, and changing the coordinate data of the actual positioning coordinates into the coordinate data of the attachment positioning coordinates, the processor 1001 may be configured to call an object attachment program stored in the memory 1005, and perform the following operations:
judging whether the target attachment object intersects with the attachment area;
the step of judging whether the target attachment object intersects with the attachment area comprises:
positioning a display area where the target attachment object is located in real time, and acquiring real-time vertex coordinates of the display area;
judging whether the display area is overlapped with the attachment area or not based on the attachment vertex coordinates of the attachment area and the real-time vertex coordinates;
if so, judging that the target attachment object is intersected with the attachment area;
and if not, judging that the target attachment object and the attachment area are not intersected.
Further, the display area is the same size as the attachment area,
when the target attachment object intersects with the attachment area, the step of acquiring the actual positioning coordinate of the target attachment object and changing the coordinate data of the actual positioning coordinate into the coordinate data of the attachment positioning coordinate comprises:
and when the target attachment object is detected to be intersected with the attachment area, taking the real-time vertex coordinate as the actual positioning coordinate, and correspondingly changing the real-time vertex coordinate into the attachment vertex coordinate so as to attach the target attachment object to the corresponding position on the target model to be attached.
Further, when a plurality of attached objects are drawn on the target model to be attached,
after the step of acquiring the actual positioning coordinates of the target attachment object when the target attachment object intersects with the attachment area, and changing the coordinate data of the actual positioning coordinates into the coordinate data of the attachment positioning coordinates, the processor 1001 may be configured to call an object attachment program stored in the memory 1005, and perform the following operations:
acquiring a focus coordinate clicked by a mouse;
according to the layer display sequence of the plurality of attached objects on the model to be attached with the target, matching the focus coordinates with the part coordinate groups corresponding to the plurality of attached objects one by one to determine the target attached object clicked by the mouse;
redrawing a plurality of the attached objects on the target to-be-attached model based on the target attached object so as to redraw and display the target attached object on the uppermost layer.
Based on the above hardware structure, various embodiments of the object attaching method of the present invention are proposed.
With the combination of computer technology and traditional design industries, various design software brings great convenience to daily work of designers. When the existing clothing matching software is used for loading a model, clothing is generally adjusted to a corresponding position on the model body through a mouse and a keyboard, and when a plurality of pieces of clothing are required to be overlapped and matched, the clothing is often required to be sequentially dragged or moved to be placed according to the inside and outside sequence of the clothing. Based on this, even when the designer overlaps and assembles the model for many times, the designer still needs to move or drag slowly piece by piece, so that the whole process is very time-consuming, and the technical problem that the efficiency of adjusting the position of the clothes in the existing clothes matching software is low is reflected.
In order to solve the technical problems, the invention provides an object attachment method, namely, an attachment area where a target attachment object is to be attached to a target model to be attached is firstly positioned, then the intersection condition of the target attachment object and the attachment area is judged to judge the intention of a user, and when the target attachment object is intersected with the attachment area, the intention of the user to attach the target attachment object to the target model to be attached is considered to exist at the moment, the target attachment object is directly converted to the position of the attachment area in a mode of changing the actual positioning coordinate of the target attachment object so as to be displayed as automatically attached to the target attachment model, so that the operation that the user slowly moves the position of the target attachment object to the attachment area by using a mouse or a keyboard is avoided, the position adjustment efficiency of the target attachment object is improved, and when the target attachment object is clothing in clothing collocation software and the target model to be attached is a human body model in the clothing collocation software, the technical problem of the collocation clothing position adjustment efficiency in the existing clothing software is low can be solved.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of an object attaching method.
A first embodiment of the present invention provides an object attaching method including:
s10, determining a target attachment object and a target model to be attached;
in this embodiment, the method is applied to the terminal device. The target attachment object refers to an object which can be displayed on the terminal device as being attached to a certain model, and specifically can be various clothes in the clothing matching software, various house parts in the building design software, and the like. The model to be attached to the target refers to a model to be attached to the target attached object, which can be displayed on the terminal device, and specifically can be various human body models in clothing matching software, house foundations in building design software, and the like. It should be noted that the target attachment object and the target model to be attached may be presented in a two-dimensional form or a three-dimensional form in the terminal device, and this embodiment is not limited in particular.
Taking the use scene of the clothing matching software as an example, a user matches clothing for a mannequin on the clothing matching software, when one mannequin and a plurality of pieces of clothing exist in a page, the mannequin can be directly determined as a target model to be attached, and then the clothing selected by the user is taken as a target attachment object; when a plurality of mannequins and a plurality of clothes exist in the page, the clothes selected by the user through the mouse are also used as target attachment objects, then the model closest to the target attachment objects can be set as a target model to be attached by default, or the user can independently select one or more models from the plurality of models to be used as the target model to be attached.
S20, according to the target attachment object and the target model to be attached, positioning an attachment area of the target attachment object on the target model to be attached;
in this embodiment, the attachment area refers to an area where the target attachment object is located when the target attachment object is correctly attached to the target model to be attached, and specifically, the positioning can be performed in two ways. The first mode is as follows: the software records the position of the attachment area of each attachment object corresponding to the model to be attached in advance, each attachment object and the model to be attached have unique corresponding numbers, and the number of the attachment object, the number of the model to be attached and the position information of the attachment area corresponding to the attachment object and the model to be attached are stored in an associated manner. When the terminal determines the target attachment object and the target model to be attached which are currently selected by the user, the corresponding attachment area position information is determined according to the serial numbers of the target attachment object and the target model to be attached, and then the attachment area in the page is positioned according to the actual position of the target model to be attached in the page.
The second mode is as follows: the software records a datum point corresponding to each attachment object on the model to be attached in advance. The method comprises the steps that a terminal obtains specification data of a target attachment object determined by a current user, for example, length and width data of a two-dimensional target attachment object, then reference coordinates corresponding to the target attachment object and a target model to be attached are obtained, the reference coordinates are converted into target reference coordinates, and finally an attachment area is located on the target model to be attached according to the length and width of the target attachment object and the target reference coordinates.
And S30, when the target attachment object is intersected with the attachment area, acquiring actual positioning coordinates of the target attachment object, and changing the coordinate data of the actual positioning coordinates into coordinate data of attachment positioning coordinates, wherein the attachment positioning coordinates are positioning coordinates when the target attachment object is attached to the target model to be attached.
In this embodiment, the actual positioning coordinates refer to positioning coordinates when the terminal determines that the target attachment object intersects with the attachment area corresponding to the target model to be attached, and are typically edge contour coordinates of a layer where the target attachment object is located. The attachment positioning coordinates refer to edge contour coordinates of a layer where the target attachment object is correctly attached to the corresponding position of the target model to be attached, and generally correspond to the attachment area.
After determining the target attachment object and the target to-be-attached model in the current scene, the terminal detects the real-time position of the target attachment object and judges whether the target attachment object intersects with the attachment area or not. When the terminal detects that the target attachment object intersects with the attachment area, the edge contour coordinate of the layer where the target attachment object is located at the moment can be directly changed into the attachment positioning coordinate of the random shadow with the correct attachment effect, and on the user plane, the effect is displayed as that the target attachment object is directly adsorbed to the target model to be attached.
In the embodiment, the target attachment object and the target to-be-attached model are determined; according to the target attachment object and the target model to be attached, positioning an attachment area of the target attachment object on the target model to be attached; when the target attachment object intersects with the attachment area, acquiring actual positioning coordinates of the target attachment object, and changing coordinate data of the actual positioning coordinates into coordinate data of attachment positioning coordinates, wherein the attachment positioning coordinates are positioning coordinates when the target attachment object is attached to the target model to be attached. Through the mode, the invention firstly positions the attachment area of the target attachment object to be attached to the target model to be attached, then judges the user intention by judging the intersection condition of the target attachment object and the attachment area, and when the target attachment object intersects with the attachment area, the intention of attaching the target attachment object to the target model to be attached is considered to exist at the moment of the user, the target attachment object is directly converted to the position of the attachment area by changing the actual positioning coordinate of the target attachment object so as to be displayed to be automatically attached to the target attachment model, thereby avoiding the operation that the user slowly moves the position of the target attachment object to the attachment area by using a mouse or a keyboard, improving the position adjustment efficiency of the target attachment object, and solving the technical problem of low efficiency of adjusting the position of clothes in the existing clothes collocation software when the target attachment object is the clothes in the clothes collocation software and the target model to be attached is the human body model in the clothes collocation software.
Further, a second embodiment of the object attaching method of the present invention is proposed based on the first embodiment shown in fig. 2 described above, and in this embodiment, when there are a plurality of attaching objects and a plurality of models to be attached, step S10 includes:
upon receiving a target selection instruction, determining the target attachment object from the plurality of attachment objects based on the target selection instruction;
judging whether a model selection instruction sent by a user is received;
and if so, determining a model to be attached selected by a user from the plurality of models to be attached as the target model to be attached based on the model selection instruction.
Further, after the step of determining whether a model selection instruction issued by a user is received, the method further includes:
if not, selecting the model to be attached closest to the target attachment object from the multiple models to be attached as the target model to be attached.
And if not, selecting the model to be attached closest to the target attachment object from the plurality of models to be attached as the target model to be attached.
In this embodiment, when a plurality of attachment objects and a plurality of models to be attached exist in a current page, a user may select one of the attachment objects through a mouse, a button, or a touch screen click, which is equivalent to that the user sends a target selection instruction to the terminal. After receiving the target selection instruction, the terminal can determine whether a model selection instruction sent by a user is received within a certain preset time period. If a model selection instruction sent by a user is received in the time period, one or more models to be attached selected by the user at the time can be determined as the target model to be attached according to the instruction; if the user does not send a model selection instruction in the time period, the system executes default setting, and takes the model to be attached closest to the target attachment object as the target model to be attached.
Further, the attachment object comprises a dress, the model to be attached comprises a mannequin,
before step S10, the method further includes:
acquiring a plurality of first modeling data sets of the clothes and a plurality of second modeling data sets of the human body models;
according to the first modeling data set and the second modeling data set, each piece of clothes is positioned to a corresponding part of each human body model, reference coordinates of each piece of clothes on the corresponding part are recorded, and the attachment area is determined based on the reference coordinates;
in this embodiment, a usage scenario of the clothing matching software is taken as an example. In the clothing matching software, the attached objects are various types of clothing generally, and the models to be attached are various types of mannequins generally.
The clothing matching software needs to model each clothing and each human model in advance to obtain modeling data. The modeling data of the same clothes are used as first modeling data, and the modeling data of all clothes in the software are the first modeling data set; the modeling data of the same model is used as second modeling data, and the modeling data of all models in the software is the second modeling data set. Each garment is then positioned on a relevant part of the model, for example, the shirt needs to be positioned on the upper body of the model, and the pants needs to be positioned on the lower body of the model. And recording the reference coordinates of the clothes on the corresponding parts of the model after positioning. Usually, a piece of clothing corresponds to a model and only one reference coordinate needs to be recorded.
The target attachment object comprises a target garment, the target model to be attached comprises a target mannequin, and the step S20 comprises:
acquiring specification data of the target clothes and target reference coordinates of the target clothes corresponding to the target mannequin;
and drawing a shadow prompting area on the target human body model based on the specification data and the target reference coordinate to be used as the attachment area.
In the present embodiment, the specification data generally refers to length-width data (two-dimensional) or length-width-height data (three-dimensional) of the apparel. The target reference coordinates refer to reference coordinates corresponding to the target clothes and the target mannequin together.
The software records a datum point corresponding to each attachment object on the model to be attached in advance. The method comprises the steps that a terminal obtains specification data of target clothes determined by a current user, for example, length and width data of two-dimensional target clothes, then reference coordinates corresponding to the target clothes and a target mannequin are obtained, the reference coordinates are converted into target reference coordinates according to the actual position of the target mannequin in a page, finally, the target reference coordinates are used as a starting point, the length and the width of a target attachment object are used as drawing length and width, a shadow prompting area is drawn on the page to serve as an attachment area, and the shadow part is used for prompting the area of the user to be the correct position where the target clothes are to be moved currently.
As shown in fig. 3, a jacket pattern is shown on the left side of fig. 3, a mannequin pattern with a jacket and pants attached in the middle, and a jacket pattern on the right side. Wherein, a rectangular frame is arranged around the short coat pattern and used for marking the position of the short coat pattern. And a rectangular shadow area is also displayed on the upper half body of the model, the shadow area is an attachment area of the short coat pattern corresponding to the model body, and the size of the shadow area is the same as that of the rectangular mark area of the short coat. When the user drags the short coat pattern in the working area of the software to move, the shadow area of the upper body of the model is displayed to prompt the user. As shown in fig. 4, when the terminal determines that the rectangular identification area where the short coat is located overlaps the shadow part, the short coat pattern can be automatically absorbed to the shadow area, so as to achieve the effect of automatically putting on the body of the clothes.
Furthermore, the model to be attached closest to the target attachment object is set as the target model to be attached by default, so that the user operation is simplified, and the user experience is improved; by recording a reference coordinate of each clothing corresponding to the model and then drawing the shadow prompt area based on the reference coordinate in actual operation, the area positioning operation can be completed without pre-storing too much data on the system.
Further, a third embodiment of the object attaching method of the present invention is proposed based on the first embodiment shown in fig. 2 described above. In this embodiment, before step S30, the method further includes:
judging whether the target attachment object intersects with the attachment area;
the step of judging whether the target attachment object intersects with the attachment area comprises the following steps:
positioning a display area where the target attachment object is located in real time, and acquiring real-time vertex coordinates of the display area;
judging whether the display area is overlapped with the attachment area or not based on the attachment vertex coordinates of the attachment area and the real-time vertex coordinates;
if yes, judging that the target attachment object is intersected with the attachment area;
and if not, judging that the target attachment object is not intersected with the attachment area.
In this embodiment, after determining the target attachment object and the target model to be attached, the terminal needs to determine whether the target attachment object intersects with the corresponding attachment area. The specific determination method may be: the terminal locates a display area of the target attachment object in real time, the so-called display area, for example, when the target attachment object is a shirt, the edge contour of the shirt is usually not regular, and for the convenience of display and location, the software system locates the area where the shirt is located as a rectangular area (for example, the rectangular frame of the short coat shown in fig. 3), and the corresponding attachment area is usually a rectangular area with the same size. The terminal judges whether any coordinate in a display area where the shirt pattern is located falls into the attachment area or not in real time, if yes, the display area of the shirt is overlapped with the attachment area, and then the shirt pattern is judged to be intersected with the corresponding upper body attachment area; if not, the display area and the attachment area of the shirt are not overlapped, and then the shirt pattern and the corresponding upper attachment area of the shirt are judged not to be intersected.
Further, the display area and the attachment area are the same in size, and step S30 includes:
and when the target attachment object is detected to intersect with the attachment area, taking the real-time vertex coordinate as the actual positioning coordinate, and correspondingly changing the real-time vertex coordinate into the attachment vertex coordinate so as to attach the target attachment object to the corresponding position on the target model to be attached.
In the present embodiment, the display area where the target attachment object is located and the attachment area are the same in size so as to perform vertex coordinate replacement. When the terminal detects that the target attachment object intersects with the attachment area, the display area and the attachment area are consistent in size, so that the current coordinate of the display area can be directly changed into the vertex coordinate of the attachment area (usually rectangular), the target attachment object can be matched with the target model to be attached, and the automatic adsorption effect is achieved.
Further, when a plurality of attached objects are drawn on the target model to be attached, after step S30, the method further includes:
acquiring a focus coordinate clicked by a mouse;
according to the layer display sequence of the plurality of attached objects on the model to be attached with the target, matching the focus coordinates with the part coordinate groups corresponding to the plurality of attached objects one by one to determine the target attached object clicked by the mouse;
redrawing a plurality of the attached objects on the target model to be attached based on the target attached object so as to redraw and display the target attached object on the uppermost layer.
In this embodiment, an application scenario of the clothing matching software is taken as an example. A model corresponds to a plurality of clothes, and each clothes has a plurality of position coordinate groups. When overlapping requirements exist, a user needs to perform layer switching operation on multiple pieces of clothes. The terminal acquires the focus coordinate clicked by the mouse, and starts to match the focus coordinate from the part coordinate group of the uppermost clothing. And if the first clothing is not matched, starting the second clothing matching, progressing layer by layer, finally changing the sequence of the clothing matched with the focus coordinate in the clothing set of the model into the last clothing, refreshing the system for redrawing, and displaying the last clothing drawn on the uppermost layer, thereby achieving the effect of switching the upper layer and the lower layer.
As shown in fig. 5, if the user needs to switch the layers of the three pieces of clothes from top to bottom, the user can click on a non-overlapping position of the target clothes and the other two pieces of clothes, for example, the part of the short coat exposed at the cuff of the model pointed by the arrow in the figure, and the clicked effect diagram is shown in fig. 6, and the system redraws the short coat pattern on the uppermost layer, thereby achieving the effect of quickly switching the layers.
The embodiment further directly changes the position coordinates of the target clothing pattern after the judgment, so that the effect of automatic adsorption of the clothing on the upper body is achieved; through providing the mode that the layer was switched in the mouse click, if want to adjust the inlayer dress once more after having avoided current collocation to accomplish, need move outer dress earlier, treat after adjusting the inlayer dress, pull outer dress again or remove the mode to original position, reached the effect that many layers switched fast.
The invention also provides an object attaching device. As shown in fig. 7, the object attaching apparatus includes:
the target determining module 10 is configured to determine a target attachment object and a target model to be attached;
the area positioning module 20 is configured to position an attachment area, corresponding to the target attachment object, on the target model to be attached according to the target attachment object and the target model to be attached;
and the coordinate changing module 30 is configured to, when the target attachment object intersects with the attachment area, obtain actual positioning coordinates of the target attachment object, and change coordinate data of the actual positioning coordinates into coordinate data of attachment positioning coordinates, where the attachment positioning coordinates are positioning coordinates when the target attachment object is attached to the target model to be attached.
The invention also provides an object attaching device.
The object attaching device comprises a processor, a memory and an object attaching program stored on the memory and capable of running on the processor, wherein the object attaching program realizes the steps of the object attaching method when being executed by the processor.
The method implemented when the object attach program is executed may refer to each embodiment of the object attach method of the present invention, and is not described herein again.
The invention also provides a computer readable storage medium.
The computer-readable storage medium of the present invention has stored thereon an object attachment program which, when executed by a processor, implements the steps of the object attachment method as described above.
The method implemented when the object attachment program is executed may refer to each embodiment of the object attachment method of the present invention, and details thereof are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for causing an object attachment apparatus to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present invention or directly or indirectly applied to other related technical fields are also included in the scope of the present invention.

Claims (9)

1. An object attaching method, characterized in that the object attaching method comprises:
determining a target attachment object and a target model to be attached;
according to the target attachment object and the target model to be attached, positioning an attachment area of the target attachment object on the target model to be attached;
when the target attachment object intersects with the attachment area, acquiring actual positioning coordinates of the target attachment object, and changing coordinate data of the actual positioning coordinates into coordinate data of attachment positioning coordinates, wherein the attachment positioning coordinates are positioning coordinates when the target attachment object is attached to the target model to be attached;
acquiring a focus coordinate clicked by a mouse;
according to the layer display sequence of the plurality of attached objects on the model to be attached with the target, matching the focus coordinates with the part coordinate groups corresponding to the plurality of attached objects one by one to determine the target attached object clicked by the mouse;
redrawing a plurality of the attached objects on the target to-be-attached model based on the target attached object so as to redraw and display the target attached object on the uppermost layer.
2. The object attachment method according to claim 1, wherein the step of determining the target attachment object and the target to-be-attached model when there are a plurality of attachment objects and a plurality of to-be-attached models comprises:
upon receiving a target selection instruction, determining the target attachment object from the plurality of attachment objects based on the target selection instruction;
judging whether a model selection instruction sent by a user is received;
and if so, determining a model to be attached selected by a user from the plurality of models to be attached as the target model to be attached based on the model selection instruction.
3. The object attaching method according to claim 2, wherein after the step of determining whether a model selection instruction issued by a user is received, further comprising:
and if not, selecting the model to be attached closest to the target attachment object from the plurality of models to be attached as the target model to be attached.
4. The object attachment method of claim 2 or 3, wherein the attached object comprises clothing, the model to be attached comprises a mannequin,
before the step of determining the target attachment object and the target to-be-attached model, the method further includes:
acquiring a plurality of first modeling data sets of the clothes and a plurality of second modeling data sets of the human body models;
according to the first modeling data set and the second modeling data set, each piece of clothes is positioned to a corresponding part of each human body model, reference coordinates of each piece of clothes on the corresponding part are recorded, and the attachment area is determined based on the reference coordinates;
the target attachment object comprises a target garment, the target model to be attached comprises a target mannequin, and the step of positioning the attachment area of the target attachment object corresponding to the target model to be attached according to the target attachment object and the target model to be attached comprises the following steps of:
acquiring specification data of the target clothes and target reference coordinates of the target clothes corresponding to the target mannequin;
and drawing a shadow prompting area on the target human body model based on the specification data and the target reference coordinate to be used as the attachment area.
5. The object attaching method according to claim 1, wherein before the step of acquiring actual positioning coordinates of the target attached object and changing coordinate data of the actual positioning coordinates to coordinate data of attached positioning coordinates when the target attached object intersects the attachment area, further comprising:
judging whether the target attachment object intersects with the attachment area;
the step of judging whether the target attachment object intersects with the attachment area comprises:
positioning a display area where the target attachment object is located in real time, and acquiring real-time vertex coordinates of the display area;
judging whether the display area is overlapped with the attachment area or not based on the attachment vertex coordinates of the attachment area and the real-time vertex coordinates;
if yes, judging that the target attachment object is intersected with the attachment area;
and if not, judging that the target attachment object is not intersected with the attachment area.
6. The object attaching method according to claim 5, wherein the display area is the same size as the attaching area,
when the target attachment object intersects with the attachment area, the step of acquiring the actual positioning coordinate of the target attachment object and changing the coordinate data of the actual positioning coordinate into the coordinate data of the attachment positioning coordinate comprises:
and when the target attachment object is detected to be intersected with the attachment area, taking the real-time vertex coordinate as the actual positioning coordinate, and correspondingly changing the coordinate data of the real-time vertex coordinate into the coordinate data of the attachment vertex coordinate so as to attach the target attachment object to the corresponding position on the target model to be attached.
7. An object attaching apparatus, characterized by comprising:
the target determining module is used for determining a target attachment object and a target model to be attached;
the area positioning module is used for positioning an attachment area of the target attachment object on the target model to be attached according to the target attachment object and the target model to be attached;
the coordinate changing module is used for acquiring actual positioning coordinates of the target attachment object when the target attachment object intersects with the attachment area, and changing coordinate data of the actual positioning coordinates into coordinate data of attachment positioning coordinates, wherein the attachment positioning coordinates are positioning coordinates of the target attachment object when the target attachment object is attached to the target model to be attached;
the coordinate acquisition module is used for acquiring a focus coordinate clicked by a mouse;
the coordinate matching module is used for matching the focus coordinate with the position coordinate groups corresponding to the multiple attached objects one by one according to the layer display sequence of the multiple attached objects on the target model to be attached so as to determine the target attached objects clicked by the mouse;
and the drawing module is used for redrawing the plurality of attached objects on the target to-be-attached model based on the target attached object so as to redraw and display the target attached object on the uppermost layer.
8. An object attaching apparatus, characterized by comprising: memory, a processor and an object attachment program stored on the memory and executable on the processor, the object attachment program, when executed by the processor, implementing the steps of the method of any one of claims 1 to 6.
9. A computer-readable storage medium, having an object attachment program stored thereon, which when executed by a processor, performs the steps of the method of any one of claims 1 to 6.
CN202110380188.7A 2021-04-08 2021-04-08 Object attachment method, device, equipment and computer readable storage medium Active CN113065176B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110380188.7A CN113065176B (en) 2021-04-08 2021-04-08 Object attachment method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110380188.7A CN113065176B (en) 2021-04-08 2021-04-08 Object attachment method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113065176A CN113065176A (en) 2021-07-02
CN113065176B true CN113065176B (en) 2023-02-28

Family

ID=76566535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110380188.7A Active CN113065176B (en) 2021-04-08 2021-04-08 Object attachment method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113065176B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6144388A (en) * 1998-03-06 2000-11-07 Bornstein; Raanan Process for displaying articles of clothing on an image of a person
CN103366401A (en) * 2013-08-05 2013-10-23 上海趣搭网络科技有限公司 Quick display method for multi-level virtual clothes fitting
CN105096246A (en) * 2014-05-08 2015-11-25 腾讯科技(深圳)有限公司 Image synthesis method and system
WO2016153200A2 (en) * 2015-03-25 2016-09-29 주식회사 인터파크 Virtual fitting method and computer program
CN109753641A (en) * 2017-11-01 2019-05-14 珠海金山办公软件有限公司 A kind of method, apparatus, electronic equipment and storage medium for changing object's position

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669611A (en) * 2018-11-29 2019-04-23 维沃移动通信有限公司 Fitting method and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6144388A (en) * 1998-03-06 2000-11-07 Bornstein; Raanan Process for displaying articles of clothing on an image of a person
CN103366401A (en) * 2013-08-05 2013-10-23 上海趣搭网络科技有限公司 Quick display method for multi-level virtual clothes fitting
CN105096246A (en) * 2014-05-08 2015-11-25 腾讯科技(深圳)有限公司 Image synthesis method and system
WO2016153200A2 (en) * 2015-03-25 2016-09-29 주식회사 인터파크 Virtual fitting method and computer program
CN109753641A (en) * 2017-11-01 2019-05-14 珠海金山办公软件有限公司 A kind of method, apparatus, electronic equipment and storage medium for changing object's position

Also Published As

Publication number Publication date
CN113065176A (en) 2021-07-02

Similar Documents

Publication Publication Date Title
CN110456907A (en) Control method, device, terminal device and the storage medium of virtual screen
US20140118396A1 (en) Image processing device, image processing method, and computer program product
CN103793178B (en) Vector graph editing method of touch screen of mobile device
CN110377053B (en) Flight control method and device of unmanned aerial vehicle
CN109572239B (en) Printing method and system of nail beautifying device, nail beautifying equipment and medium
US11410355B2 (en) Method and apparatus for creating digital clothing
CN111383345B (en) Virtual content display method and device, terminal equipment and storage medium
CN106775600A (en) The processing method and processing device of HTML5 canvas painting canvas
CN106131630A (en) Web page browsing control method based on television set and relevant apparatus
KR20140078853A (en) Augmented reality system and control method thereof
CN101349956A (en) Method and apparatus for executing pattern touch order
WO2018042948A1 (en) Information processing system, method of information processing, and program
JP2014186392A (en) Image processing device and program
CN113065176B (en) Object attachment method, device, equipment and computer readable storage medium
CN110619630A (en) Mobile equipment visual test system and test method based on robot
US10073612B1 (en) Fixed cursor input interface for a computer aided design application executing on a touch screen device
CN113297641A (en) Stamp processing method, content element processing method, device, equipment and medium
CN112180841B (en) Man-machine interaction method, device, equipment and storage medium
WO2021208432A1 (en) Interaction method and apparatus, interaction system, electronic device, and storage medium
CN111282264B (en) Virtual object control method and device
CN106354356A (en) Method and terminal for managing application icon
JP2014002678A (en) Object display method, program, and device
CN111589151A (en) Method, device, equipment and storage medium for realizing interactive function
CN102640099A (en) Object processing device and object selection method
CN105302466B (en) A kind of text operation method and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant