CN113362443A - Embroidery effect picture generation method and device, storage medium and electronic equipment - Google Patents

Embroidery effect picture generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113362443A
CN113362443A CN202110736101.5A CN202110736101A CN113362443A CN 113362443 A CN113362443 A CN 113362443A CN 202110736101 A CN202110736101 A CN 202110736101A CN 113362443 A CN113362443 A CN 113362443A
Authority
CN
China
Prior art keywords
embroidery
color
target file
needle path
map
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.)
Granted
Application number
CN202110736101.5A
Other languages
Chinese (zh)
Other versions
CN113362443B (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.)
Zhuhai Necessary Industrial Technology Co ltd
Original Assignee
Zhuhai Necessary Industrial 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 Zhuhai Necessary Industrial Technology Co ltd filed Critical Zhuhai Necessary Industrial Technology Co ltd
Priority to CN202110736101.5A priority Critical patent/CN113362443B/en
Publication of CN113362443A publication Critical patent/CN113362443A/en
Application granted granted Critical
Publication of CN113362443B publication Critical patent/CN113362443B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0641Shopping interfaces
    • G06Q30/0643Graphical representation of items or shoppers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Sewing Machines And Sewing (AREA)

Abstract

The application relates to a method and a device for generating an embroidery effect picture, a storage medium and electronic equipment, wherein the method comprises the following steps: acquiring a color-dependent map, wherein embroidery patterns are stored in the color-dependent map; generating a target file according to the color map, wherein the target file is recorded with an embroidery needle path and an embroidery pattern; extracting needle path information of an embroidery needle path from a target file, wherein the needle path information comprises position information and attribute information of the embroidery needle path; and rendering the embroidery effect of the target file according to the needle path information to obtain a rendered embroidery effect picture. The method and the device solve the technical problems that the embroidery effect picture in the related technology lacks reality and has a large difference with the actual effect.

Description

Embroidery effect picture generation method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of embroidery technologies, and in particular, to a method and an apparatus for generating an embroidery effect map, a storage medium, and an electronic device.
Background
The rapid development of the network economy provides favorable conditions for 'customized life', a manufacturer only needs to provide an effect picture of a commodity for a consumer on the network, and the consumer confirms that a customized commodity can be put into production. Currently, in the process of customizing an embroidery process for a consumer, a factory designer directly converts an embroidery file into a picture and prints out a sample, and mails the sample to a user so that the user can confirm the embroidery effect. However, the embroidery effect graph displayed in this way cannot accurately transmit embroidery stitch information, lacks sense of reality, and has a large difference from the actual embroidery effect.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The application provides a method and a device for generating an embroidery effect picture, a storage medium and electronic equipment, which are used for at least solving the technical problem that the embroidery effect picture generated in the related technology has a large difference with the actual effect.
According to an aspect of an embodiment of the present application, there is provided a method for generating an embroidery effect map, including: acquiring a color-dependent map, wherein embroidery patterns are stored in the color-dependent map; generating a target file according to the color map, wherein the target file is recorded with an embroidery needle path and an embroidery pattern; extracting needle path information of an embroidery needle path from a target file, wherein the needle path information comprises position information and attribute information of the embroidery needle path; and rendering the embroidery effect of the target file according to the needle path information to obtain a rendered embroidery effect picture.
Optionally, obtaining a color map comprises: acquiring a material image and configuration parameters of the embroidery machine, wherein the configuration parameters of the embroidery machine comprise a color set stored in a color library and the maximum needle number of the embroidery machine; and carrying out color matching processing on the material image to obtain a color matching map, wherein each color in the color matching map belongs to a color set, and the number of the colors in the color matching map is not more than the maximum number of needles.
Optionally, generating the object file according to the color map includes: configuring an embroidery needle path for the color map by embroidery software to obtain an embroidery file in a DST format; and converting the embroidery file in the DST format into a target file in the SVG format.
Optionally, the extracting needle path information of the embroidery needle path from the target file includes: extracting coordinates of each point on each embroidery needle path from the target file, wherein the position information comprises the coordinates of each point on the embroidery needle path; and extracting the color and the width of each embroidery stitch from the target file, wherein the attribute information comprises the color and the width of each embroidery stitch.
Optionally, rendering an embroidery effect on the target file according to the needle path information to obtain a rendered embroidery effect map, including: sending the target file to a rendering server, wherein the rendering server is used for rendering an embroidery effect for the target file according to the needle path information; and receiving an embroidery effect graph output after the rendering server renders the target file.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for generating an embroidery effect map, including: the generating module is used for generating a target file according to the color map, wherein the target file is recorded with embroidery needle paths and embroidery patterns; the extraction module is used for extracting needle path information of the embroidery needle path from the target file, wherein the needle path information comprises position information and attribute information of the embroidery needle path; and the rendering module is used for rendering the embroidery effect on the target file according to the needle path information to obtain a rendered embroidery effect picture.
Optionally, the obtaining module includes: the acquiring unit is used for acquiring the material image and the configuration parameters of the embroidery machine, wherein the configuration parameters of the embroidery machine comprise a color set stored in the color library and the maximum needle number of the embroidery machine; and the processing unit is used for carrying out color matching processing on the material image to obtain a color matching map, wherein each color in the color matching map belongs to a color set, and the number of the colors in the color matching map is not more than the maximum number of the needles.
Optionally, the generating module includes: the configuration unit is used for configuring an embroidery needle path for the color map by utilizing embroidery software to obtain an embroidery file in a DST format; and the conversion unit is used for converting the embroidery file in the DST format into a target file in the SVG format.
Optionally, the extraction module comprises: the position extracting unit is used for extracting the coordinates of each point on each embroidery needle path from the target file, wherein the position information comprises the coordinates of each point on the embroidery needle path; and the attribute extraction unit is used for extracting the color and the width of each embroidery needle path from the target file, wherein the attribute information comprises the color and the width of the embroidery needle path.
Optionally, the rendering module comprises: the system comprises a sending unit, a rendering server and a processing unit, wherein the sending unit is used for sending a target file to the rendering server, and the rendering server is used for rendering an embroidery effect for the target file according to needle path information; and the receiving unit is used for receiving the embroidery effect graph output after the rendering server renders the target file.
According to another aspect of the embodiments of the present application, there is also provided an embroidery effect map generating apparatus applied in the C2M mode, the embroidery effect map generating apparatus including an embroidery effect map generating device of one kind described above.
According to another aspect of the embodiment of the present application, there is also provided a user client applied in the C2M mode, wherein the user client includes a generation device of an embroidery effect map.
According to another aspect of the embodiment of the application, an e-commerce platform background server applied in the C2M mode is further provided, and the e-commerce platform background server includes a generation device of the embroidery effect map.
According to another aspect of embodiments of the present application, there is also provided a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement a method of generating an embroidery effect map as described above.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including: one or more processors; storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating the embroidery effect map.
In the embodiment of the application, by adopting the mode of acquiring the color map, generating the target file according to the color map, extracting the needle path information of the embroidery needle path from the target file, rendering the embroidery effect of the target file according to the needle path information to obtain the rendered embroidery effect map, and extracting and rendering the embroidery needle path of the target file, the purpose of generating the embroidery effect map containing the actual effect of the embroidery needle path is achieved, so that the technical effect of improving the sense of reality of the embroidery effect map is realized, and the technical problem that the embroidery effect map has a large difference from the actual effect in the related technology is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a diagram illustrating a hardware environment of a method for generating an embroidery effect map according to an embodiment of the application;
FIG. 2 is a flow chart of a method for generating an embroidery effect map according to an embodiment of the application;
FIG. 3 is a schematic illustration of an embroidery effect map according to an embodiment of the application;
FIG. 4 is a schematic diagram of an embroidery effect map generation apparatus according to an embodiment of the application; and the number of the first and second groups,
fig. 5 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of embodiments of the present application, a method embodiment of a method for generating an embroidery effect map is provided.
Alternatively, in the present embodiment, the generation method of the embroidery effect map described above may be applied to a hardware environment constituted by the terminal 101 and the server 103 as shown in fig. 1. As shown in fig. 1, the server 103 is connected to the terminal 101 through a network, and may be configured to provide a generation service of an embroidery effect map for the terminal or a client installed on the terminal, and may be configured with a database on the server or separately from the server, and may be configured to provide a data storage service for the server 103, where the network includes, but is not limited to: a wide area network, metropolitan area network, or local area network; the terminal 101 may be any electronic product capable of performing human-computer interaction with a user through a keyboard, a touch pad, a touch screen, a remote controller, voice interaction or a handwriting device, for example, a PC, a mobile phone, a smart phone, a PDA, a wearable device, a handheld computer PPC, a wearable device, a tablet computer, and the like.
The method for generating the embroidery effect map according to the embodiment of the application may be executed by the server 103, the terminal 101, or both the server 103 and the terminal 101. The terminal 101 executing the method for generating the embroidery effect map according to the embodiment of the present application may be executed by a client installed thereon. In a specific embodiment, the client installed on the terminal 101 may be an e-commerce platform user client capable of implementing customization and ordering of commodity embroidery; accordingly, server 103 may be an e-commerce platform backend server corresponding to an e-commerce platform user client. In particular embodiments, server 103 includes, but is not limited to, implementations such as a network host, a single network server, a collection of network servers, or a cloud-computing-based computer collection. Here, the Cloud is made up of a large number of hosts or web servers based on Cloud Computing (Cloud Computing), which is a type of distributed Computing, a super virtual computer consisting of a collection of loosely coupled computers.
Here, the server and the terminal each include an electronic device capable of automatically performing numerical calculation and information processing according to a preset or stored instruction, and hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a programmable gate array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
Here, a method of generating an embroidery effect map according to an embodiment of the present application will be described below as an example.
Fig. 2 is a flowchart of a method for generating an embroidery effect map according to an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:
step S202, the terminal acquires a color map, wherein embroidery patterns are stored in the color map.
The color map is an image obtained by processing an embroidery material image uploaded by a user at a terminal according to production conditions of an embroidery factory. All colors in the color chart can find embroidery threads with corresponding colors in an embroidery factory; the color chart contains no more colors than the maximum needle number of the embroidery machine.
And step S204, the terminal sends the color map to a server, and the server generates a target file according to the color map, wherein the target file records embroidery needle paths and embroidery patterns.
The target file is a file which contains embroidery stitches and embroidery patterns and can extract stitch information from the embroidery stitches, and the target file can be a file in an SVG format, wherein the file in the SVG format describes two-dimensional vector graphics in extensible markup language (XML), and the embroidery patterns and the embroidery paths are recorded in the target file in the XML.
Step S206, the server extracts needle path information of the embroidery needle path from the target file, wherein the needle path information comprises position information and attribute information of the embroidery needle path.
The needle path information refers to the position and the attribute of each embroidery needle path, the position information refers to the coordinates of a starting point, an end point and each connection point on each embroidery needle path, the attribute information comprises the color and the thickness of the embroidery needle path, and the thickness of the embroidery needle path is represented as the width of the embroidery needle path in a target file.
And S208, rendering the embroidery effect of the target file by the server according to the needle path information to obtain a rendered embroidery effect picture.
The embroidery effect refers to a visual effect actually presented by an embroidery needle path after a customized embroidery commodity is produced by an embroidery factory, for example, the visual effect is light and shade, color, roughness, metal texture, anisotropic material and the like, and after the server obtains an embroidery effect picture, the server can send the embroidery effect picture to the terminal so that a user can confirm the embroidery effect.
Through the steps S202 to S208, the embroidery effect graph including the actual effect of the embroidery needle path is generated by extracting and rendering the embroidery needle path of the target file, so that the technical effect of improving the reality of the embroidery effect graph is achieved, and the technical problem that the embroidery effect graph has a large difference from the actual effect in the related art is solved.
In the technical solution provided in step S202, the terminal obtains a color map, wherein the embroidery pattern is stored in the color map.
As an alternative example, since the colors included in the embroidery patterns customized by the user are often not completely consistent with the colors of the embroidery threads of the factory or exceed the number of colors that the needle of the embroidery machine can configure, in order to make the embroidery threads in the embroidery effect map represent the colors of the embroidery threads actually used by the factory, the terminal needs to acquire a color-dependent map, which includes: the method comprises the steps that a terminal obtains a material image and configuration parameters of an embroidery machine, wherein the material image is an embroidery image which is uploaded by a user through a user client of an e-commerce platform and used for customizing a commodity, the configuration parameters of the embroidery machine are configured by a factory through the user client of a merchant and are sent to the terminal through a server, and the configuration parameters of the embroidery machine comprise a color set stored in a color library and the maximum number of needles of the embroidery machine; and the terminal performs color matching processing on the material image to obtain a color matching map, wherein each color in the color matching map belongs to a color set, and the number of the colors in the color matching map is not more than the maximum number of the needles.
In the technical solution provided in step S204, the terminal sends the color map to the server, and the server generates a target file according to the color map, wherein the target file records the embroidery needle path and the embroidery pattern.
As an alternative embodiment, the server generates the target file according to the color map, including: the embroidery software is used for configuring embroidery needle paths by means of color charts to obtain embroidery files in a DST format, the DST is a file suffix used by computer embroidery software, in order to execute subsequent operations more conveniently and quickly, the server converts the embroidery files in the DST format into an SVG (Scalable Vector Graphics) format, the files in the SVG format are stored in the server as target files, the SVG is an image file format and strictly speaking is an open standard Vector Graphics language, the SVG can be directly used for drawing images by using codes, the SVG files can be opened by using any character processing tool, and the images have an interactive function by changing part of the codes.
Optionally, in this embodiment, in order to convert the embroidery file in the DST format into a target file in the SVG format, an image reading function in the Python embroidery function library is used to read image information including an embroidery pattern and an embroidery stitch in the embroidery file, and then an SVG file writing function is used to write the image information into a file in the SVG format, so as to obtain the embroidery file.
As an alternative embodiment, the server generates the target file according to the color map, including: the server directly generates an embroidery stitch for the color chart according to the embroidery pattern to obtain a target file in an SVG format.
In the technical solution provided in step S206, in order to embody a real and accurate embroidery stitch in the embroidery effect map, the server extracts stitch information of the embroidery stitch from the target file, where the stitch information includes position information and attribute information of the embroidery stitch.
As an alternative embodiment, the server extracts needle path information of the embroidery needle path from the target file, including: extracting coordinates of each point on each embroidery needle path from the target file, wherein the position information comprises the coordinates of each point on the embroidery needle path; and extracting the color and the width of each embroidery stitch from the target file, wherein the attribute information comprises the color and the width of each embroidery stitch.
For example, reading the path tag in the target file in the SVG format: < path d ═ M0, 0-45,290, -5-45,230, -11-45,170, -16-45,120, -21-45, 60, -27-45, 00, -32-45, -60, -37-45, -120, -43-45, -170, -48-45, -230, -53-45, -290, -58-45 … … (here ignoring part of the connection points) -47, -40514, -391-48, -41117, -394-48, -41620, -396-48, -42223, -398-48, -42726, -400-48, -43329, -403-49, -438 "file" string ═ 3 "/>" #0b2d4f "string-width ═ 3".
path d is a label for defining path data, M represents the starting position of the embroidery needle path, and the numbers after M represent the coordinates of the points on the embroidery needle path, such as "0,0-45,29" represents two points with coordinates of (0,0), (-45, 29); "click" is the color label of the embroidery needle path, #0b2d4f, "and #0b2d4f is one of hexadecimal color codes, so that the color of the embroidery needle path is #0b2d4 f; the stroke-width is "3" which is a width label of the embroidery needle path, and thus the width of the embroidery needle path is 3 pixel units.
In the technical solution provided in step S208, the server renders the embroidery effect on the target file according to the needle path information, and obtains a rendered embroidery effect map.
As an optional embodiment, the rendering of the embroidery effect on the target file by the server according to the needle path information to obtain a rendered embroidery effect map includes: the server sends the target file to a rendering server, wherein the rendering server is used for rendering the embroidery effect for the target file according to the needle path information; and the server receives the embroidery effect graph output after the rendering server renders the target file.
Optionally, in this embodiment, in order to present the embroidery thread effect actually used by the factory in the embroidery effect map, the rendering server searches the rendering parameter for identifying the target embroidery thread from the rendering database according to the color and the width of the embroidery needle path, where the color of the target embroidery thread matches the color of the embroidery needle path and the width of the target embroidery thread matches the width of the embroidery needle path. And the rendering server renders each embroidery needle path in the target file according to the position information of the embroidery needle path by using the rendering parameters, and outputs a rendered embroidery effect picture. The position information of the embroidery needle path positions an area to be rendered in the target file, and the rendering parameters determine the visual effect after the embroidery needle path is rendered.
For example, if the width of the embroidery needle path is large, the matched target embroidery thread is a thick thread, and in the embroidery thread actually used in a factory, the thick thread is formed by twisting a plurality of thin threads into a strand, the thick thread will actually exhibit a rougher effect compared with the thin threads, and the rendered embroidery needle path will also exhibit a larger roughness.
The above examples are for illustrative purposes, the rendering parameters in the actual rendering process are more, and the embroidery effect that can be rendered includes shading, color, roughness, metal texture, anisotropic material, and the like. For example, after rendering an embroidery path for a tiger head pattern, the obtained embroidery effect graph is shown in fig. 3.
Optionally, in this embodiment, the rendering of the target file in the SVG format by the rendering server is completed by editing a code, when the rendering operation is terminated, the obtained embroidery effect image in the SVG format is obtained, and after the server obtains the embroidery effect image, the server can directly convert the embroidery effect image in the SVG format into a picture in a general format such as JPG, GIF, and the like and send the picture to the terminal for the user who customizes the embroidery pattern to view.
Optionally, in this embodiment, if the server has a rendering function, the server directly performs rendering of the embroidery effect on the target file according to the needle path information without sending the target file to the rendering server, so as to obtain the embroidery effect map.
According to the scheme, the color of the embroidery needle path in the target file can be consistent with the color of the embroidery thread used in actual production by acquiring the color-dependent map, the needle path information of the embroidery needle path is extracted from the target file, and the embroidery effect of the target file is rendered according to the needle path information, so that the rendered embroidery effect map can present more accurate needle path information and more real visual effect, the technical effect of improving the sense of reality of the embroidery effect map is realized, and the problems that the embroidery effect map cannot accurately transfer the embroidery needle path information, lacks the sense of reality and has a larger difference with the actual embroidery effect in the related technology are solved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application 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) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, there is also provided an embroidery effect map generation apparatus for implementing the embroidery effect map generation method. Fig. 4 is a schematic diagram of an apparatus for generating an embroidery effect map according to an embodiment of the present application, and as shown in fig. 4, the apparatus may include an obtaining module 42, a generating module 44, an extracting module 46, and a rendering module 48:
an obtaining module 42, configured to obtain a color map, where an embroidery pattern is stored in the color map;
the generating module 44 is configured to generate a target file according to the color map, where the target file has an embroidery stitch and an embroidery pattern recorded therein;
an extracting module 46, configured to extract needle path information of an embroidery needle path from a target file, where the needle path information includes position information and attribute information of the embroidery needle path;
and the rendering module 48 is configured to perform rendering of an embroidery effect on the target file according to the needle path information to obtain a rendered embroidery effect map.
It should be noted that the obtaining module 42 in this embodiment may be configured to execute step S202 in this embodiment, the generating module 44 in this embodiment may be configured to execute step S204 in this embodiment, the extracting module 46 in this embodiment may be configured to execute step S206 in this embodiment, and the rendering module 48 in this embodiment may be configured to execute step S208 in this embodiment.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Through the module, the technical effect of improving the sense of reality of the embroidery effect picture can be realized, and the technical problem that the embroidery effect picture has a large difference with the actual effect in the related technology is solved.
As an alternative embodiment, the obtaining module 42 includes an obtaining unit, a processing unit: the acquiring unit is used for acquiring the material image and the configuration parameters of the embroidery machine, wherein the configuration parameters of the embroidery machine comprise a color set stored in the color library and the maximum needle number of the embroidery machine; and the processing unit is used for carrying out color matching processing on the material image to obtain a color matching map, wherein each color in the color matching map belongs to a color set, and the number of the colors in the color matching map is not more than the maximum number of the needles.
As an alternative embodiment, the generating module 44 includes a configuration unit, a conversion unit: the configuration unit is used for configuring an embroidery needle path for the color map by utilizing embroidery software to obtain an embroidery file in a DST format; and the conversion unit is used for converting the embroidery file in the DST format into a target file in the SVG format.
As an alternative embodiment, the extraction module 46 includes a location extraction unit, an attribute extraction unit: the position extracting unit is used for extracting the coordinates of each point on each embroidery needle path from the target file, wherein the position information comprises the coordinates of each point on the embroidery needle path; and the attribute extraction unit is used for extracting the color and the width of each embroidery needle path from the target file, wherein the attribute information comprises the color and the width of the embroidery needle path.
As an alternative embodiment, the rendering module 48 includes a sending unit, a receiving unit: the system comprises a sending unit, a rendering server and a processing unit, wherein the sending unit is used for sending a target file to the rendering server, and the rendering server is used for rendering an embroidery effect for the target file according to needle path information; and the receiving unit is used for receiving the embroidery effect graph output after the rendering server renders the target file.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiment of the present application, there is also provided a server or a terminal for implementing the embroidery effect map generation method.
Fig. 5 is a block diagram of a terminal according to an embodiment of the present application, and as shown in fig. 5, the terminal may include: one or more processors 501 (only one of which is shown in fig. 5), a memory 503, and a transmission means 505. as shown in fig. 5, the terminal may further include an input-output device 507.
The memory 503 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for generating an embroidery effect map in the embodiment of the present application, and the processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 503, that is, the method for generating an embroidery effect map is implemented. The memory 503 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 503 may further include memory located remotely from the processor 501, which may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 505 is used for receiving or sending data via a network, and may also be used for data transmission between the processor and the memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 505 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 505 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among them, the memory 503 is used to store an application program in particular.
The processor 501 may call the application stored in the memory 503 through the transmission means 505 to perform the following steps: acquiring a color-dependent map, wherein embroidery patterns are stored in the color-dependent map; generating a target file according to the color map, wherein the target file is recorded with an embroidery needle path and an embroidery pattern; extracting needle path information of an embroidery needle path from a target file, wherein the needle path information comprises position information and attribute information of the embroidery needle path; and rendering the embroidery effect of the target file according to the needle path information to obtain a rendered embroidery effect picture.
By adopting the embodiment of the application, a generation scheme of the embroidery effect picture is provided. By extracting and rendering the embroidery needle path of the target file, the purpose of generating the embroidery effect graph containing the actual effect of the embroidery needle path is achieved, so that the technical effect of improving the sense of reality of the embroidery effect graph is achieved, and the technical problem that the embroidery effect graph has a large difference from the actual effect in the related technology is solved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The embodiment of the application also provides an embroidery effect map generating device applied to the C2M mode. The embroidery effect map generating device applied to the C2M mode comprises the embroidery effect map generating device.
The embodiment of the application also provides a user client applied to the C2M mode. The user client applied to the C2M mode comprises the generation device of the embroidery effect picture.
The embodiment of the application also provides an E-commerce platform background server applied to the C2M mode. The E-commerce platform background server applied to the C2M mode comprises the generation device of the embroidery effect picture.
Embodiments of the present application also provide a computer-readable storage medium. Alternatively, in the present embodiment, the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the method for generating an embroidery effect map, and may be used to execute program codes of the method for generating an embroidery effect map.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: acquiring a color-dependent map, wherein embroidery patterns are stored in the color-dependent map; generating a target file according to the color map, wherein the target file is recorded with an embroidery needle path and an embroidery pattern; extracting needle path information of an embroidery needle path from a target file, wherein the needle path information comprises position information and attribute information of the embroidery needle path; and rendering the embroidery effect of the target file according to the needle path information to obtain a rendered embroidery effect picture.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (15)

1. A generation method of an embroidery effect picture is characterized by comprising the following steps:
acquiring a color-depending map, wherein embroidery patterns are stored in the color-depending map;
generating a target file according to the color-leaning chart, wherein an embroidery needle path and the embroidery pattern are recorded in the target file;
extracting needle path information of the embroidery needle path from the target file, wherein the needle path information comprises position information and attribute information of the embroidery needle path;
and rendering the embroidery effect of the target file according to the needle path information to obtain a rendered embroidery effect picture.
2. The method of claim 1, wherein obtaining a color map comprises:
acquiring a material image and configuration parameters of an embroidery machine, wherein the configuration parameters of the embroidery machine comprise a color set stored in a color library and the maximum needle number of the embroidery machine;
and carrying out color matching processing on the material image to obtain the color matching map, wherein each color in the color matching map belongs to the color set, and the number of the colors in the color matching map is not more than the maximum number of the needles.
3. The method of claim 1 or 2, wherein generating the object file from the color map comprises:
configuring the embroidery stitch for the color-dependent graph by embroidery software to obtain an embroidery file in a DST format;
and converting the embroidery file in the DST format into the target file in the SVG format.
4. The method according to claim 1 or 2, wherein extracting the needle path information of the embroidery needle path from the target file comprises:
extracting coordinates of each point on each embroidery needle path from the target file, wherein the position information comprises the coordinates of each point on the embroidery needle path;
and extracting the color and the width of each embroidery stitch from the target file, wherein the attribute information comprises the color and the width of each embroidery stitch.
5. The method according to claim 1 or 2, wherein rendering the embroidery effect on the target file according to the needle path information to obtain a rendered embroidery effect map comprises:
sending the target file to a rendering server, wherein the rendering server is used for rendering the embroidery effect for the target file according to the needle path information;
and receiving the embroidery effect graph output by the rendering server after the rendering of the target file.
6. An apparatus for generating an embroidery effect map, the apparatus comprising:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a color map, and embroidery patterns are stored in the color map;
the generating module is used for generating a target file according to the color-leaning chart, wherein an embroidery needle path and the embroidery pattern are recorded in the target file;
an extracting module, configured to extract needle path information of the embroidery needle path from the target file, where the needle path information includes position information and attribute information of the embroidery needle path;
and the rendering module is used for rendering the embroidery effect on the target file according to the needle path information to obtain a rendered embroidery effect picture.
7. The apparatus of claim 6, wherein the obtaining module comprises:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a material image and configuration parameters of the embroidery machine, and the configuration parameters of the embroidery machine comprise a color set stored in a color library and the maximum needle number of the embroidery machine;
and the processing unit is used for carrying out color matching processing on the material image to obtain the color matching map, wherein each color in the color matching map belongs to the color set, and the number of the colors in the color matching map is not more than the maximum number of the needles.
8. The apparatus of claim 6 or 7, wherein the generating module comprises:
the configuration unit is used for configuring the embroidery needle path for the color-dependent graph by utilizing embroidery software to obtain an embroidery file in a DST format;
and the conversion unit is used for converting the embroidery file in the DST format into the target file in the SVG format.
9. The apparatus of claim 6 or 7, wherein the extraction module comprises:
a position extracting unit, configured to extract coordinates of each point on the embroidery stitch path from the target file, where the position information includes the coordinates of each point on the embroidery stitch path;
and the attribute extraction unit is used for extracting the color and the width of each embroidery needle path from the target file, wherein the attribute information comprises the color and the width of the embroidery needle path.
10. The apparatus of claim 6 or 7, wherein the rendering module comprises:
the sending unit is used for sending the target file to a rendering server, wherein the rendering server is used for rendering the embroidery effect for the target file according to the needle path information;
and the receiving unit is used for receiving the embroidery effect graph output by the rendering server after the rendering of the target file.
11. An embroidery effect map generating device applied in C2M mode, characterized in that the embroidery effect map generating device comprises the apparatus of any one of claims 6-10.
12. A user client for use in C2M mode, the user client comprising the apparatus of any one of claims 6-10.
13. An e-commerce platform background server for use in C2M mode, wherein the e-commerce platform server comprises the apparatus of any one of claims 6 to 10.
14. A computer-readable storage medium, characterized in that the storage medium stores one or more programs which are executable by one or more processors to implement the method of any one of claims 1-5.
15. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
CN202110736101.5A 2021-06-30 2021-06-30 Embroidery effect picture generation method and device, storage medium and electronic equipment Active CN113362443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110736101.5A CN113362443B (en) 2021-06-30 2021-06-30 Embroidery effect picture generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110736101.5A CN113362443B (en) 2021-06-30 2021-06-30 Embroidery effect picture generation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113362443A true CN113362443A (en) 2021-09-07
CN113362443B CN113362443B (en) 2022-11-18

Family

ID=77537380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110736101.5A Active CN113362443B (en) 2021-06-30 2021-06-30 Embroidery effect picture generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113362443B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114892352A (en) * 2022-06-13 2022-08-12 北京仙人指文化艺术发展有限责任公司 Pattern wiring method, device, electronic apparatus, and computer-readable medium
WO2024198099A1 (en) * 2023-03-27 2024-10-03 浙江大豪科技有限公司 Loose sequin pattern drawing method and apparatus, device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1401844A (en) * 2002-04-09 2003-03-12 深圳市盈宁科技有限公司 Method for making embroidery product by computer design
CN103180880A (en) * 2010-10-25 2013-06-26 威仕达品特技术有限公司 Embroidery image rendering using parametric texture mapping
CN107012601A (en) * 2017-03-15 2017-08-04 苏州大学 A kind of high-resolution machine embroidery method
CN108170907A (en) * 2017-12-12 2018-06-15 南京大学 A kind of process type computer-aided crewel embroidery production method
CN109308380A (en) * 2018-08-24 2019-02-05 云南大学 Embroidery art style analogy method based on feeling of unreality
CN110512372A (en) * 2019-08-22 2019-11-29 厦门盈趣科技股份有限公司 Embroidery machine embroidery control method, system, embroidery machine and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1401844A (en) * 2002-04-09 2003-03-12 深圳市盈宁科技有限公司 Method for making embroidery product by computer design
CN103180880A (en) * 2010-10-25 2013-06-26 威仕达品特技术有限公司 Embroidery image rendering using parametric texture mapping
CN107012601A (en) * 2017-03-15 2017-08-04 苏州大学 A kind of high-resolution machine embroidery method
CN108170907A (en) * 2017-12-12 2018-06-15 南京大学 A kind of process type computer-aided crewel embroidery production method
CN109308380A (en) * 2018-08-24 2019-02-05 云南大学 Embroidery art style analogy method based on feeling of unreality
CN110512372A (en) * 2019-08-22 2019-11-29 厦门盈趣科技股份有限公司 Embroidery machine embroidery control method, system, embroidery machine and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
肖志强等: "基于Unity3D的新疆哈萨克族刺绣技艺虚拟仿真系统", 《现代电子技术》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114892352A (en) * 2022-06-13 2022-08-12 北京仙人指文化艺术发展有限责任公司 Pattern wiring method, device, electronic apparatus, and computer-readable medium
CN114892352B (en) * 2022-06-13 2023-01-24 北京仙人指文化艺术发展有限责任公司 Pattern wiring method, device, electronic apparatus, and computer-readable medium
WO2024198099A1 (en) * 2023-03-27 2024-10-03 浙江大豪科技有限公司 Loose sequin pattern drawing method and apparatus, device, and storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
KR101325757B1 (en) Apparatus and Method for providing augmented reality using generation of virtual marker
CN113362443B (en) Embroidery effect picture generation method and device, storage medium and electronic equipment
CN110149551B (en) Media file playing method and device, storage medium and electronic device
CN105517681A (en) Chart conversion system using metadata and method therefor
CN111399831A (en) Page display method and device, storage medium and electronic device
CN110232726A (en) The generation method and device of intention material
CN113177998A (en) Method and terminal device for generating three-dimensional model
CN107798716A (en) Image effect extracts
CN113345048B (en) Geographic information image editing method and device and computer equipment
CN113867875A (en) Method, device, equipment and storage medium for editing and displaying marked object
CN110633251B (en) File conversion method and equipment
CN117032666A (en) Page editing method and device based on editor, terminal equipment and storage medium
CN115134317B (en) Message display method, device, storage medium and electronic device
CN107862728B (en) Picture label adding method and device and computer readable storage medium
CN115641397A (en) Method and system for synthesizing and displaying virtual image
CN111210525A (en) Method, platform, equipment and readable storage medium for interactive editing of three-dimensional model
CN113345038B (en) Embroidery image processing method and device, electronic equipment and storage medium
CN113569114A (en) Visual display method and device for system data
CN112486378B (en) Graph generation method, device, terminal and storage medium
CN110929059A (en) Picture processing method and device, storage medium and electronic device
CN115408562A (en) Target object searching method and image searching method
CN112328073B (en) Bidding evaluation method, device and system based on augmented reality equipment and computer equipment
US10496241B2 (en) Cloud-based inter-application interchange of style information
CN110533443B (en) Method, equipment and storage medium for tracing materials in map
CN108182199B (en) Method and system for generating electric power transaction data graph

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