CN113345038B - Embroidery image processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113345038B
CN113345038B CN202110736100.0A CN202110736100A CN113345038B CN 113345038 B CN113345038 B CN 113345038B CN 202110736100 A CN202110736100 A CN 202110736100A CN 113345038 B CN113345038 B CN 113345038B
Authority
CN
China
Prior art keywords
color
embroidery
target
image
colors
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
CN202110736100.0A
Other languages
Chinese (zh)
Other versions
CN113345038A (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 CN202110736100.0A priority Critical patent/CN113345038B/en
Publication of CN113345038A publication Critical patent/CN113345038A/en
Application granted granted Critical
Publication of CN113345038B publication Critical patent/CN113345038B/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
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Sewing Machines And Sewing (AREA)

Abstract

The application relates to an embroidery image processing method, an embroidery image processing device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring an embroidery image to be processed and configuration parameters of an embroidery machine, wherein the configuration parameters 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 embroidery image to obtain a target color matching image, wherein each color in the target color matching image belongs to a color set, and the number of the colors of the target color matching image is not more than the maximum needle number of the embroidery machine. The whole process is completed through computer equipment, and manual adjustment of related personnel is not needed, so that the technical problem that the efficiency of adjusting the embroidery image in the related technology is low is solved.

Description

Embroidery image processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of embroidery technologies, and in particular, to a method and an apparatus for processing an embroidery image, an electronic device, and a storage medium.
Background
With the development of high-tech industry, embroidery devices and processes such as special embroidery machines, multi-head multi-needle computer embroidery machines and the like are increasingly popularized and applied, at present, in the process of customizing an embroidery process for a commodity by a user, embroidery color types which can be supported by a factory depend on a color library of the factory and the needle head number of the embroidery machine, one needle head of the embroidery machine can only be configured with one color, the maximum needle head number of the embroidery machine represents the maximum number of the color types which can be processed by the embroidery machine, the embroidery image uploaded by the user often has excessive color types or the contained color does not have corresponding embroidery threads in the color library of the factory, so that the needle head number which is started by the embroidery machine of the factory is not supported or the color library of the factory is not supported, therefore, the embroidery image uploaded by the user needs to be manually adjusted by a designer, the color type of the embroidery image conforms to the maximum needle head number of the embroidery machine of the factory, the efficiency of manually adjusting the embroidery image by the designer is low, the processing capability is limited, and the embroidery production requirement of the embroidery production of the factory cannot be met.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The application provides a processing method and device of an embroidery image, an electronic device and a storage medium, which are used for at least solving the technical problem that the efficiency of adjusting the embroidery image is low in the related technology.
According to an aspect of an embodiment of the present application, there is provided a method of processing an embroidery image, the method including: acquiring an embroidery image to be processed and configuration parameters of an embroidery machine, wherein the configuration parameters comprise a color set stored in a color library and the maximum number of needles of the embroidery machine; and carrying out color matching processing on the embroidery image to obtain a target color matching map, wherein each color in the target color matching map belongs to a color set, and the number of the colors of the target color matching map is not more than the maximum needle number of the embroidery machine.
Optionally, the color matching processing on the embroidery image to obtain the target color matching image includes: segmenting a target embroidery area from an embroidery image by utilizing a neural network model; carrying out color clustering processing on colors in the target embroidery area by adopting a clustering scheme to obtain multiple colors; under the condition that the number of the color types of the multiple colors is larger than the maximum needle number of the embroidery machine, continuously adopting a clustering scheme to perform color clustering processing on the target embroidery area; and replacing each type of color in the target embroidery area in the embroidery image with the corresponding target color in the color set to obtain the target color-matching map under the condition that the number of the color types of the multiple types of colors is not more than the maximum needle number of the embroidery machine.
Optionally, replacing each type of color in the target embroidery area with a corresponding target color in the color set, and obtaining the target color map includes: acquiring a color coordinate of each color in a plurality of colors and a color coordinate of each color in a color set, wherein the color coordinate is a coordinate of the color in an RGB color space; determining a target color corresponding to each type of color from the color set according to the color coordinate of each type of color in the plurality of types of colors and the color coordinate of each color in the color set; and replacing each type of color in the target embroidery area with a corresponding target color in the color set to obtain a target color-leaning chart.
Optionally, the obtaining the color coordinates of each of the plurality of types of colors includes: taking the coordinates of the first color in the RGB color space in each type of color as the color coordinates of each type of color, wherein the first color is the color of the central point of the cluster; or, the average value of the coordinates of all colors in each color class in the RGB color space is taken as the color coordinate of each color class.
Optionally, determining, from the color set, a target color corresponding to each color according to the color coordinate of each color in the multiple colors and the color coordinate of each color in the color set, includes: acquiring a coordinate distance between the color coordinate of each type of color and the color coordinate of each color in the color set; searching a second color with the minimum coordinate distance with the color coordinate of each color from the color coordinates of the color set; and replacing each type of color in the target embroidery area with a corresponding second color so as to take the second color as the target color.
Optionally, before the target embroidery region is segmented from the embroidery image by using the neural network model, training the neural network model in the following manner includes: acquiring an embroidery sample picture for training, wherein the embroidery sample picture carries marking information, and the marking information is used for marking an embroidery area in the embroidery sample picture; and inputting the embroidery sample graph into a full convolution neural network for training to obtain a trained neural network model.
Optionally, performing color clustering processing on the colors in the target embroidery area by using a clustering scheme, and obtaining multiple types of colors includes: reading center color coordinates of k color clusters, wherein the center color coordinates obtained before the clustering operation is performed for the first time are selected from the color coordinates of all pixel points in the target embroidery area, and k is a positive integer not greater than the maximum needle number of the embroidery machine; performing clustering operation on the color coordinates of all pixel points in the target embroidery area according to the following mode: determining the distance between the color coordinate of a target pixel point in the target embroidery area and each center color coordinate, wherein the color coordinate of the target pixel point is an unclassified color coordinate, and classifying the color coordinate of the target pixel point into a color cluster where the center color coordinate with the closest distance in the k center color coordinates is located; determining to complete clustering when each color cluster in the k color clusters is unchanged compared with that before clustering operation is executed; and under the condition that any one color cluster in the k color clusters is changed compared with the color cluster before the clustering operation is executed, taking the average value of the color coordinates of all pixel points included in each color cluster in the k color clusters as the center color coordinate when the clustering operation is executed next time.
Optionally, the acquiring the embroidery image to be processed further comprises: acquiring a customization request of a user for embroidering and customizing a target commodity, and taking a customized image uploaded by the user and contained in the customization request as the embroidery image.
Optionally, the target color map is provided to the user for the user to confirm the target color map.
According to another aspect of embodiments of the present application, there is also provided an apparatus for processing an embroidery image, the apparatus including: the embroidery processing device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an embroidery image to be processed and configuration parameters of the embroidery machine, and the configuration parameters comprise a color set stored in a color library and the maximum needle number of the embroidery machine; and the processing module is used for carrying out color matching processing on the embroidery image to obtain a target color matching map, wherein each color in the target color matching map belongs to a color set, and the number of the colors of the target color matching map is not more than the maximum needle number of the embroidery machine.
Optionally, the processing module comprises: the segmentation unit is used for segmenting a target embroidery area from the embroidery image by using the neural network model; the first processing unit is used for carrying out color clustering processing on the colors in the target embroidery area by adopting a clustering scheme to obtain multiple colors; the second processing unit is used for continuously adopting a clustering scheme to perform color clustering processing on the target embroidery area under the condition that the number of the color types of the colors is greater than the maximum needle number of the embroidery machine; and the replacing unit is used for replacing each type of color in the target embroidery area in the embroidery image with the corresponding target color in the color set to obtain the target color-matching map under the condition that the number of the color types of the plurality of types of colors is not more than the maximum number of needles of the embroidery machine.
Optionally, the replacement unit is further configured to: acquiring a color coordinate of each color in a plurality of colors and a color coordinate of each color in a color set, wherein the color coordinate is a coordinate of the color in an RGB color space; determining a target color corresponding to each type of color from the color set according to the color coordinate of each type of color in the colors and the color coordinate of each color in the color set; and replacing each type of color in the target embroidery area with a corresponding target color in a color set to obtain a target color-dependent map.
Optionally, the replacement unit is further configured to: taking the coordinates of the first color in the RGB color space in each type of color as the color coordinates of each type of color, wherein the first color is the color of the central point of the cluster; or, the average value of the coordinates of all colors in each color class in the RGB color space is taken as the color coordinate of each color class.
Optionally, the replacement unit is further configured to: acquiring a coordinate distance between the color coordinate of each type of color and the color coordinate of each color in the color set; and searching a second color with the minimum coordinate distance with the color coordinate of each color type from the color coordinates of the color set so as to take the second color as the target color.
Optionally, the apparatus further comprises: a sample reading module: the method comprises the steps of obtaining an embroidery sample graph for training before a target embroidery area is segmented from an embroidery image by using a neural network model, wherein the embroidery sample graph carries marking information which is used for marking the embroidery area in the embroidery sample graph; a training module: and the embroidery sample graph is input into the full convolution neural network for training to obtain a trained neural network model.
Optionally, the first processing unit is configured to: reading center color coordinates of k color clusters, wherein the center color coordinates obtained before the clustering operation is executed for the first time are selected from color coordinates of all pixel points in the target embroidery area, and k is a positive integer not greater than the maximum needle number of the embroidery machine; performing clustering operation on the color coordinates of all pixel points in the target embroidery area according to the following mode: determining the distance between the color coordinate of a target pixel point in the target embroidery area and each center color coordinate, wherein the color coordinate of the target pixel point is an unclassified color coordinate, and classifying the color coordinate of the target pixel point into a color cluster where the center color coordinate with the closest distance in the k center color coordinates is located; determining to complete clustering when each color cluster in the k color clusters is unchanged compared with that before clustering operation is executed; and under the condition that any one color cluster in the k color clusters is changed compared with the color cluster before the clustering operation is executed, taking the average value of the color coordinates of all pixel points included in each color cluster in the k color clusters as the center color coordinate when the clustering operation is executed next time.
Optionally, the obtaining module is further configured to: and acquiring a customization request of the user for embroidering customization on the target commodity so as to take the customized image uploaded by the user contained in the customization request as an embroidery image.
Optionally, the apparatus further comprises: and the display module is used for providing the target color-leaning map for the user so that the user can confirm the target color-leaning map.
According to another aspect of embodiments of the present application, there is also provided an embroidery image processing apparatus applied in a C2M mode, the embroidery image processing apparatus including the processing device of an embroidery image described above.
According to another aspect of the embodiments of the present application, there is also provided a user client applied in a C2M mode, the user client including the processing device for embroidering an image.
According to another aspect of the embodiment of the application, an e-commerce platform background server applied in a C2M mode is further provided, and the e-commerce platform background server includes the processing device for the embroidery image.
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 the above-described embroidery image processing method.
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 a method of processing an embroidery image as described above.
In the embodiment of the application, the embroidery image to be processed and the configuration parameters of the embroidery machine are obtained, the color leaning processing is carried out on the embroidery image, the target color leaning graph with each color belonging to the color set of the factory color library and the number of the colors not larger than the maximum needle number of the embroidery machine is obtained, the purposes that the color type of the embroidery image accords with the color library of the factory and the number of the colors accords with the needle number of the embroidery machine are achieved, the whole process is completed through computer equipment without manual adjustment of related personnel, and the technical problem that the efficiency of adjusting the embroidery image in the related technology is low 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 schematic diagram of a hardware environment for a method of processing an embroidery image according to an embodiment of the application;
FIG. 2 is a flow chart of a method of processing an embroidery image according to an embodiment of the application;
FIG. 3 is a schematic diagram of an embroidery image artwork according to embodiments of the present application;
FIG. 4 is a schematic illustration of a color map of an embroidered image in accordance with an embodiment of the present application;
FIG. 5 is a schematic diagram of an apparatus for processing an embroidery image according to an embodiment of the present application; and the number of the first and second groups,
fig. 6 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 accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Moreover, 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, an embodiment of a method for processing an embroidery image is provided.
Alternatively, in the present embodiment, the processing method of an embroidery image 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, a server 103 is connected to a terminal 101 through a network, which may be used to provide a processing service for embroidery images for the terminal or a client installed on the terminal, and a database may be provided on the server or separately from the server for providing a data storage service for the server 103, and the network includes but is not limited to: the terminal 101 may be any electronic product that can perform human-computer interaction with a user through a keyboard, a touch pad, a touch screen, a remote controller, voice interaction or handwriting equipment, such as a PC, a mobile phone, a smart phone, a PDA, wearable equipment, a palm PC PPC, wearable equipment, a tablet computer, and the like.
The embroidery image processing method 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. Here, the terminal 101 may execute a processing method of an embroidery image according to an embodiment of the present application 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 the embroidery of the commodity; 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 instructions set or stored in advance, 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.
Hereinafter, the description will be given only by taking as an example a method of processing an embroidery image in the embodiment of the present application on a server.
Fig. 2 is a flowchart of a processing method of an embroidery image according to an embodiment of the present application, and as shown in fig. 2, the method may include the steps of:
step S202, the server obtains the embroidery image to be processed and the configuration parameters of the embroidery machine.
The server may be an e-commerce platform background server corresponding to the e-commerce platform user client, and the configuration parameters related to the operation of the embroidery machine are obtained from the embroidery factory by, for example, querying a database, which is corresponding to the embroidery factory and stores the configuration parameters of the embroidery machine, where the configuration parameters include a color set stored in a color library of the embroidery factory and a maximum needle number of the embroidery machine, and the colors stored in the color library are colors of the embroidery supported by the embroidery factory, that is, colors of embroidery threads owned by the embroidery factory.
And S204, carrying out color matching processing on the embroidery image by the server to obtain a target color matching image, wherein each color in the target color matching image belongs to a color set, and the number of the colors of the target color matching image is not more than the maximum needle number of the embroidery machine.
The color-matching processing is to replace colors in the embroidery image with the closest colors in the color set so that the embroidery machine can produce an embroidery product corresponding to the embroidery image by using the embroidery threads supported in the factory color library.
Through the steps S202 to S204, after the server obtains the embroidery image to be processed and the configuration parameters of the embroidery machine, the server performs color-dependent processing on the embroidery image to obtain the target color-dependent map with the color number not greater than the maximum needle number of the embroidery machine, so that the purposes that the color type of the embroidery image accords with a color library of a factory and the color number accords with the needle number of the embroidery machine are achieved, and the whole process is completed through computer equipment without manual adjustment of related personnel, so that the technical problem that the efficiency of adjusting the embroidery image in the related technology is low is solved. The technical solution of the present application is further detailed below with reference to the steps shown in fig. 2:
in the technical solution provided in step S202, the embroidery image to be processed that is obtained by the server is an embroidery image uploaded by the user through the user client of the merchant platform and used for customizing a commodity, the configuration parameters of the embroidery machine that are obtained by the server are configured in the factory through the user client of the merchant platform, and include colors contained in the factory color library and the maximum number of needles of the embroidery machine, and the server can obtain the configuration parameters before processing the embroidery image uploaded by the user.
For example, a user uploads an embroidery image through a user client of a merchant platform, a server sends a configuration parameter request to a merchant user client, the merchant user client uploads a configuration parameter to the server after receiving the request, the server starts to process the embroidery image, and the configuration parameter includes: hexadecimal color codes of 100 embroidery thread colors in the color library and the maximum needle number of the embroidery machine is 24.
In the technical solution provided in step S204, the server performs color matching processing on the embroidery image to obtain a target color matching map, each color in the obtained target color matching map belongs to the color set stored in the factory color library, and the number of colors in the target color matching map is not greater than the maximum needle number of the embroidery machine. Since the colors used in embroidery depend on the color library of the factory and each needle of the embroidery machine can be configured with only one color, the image generated after processing the embroidery image should meet the conditions defined in step S204.
As an alternative embodiment, the server performs color matching processing on the embroidery image to obtain a target color matching map, including: the server cuts out the target embroidery area from the embroidery image by utilizing the neural network model; in order to solve the problems that the embroidery image has too many color types and the embroidery machine has unsupported needle heads, the server adopts a clustering scheme to perform color clustering processing on the colors in a target embroidery area to obtain multiple colors; the server can judge whether the number of the color types of the multiple colors accords with the configuration of the embroidery machine, and under the condition that the number of the color types of the multiple colors is larger than the maximum needle number of the embroidery machine, the server continuously adopts a clustering scheme to perform color clustering processing on the target embroidery area; and under the condition that the number of the color types of the multiple colors is not more than the maximum needle number of the embroidery machine, the server replaces each color in the target embroidery area in the embroidery image with the color in the color set to obtain a target color-dependent map.
As an optional embodiment, in the process of performing the color matching processing on the embroidery image by the server, in order to more accurately perform the color matching processing on the embroidery image sent to the factory by the user, the embroidery image may be divided into an embroidery area and a blank area, for example, a neural network model may be selected to segment an embroidery edge of the embroidery image, and the area where the embroidery is located is determined as the target embroidery area. The method has the advantages that the neural network model is selected to carry out edge segmentation on the embroidery image, extraction of the target embroidery area is completed, meanwhile, the complex edge smoothing of the embroidery image is achieved, the purpose of reducing embroidery difficulty is achieved, and the problem that the embroidery process is complex due to the fact that the edge is not smooth is solved.
As an alternative embodiment, the server replaces each type of color in the target embroidery area in the embroidery image with a corresponding target color in the color set to obtain the target color map, including: the method comprises the steps that a server obtains a color coordinate of each color in a plurality of colors and a color coordinate of each color in a color set, wherein the color coordinate is a coordinate of the color in an RGB color space; the server determines a target color corresponding to each type of color from the color set according to the color coordinate of each type of color in the plurality of types of colors and the color coordinate of each color in the color set; and replacing each type of color in the target embroidery area with a corresponding target color in a color set to obtain a target color-dependent map.
Optionally, in this embodiment, the color coordinates are represented by three-dimensional coordinates (R, G, B) in an RGB color space, where R is a red channel color value, G is a green channel color value, and B is a blue channel color value.
For example, the color coordinates of red are represented as (255, 0), the color coordinates of green are represented as (0, 255, 0), and the color coordinates of blue are represented as (0, 255).
As an alternative embodiment, the server obtaining the color coordinates of each of the plurality of types of colors includes: taking the coordinates of the first color in the RGB color space in each type of color as the color coordinates of each type of color, wherein the first color is the color of the central point of the cluster; or, the average value of the coordinates of all colors in each color class in the RGB color space is taken as the color coordinate of each color class.
Optionally, in this embodiment, each type of color in the target embroidery area includes a plurality of colors, and the server uses the color coordinate of the center point of the cluster or the average value of the color coordinates of the plurality of colors in each type of color as the color coordinate of the type of color for representing the type of color.
As an alternative embodiment, the server determines, according to the color coordinate of each color in the multiple classes of colors and the color coordinate of each color in the color set, the target color corresponding to each class of colors from the color set, including: the server acquires the coordinate distance between the color coordinate of each type of color and the color coordinate of each color in the color set; and the server searches a second color with the minimum coordinate distance with the color coordinate of each type of color from the color coordinates of the color set so as to take the second color as the target color.
Optionally, in this embodiment, the color coordinates of each type of color in the target embroidery area are usually not completely consistent with the color coordinates in the color set, and therefore, the color coordinates of the second color closest to the color coordinates of each type of color are searched in the color set, and each type of color in the target embroidery area is replaced by the corresponding second color, so that the colors of the target embroidery area are all included in the color set. The corresponding second color of each class of colors is determined by: the server obtains color coordinates (R) of one of the colors 1 ,G 1 ,B 1 ) And the color coordinates of each color in the color set, then according to a formula
Figure BDA0003141658130000121
Calculating coordinates of each color in the color set to (R) 1 ,G 1 ,B 1 ) Distance | P of 1 P 2 L, wherein P 1 Representative color coordinates (R) 1 ,G 1 ,B 1 ),P 2 The color coordinate representing a color in the color set, and the smallest distance is (R) 1 ,G 1 ,B 1 ) Corresponding second color coordinates.
For example, if the color coordinates (102, 100) of one of the colors are (100 ), (105, 100), (90, 90) respectively, the server calculates the distances from the three coordinates (100,100,100), (105,100,100) and (90,90,90) to the (102,100,100) to be 2.000, 3.000 and 18.547 respectively, and the coordinate (100,100,100) with the smallest distance is the corresponding second color coordinate of the (102,100,100).
The present application further provides an alternative embodiment, wherein before the target embroidery area is segmented from the embroidery image by using the neural network model, the training of the neural network model includes: acquiring an embroidery sample graph for training, wherein the embroidery sample graph carries marking information which is used for marking an embroidery area in the embroidery sample graph; and inputting the embroidery sample graph into a full convolution neural network for training to obtain a trained neural network model.
Optionally, in this embodiment, the embroidery sample graph used for training is an embroidery image subjected to manual labeling, where the manual labeling is to label the edge of the target embroidery area, and of course, the labeling here may also be automatically implemented by a machine. Except the full convolution neural network model, the server can also select other neural network models, such as a convolution neural network model, but the convolution neural network model can lose part of detail information during sampling, which may cause the problems of too low image resolution, detail loss and the like during subsequent operation, and the full convolution neural network model can complement some lost information to a certain extent through up-sampling operation, thereby obtaining more accurate segmentation boundary. In addition, the full convolution neural network model also has the following advantages: the image can be classified at a pixel level, the problem of image segmentation at a semantic level is solved, an input image with any size can be accepted, and spatial information in the original input image can be reserved.
As an optional embodiment, the server performs color clustering processing on the colors in the target embroidery area by using a clustering scheme, and obtaining multiple types of colors includes: the method comprises the steps that a server reads center color coordinates of k color clusters, wherein the center color coordinates obtained before the server performs clustering operation for the first time are selected from color coordinates of all pixel points in a target embroidery area, and k is a positive integer not larger than the maximum needle number of an embroidery machine; the server performs clustering operation on the color coordinates of all pixel points in the target embroidery area according to the following mode: the server determines the distance between the color coordinate of a target pixel point in the target embroidery area and each center color coordinate, wherein the color coordinate of the target pixel point is an unclassified color coordinate, and the color coordinate of the target pixel point is classified into a color cluster in which the center color coordinate closest to the color coordinate is located in k center color coordinates; determining to complete clustering when each color cluster in the k color clusters is unchanged compared with that before clustering operation is executed; and under the condition that any one color cluster in the k color clusters is changed compared with the color cluster before the clustering operation is executed, the server takes the average value of the color coordinates of all pixel points included in each color cluster in the k color clusters as the center color coordinate when the clustering operation is executed next time.
Optionally, in this embodiment, the clustering scheme is to perform clustering processing on the embroidery images sent to the factory by the user using a clustering algorithm (e.g., a Kmeans algorithm), and classify the colors of all pixel points in the target embroidery area through clustering operation to reduce the color types included in the target embroidery area.
For example, the target embroidery area has 4 pixels X 1 (4,5,5)、X 2 (5,5,5)、X 3 (8,9,9)、X 4 (10,10,10):
Clustering operation for the 1 st time: before the clustering operation is performed for the first time, the server randomly selects a center color coordinate X of k =2 color clusters from the color coordinates of all pixel points in the target embroidery area 2 (5,5,5)、X 4 (10, 10), determining the distance between the color coordinates of the target pixel points in the target embroidery area and each center color coordinate: i X 1 X 2 |=1.000,|X 3 X 2 |=6.403,|X 1 X 4 |=9.273,|X 3 X 4 L =2.449; x is to be 1 Fall under X 2 In the class in which X is to be 3 Fall under X 4 In which class it belongs.
Clustering operation 2: server obtains X 2 Average value A of color coordinates of all pixel points in the class in which the pixel points are located 2 (4.5,5.0,5.0),X 6 Average value B of color coordinates of all pixel points in the class in which the pixel points are located 2 (9.0,9.5,9.5),A 2 、B 2 Determining the color coordinates and A of the target pixel points in the target embroidery area for the center color coordinates of the second clustering 2 、B 2 Distance therebetween: i X 1 A 2 |=0.5,|X 2 A 2 |=0.5,|X 3 A 2 |=6.652,|X 4 A 2 |=8.958,|X 1 B 2 |=8.093,|X 2 B 2 |=7.517,|X 5 B 2 |=1.225,|X 6 B 2 | =1.225, compare X 1 、X 2 Fall under A 2 In the class of X 3 、X 4 Fall under B 2 In which class it belongs.
At this time, compared with the pixels contained before the 2 nd clustering operation, each color cluster in the 2 color clusters is unchanged, the server determines that the clustering is completed, and the server successfully classifies the colors of 4 pixels in the target embroidery area into 2 types through the clustering operation.
For example, the clustering operation is performed on fig. 3 multiple times, and the colors of the multiple types obtained after the clustering is terminated are replaced by the colors in the color set stored in the color library, the obtained color-dependent graph is shown in fig. 4, the color of the petals in the area a in fig. 3 is changed from blue to light green in fig. 4, the area B in fig. 3 is dark blue, the area C in fig. 3 is dark green, and the areas B and C in fig. 4 are both dark green.
The clustering scheme has the advantages that the calculation is simple, the clustering scheme has an optimization iteration function, iteration is performed on the obtained clusters again, new clusters are determined, the unreasonable places of initial classification are optimized, and the features of the generated color-leaning graph before the embroidery image is subjected to color-leaning processing are retained to the greatest extent.
As an optional embodiment, the result of the color-dependent map is evaluated by using a statistical algorithm, whether the number of colors in the color-dependent map meets the number of needles of the factory embroidery machine is judged, and when the number of colors in the color-dependent map is greater than the maximum number of needles of the embroidery machine, the clustering scheme is executed again until the number of colors in the color-dependent map is not greater than the maximum number of needles of the factory embroidery machine, so that the color-dependent map is completed.
As an alternative embodiment, the server obtains a customization request of the user for customizing the embroidery with respect to the target product, so as to use the customized image uploaded by the user and contained in the customization request as the embroidery image.
As an alternative embodiment, the server provides the target color map to the user for the user to confirm the target color map.
According to the scheme, the embroidery images are subjected to color clustering through a clustering algorithm, the number of color types contained in the embroidery images is reduced, and meanwhile, the clustering algorithm has an optimization iteration function and retains the characteristics of the embroidery images before processing to the greatest extent; the neural network is adopted for edge segmentation before color clustering, so that not only is the extraction of a target embroidery area completed and the color clustering more accurate, but also the complex edge smoothing of an embroidery image is realized, the purpose of reducing the embroidery difficulty is achieved, and the problem of complex embroidery process caused by the unsmooth edge is solved; the scheme is completed through computer equipment, manual adjustment of related personnel is not needed, machine automatic processing of the embroidery images is achieved, and processing efficiency of factories on the embroidery images is improved.
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 will recognize that the embodiments described in this specification are preferred embodiments and that acts or modules referred to are not necessarily required for 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 a processing apparatus for implementing the processing method of the embroidery image. Fig. 5 is a schematic diagram of an embroidery image processing apparatus according to an embodiment of the application, and as shown in fig. 5, the apparatus may include an acquisition module 52, a processing module 54:
an obtaining module 52, configured to obtain an embroidery image to be processed and configuration parameters of the embroidery machine, where the configuration parameters include a color set stored in a color library and a maximum number of needles of the embroidery machine;
and the processing module 54 is configured to perform color matching processing on the embroidery image to obtain a target color matching map, where each color in the target color matching map belongs to a color set, and the number of colors in the target color matching map is not greater than the maximum number of needles of the embroidery machine.
It should be noted that the obtaining module 52 in this embodiment may be configured to execute step S202 in this embodiment, and the processing module 54 in this embodiment may be configured to execute step S204 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 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 effects that the color type of the embroidery image accords with a color library of a factory, and the color number accords with the needle number of the embroidery machine are achieved, and the technical problem that the efficiency of adjusting the embroidery image is low in the related technology is solved.
As an alternative embodiment, the processing module 54 includes a dividing unit, a first processing unit, a second processing unit, and a replacing unit:
the segmentation unit is used for segmenting a target embroidery area from an embroidery image by utilizing a neural network model;
the first processing unit is used for carrying out color clustering processing on the colors in the target embroidery area by adopting a clustering scheme to obtain multiple colors;
the second processing unit is used for continuously adopting a clustering scheme to perform color clustering processing on the target embroidery area under the condition that the number of the color types of the colors is greater than the maximum needle number of the embroidery machine;
and the replacing unit is used for replacing each type of color in the target embroidery area in the embroidery image with the corresponding target color in the color set to obtain the target color-matching map under the condition that the number of the color types of the multiple types of colors is not more than the maximum needle number of the embroidery machine.
Optionally, the replacement unit is for: acquiring a color coordinate of each color in a plurality of colors and a color coordinate of each color in a color set, wherein the color coordinate is a coordinate of the color in an RGB color space; determining a target color corresponding to each type of color from the color set according to the color coordinate of each type of color in the plurality of types of colors and the color coordinate of each color in the color set; and replacing each type of color in the target embroidery area with a corresponding target color in the color set to obtain a target color-leaning chart.
Optionally, the replacement unit is further configured to: taking the coordinates of the first color in the RGB color space in each type of color as the color coordinates of each type of color, wherein the first color is the color of the central point of the cluster; or, the average value of the coordinates of all colors in each color class in the RGB color space is taken as the color coordinate of each color class.
Optionally, the replacement unit is further configured to: acquiring a coordinate distance between the color coordinate of each type of color and the color coordinate of each color in the color set; searching a second color with the minimum coordinate distance with the color coordinate of each color from the color coordinates of the color set; and replacing each type of color in the target embroidery area with a corresponding second color so as to take the second color as the target color.
As an optional embodiment, the apparatus further comprises a sample reading module, a training module:
the sample reading module is used for acquiring an embroidery sample graph for training before a target embroidery area is segmented from the embroidery image by using a neural network model, wherein the embroidery sample graph carries marking information which is used for marking the embroidery area in the embroidery sample graph;
and the training module is used for inputting the embroidery sample graph into the full convolution neural network for training to obtain a trained neural network model.
Optionally, the first processing unit is configured to: reading center color coordinates of k color clusters, wherein the center color coordinates obtained before the clustering operation is performed for the first time are selected from the color coordinates of all pixel points in the target embroidery area, and k is a positive integer not greater than the maximum needle number of the embroidery machine; performing clustering operation on the color coordinates of all pixel points in the target embroidery area according to the following mode: determining the distance between the color coordinate of a target pixel point in the target embroidery area and each center color coordinate, wherein the color coordinate of the target pixel point is an unclassified color coordinate, and classifying the color coordinate of the target pixel point into a color cluster where the center color coordinate with the closest distance in the k center color coordinates is located; determining to complete clustering when each color cluster in the k color clusters is unchanged compared with that before clustering operation is executed; and under the condition that any one color cluster in the k color clusters is changed compared with the color cluster before clustering operation is executed, taking the average value of the color coordinates of all pixel points included in each color cluster in the k color clusters as the center color coordinate when clustering operation is executed next time.
As an alternative embodiment, the obtaining module 52 is further configured to: and acquiring a customization request of the user for embroidering customization on the target commodity so as to take the customized image uploaded by the user contained in the customization request as an embroidery image.
As an optional embodiment, the apparatus further includes a presentation module, configured to provide the target color map to a user for the user to confirm the target color map.
It should be noted that the modules described above are the same as examples and application scenarios realized by corresponding steps, but are not limited to what is disclosed in the foregoing embodiments. It should be noted that the modules described above as part of the apparatus may run in a hardware environment as shown in fig. 1, may be implemented by software, and may also 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 image processing method.
Fig. 6 is a block diagram of a terminal according to an embodiment of the present application, and as shown in fig. 6, the terminal may include: one or more processors 601 (only one is shown in fig. 6), a memory 603, and a transmission means 605. As shown in fig. 6, the terminal may further include an input output device 607.
The memory 603 may be configured to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for processing an embroidery image in the embodiment of the present application, and the processor 201 executes various functional applications and data processing by running the software programs and modules stored in the memory 603, so as to implement the above-mentioned method for processing an embroidery image. The memory 603 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 603 can further include memory located remotely from the processor 601, which can be connected to the terminal over 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 above-mentioned transmission device 605 is used for receiving or sending data via a network, and may also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 605 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 205 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among them, the memory 603 is used to store an application program, in particular.
The processor 601 may call the application stored in the memory 603 through the transmission device 605 to perform the following steps:
acquiring an embroidery image to be processed and configuration parameters of an embroidery machine, wherein the configuration parameters 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 embroidery image to obtain a target color matching map, wherein each color in the target color matching map belongs to a color set, and the number of the colors of the target color matching map is not more than the maximum needle number of the embroidery machine.
By adopting the embodiment of the application, a scheme for processing the embroidery image is provided. The method comprises the steps of obtaining an embroidery image to be processed and configuration parameters of an embroidery machine, carrying out color-dependent processing on the embroidery image to obtain a target color-dependent map with the color number not larger than the maximum needle number of the embroidery machine, and achieving the purposes that the color type of the embroidery image accords with a color library of a factory and the color number accords with the needle number of the embroidery machine, so that the technical effect of improving the image processing efficiency is achieved.
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. 6 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. 6 does not limit the 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. 6, or have a different configuration than shown in FIG. 6.
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.
Embodiments of the present application also provide an embroidery image processing apparatus applied in the C2M mode. The embroidery image processing device applied to the C2M mode comprises the embroidery image processing 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 processing device for the embroidery image.
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 embroidery image processing device.
Embodiments of the present application also provide a computer-readable storage medium. Optionally, in this 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 above processing method for an embroidery image, and may be used to execute program codes of the processing method for an embroidery image.
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 an embroidery image to be processed and configuration parameters of an embroidery machine, wherein the configuration parameters comprise a color set stored in a color library and the maximum number of needles of the embroidery machine; and carrying out color matching processing on the embroidery image to obtain a target color matching image, wherein each color in the target color matching image belongs to a color set, and the number of the colors of the target color matching image is not more than the maximum needle number of the embroidery machine.
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 disk, or an optical disk, and 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 advantages and disadvantages 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 apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be implemented in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be an indirect coupling or communication connection through some interfaces, units or modules, and may be electrical or in other forms.
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, as will be apparent to those skilled in the art, numerous modifications and adaptations can be made without departing from the principles of the present application and such modifications and adaptations are intended to be considered within the scope of the present application.

Claims (17)

1. A method of processing an embroidered image comprising:
acquiring an embroidery image to be processed and configuration parameters of an embroidery machine, wherein the configuration parameters comprise a color set stored in a color library and the maximum needle number of the embroidery machine, and the color set stored in the color library is all embroidery thread colors owned by an embroidery factory;
performing color matching processing on the embroidery image to obtain a target color matching map, wherein each color in the target color matching map belongs to the color set, and the number of the colors in the target color matching map is not more than the maximum needle number of the embroidery machine;
the process of color matching of the embroidery image to obtain the target color matching image comprises the following steps: segmenting a target embroidery area from the embroidery image by utilizing a neural network model; carrying out color clustering processing on the colors in the target embroidery area by adopting a clustering scheme to obtain multiple colors; under the condition that the number of the color types of the multiple colors is larger than the maximum needle number of the embroidery machine, continuously adopting the clustering scheme to perform color clustering processing on the target embroidery area; and replacing each type of color in the target embroidery area with a corresponding target color in the color set to obtain the target color matching map under the condition that the number of the color types of the colors is not more than the maximum needle number of the embroidery machine.
2. The method according to claim 1, wherein replacing each type of color in the target embroidery area with a corresponding target color in the color set to obtain the target color map comprises:
determining a target color corresponding to each type of color from the color set according to the color coordinate of each type of color in the multiple types of colors and the color coordinate of each color in the color set;
and replacing each type of color in the target embroidery area with a corresponding target color in the color set to obtain the target color-dependent map.
3. The method according to claim 2, wherein determining the target color corresponding to each color from the color set according to the color coordinates of each color from the plurality of colors and the color coordinates of each color from the color set comprises:
acquiring a coordinate distance between the color coordinate of each type of color and the color coordinate of each color in the color set;
and searching a second color with the minimum coordinate distance to the color coordinate of each type of color from the color coordinates of the color set so as to take the second color as the target color.
4. The method of claim 1, wherein prior to segmenting a target embroidery area from the embroidery image using a neural network model, the method further comprises training the neural network model as follows:
acquiring an embroidery sample graph for training, wherein the embroidery sample graph carries marking information, and the marking information is used for marking an embroidery area in the embroidery sample graph;
inputting the embroidery sample graph into a full convolution neural network for training to obtain the neural network model.
5. Method according to any one of claims 1 to 4, characterized in that acquiring an embroidery image to be processed comprises:
acquiring a customization request of a user for embroidery customization on a target commodity, and taking a customized image uploaded by the user contained in the customization request as the embroidery image.
6. The method of claim 5, further comprising:
and providing the target color map to the user for the user to confirm the target color map.
7. An apparatus for processing an embroidered image, the apparatus comprising:
the embroidery processing system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an embroidery image to be processed and configuration parameters of an embroidery machine, the configuration parameters comprise a color set stored in a color library and the maximum needle head number of the embroidery machine, and the color set stored in the color library is all embroidery thread colors owned by an embroidery factory;
the processing module is used for carrying out color matching processing on the embroidery image to obtain a target color matching map, wherein each color in the target color matching map belongs to the color set, and the number of the colors of the target color matching map is not more than the maximum needle number of the embroidery machine;
the processing module comprises:
the segmentation unit is used for segmenting a target embroidery area from the embroidery image by utilizing a neural network model;
the first processing unit is used for carrying out color clustering processing on the colors in the target embroidery area by adopting a clustering scheme to obtain multiple colors;
the second processing unit is used for continuously adopting the clustering scheme to perform color clustering processing on the target embroidery area under the condition that the number of the color types of the colors is greater than the maximum needle number of the embroidery machine;
and the replacing unit is used for replacing each type of color in the target embroidery area with a corresponding target color in the color set to obtain the target color map under the condition that the number of the color types of the multiple types of colors is not more than the maximum needle number of the embroidery machine.
8. The apparatus of claim 7, wherein the replacement unit is further configured to:
determining a target color corresponding to each type of color from the color set according to the color coordinate of each type of color in the multiple types of colors and the color coordinate of each color in the color set;
and replacing each type of color in the target embroidery area with a corresponding target color in the color set to obtain the target color-dependent map.
9. The apparatus of claim 8, wherein the replacement unit is further configured to:
acquiring a coordinate distance between the color coordinate of each type of color and the color coordinate of each color in the color set;
and searching a second color with the minimum coordinate distance to the color coordinate of each type of color from the color coordinates of the color set so as to take the second color as the target color.
10. The apparatus of claim 7, further comprising:
the embroidery training system comprises a sample reading module, a training module and a judging module, wherein the sample reading module is used for acquiring an embroidery sample drawing for training, the embroidery sample drawing carries marking information, and the marking information is used for marking an embroidery area in the embroidery sample drawing;
and the training module is used for inputting the embroidery sample graph into a full convolution neural network for training to obtain the neural network model.
11. The apparatus of any one of claims 7 to 10, wherein the obtaining module is further configured to: acquiring a customization request of a user for embroidering customization on a target commodity, and taking a customized image uploaded by the user contained in the customization request as the embroidery image.
12. The apparatus of claim 11, further comprising: and the display module is used for providing the target color-leaning picture for the user so that the user can confirm the target color-leaning picture.
13. An embroidered image processing apparatus for use in a C2M mode characterized in that it comprises the apparatus of any one of claims 7 to 12.
14. A user client for use in C2M mode, wherein the user client comprises the apparatus of any one of claims 7 to 12.
15. An e-commerce platform backend server applied in a C2M mode, characterized in that the e-commerce platform backend server comprises the apparatus of any one of claims 7 to 10.
16. A computer readable storage medium, characterized in that the storage medium stores one or more programs executable by one or more processors to implement the processing method of an embroidery image according to any one of claims 1 to 6.
17. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-6.
CN202110736100.0A 2021-06-30 2021-06-30 Embroidery image processing method and device, electronic equipment and storage medium Active CN113345038B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110736100.0A CN113345038B (en) 2021-06-30 2021-06-30 Embroidery image processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110736100.0A CN113345038B (en) 2021-06-30 2021-06-30 Embroidery image processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113345038A CN113345038A (en) 2021-09-03
CN113345038B true CN113345038B (en) 2022-10-04

Family

ID=77481773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110736100.0A Active CN113345038B (en) 2021-06-30 2021-06-30 Embroidery image processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113345038B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113652812B (en) * 2021-09-23 2022-08-02 诸暨玛雅电器机械有限公司 Embroidery machine control system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101988237A (en) * 2009-08-06 2011-03-23 北京兴大豪科技开发有限公司 Control method and equipment of computer embroidering machine

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7623712B2 (en) * 2005-06-09 2009-11-24 Canon Kabushiki Kaisha Image processing method and apparatus
CN104063562B (en) * 2014-07-14 2017-03-22 南京大学 Method used for generating bottom embroidery draft of disordered needlework and based on color clustering
US10419643B2 (en) * 2016-07-29 2019-09-17 Represent Holding, LLC Systems and methods for creating colour separations for use in multi-stage printing processes to produce an acceptable facsimile of a user-selected colour artwork on a substrate
CN114144813A (en) * 2019-04-23 2022-03-04 巴黎欧莱雅 Machine image color extraction and machine image construction using extracted colors
CN110512372B (en) * 2019-08-22 2021-02-19 厦门盈趣科技股份有限公司 Embroidery machine embroidery control method and system, embroidery machine and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101988237A (en) * 2009-08-06 2011-03-23 北京兴大豪科技开发有限公司 Control method and equipment of computer embroidering machine

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Research in embroidery stitch contour restoring algorithm;Dongqing Wu;《2009 Chinese Control and Decision Conference》;20090807;全文 *
基于三菱RH-3CH4018的团扇刺绣机器人设计;惠悦;《自动化博览》;20191231;全文 *

Also Published As

Publication number Publication date
CN113345038A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
US9741137B2 (en) Image-based color palette generation
US9552656B2 (en) Image-based color palette generation
US9396560B2 (en) Image-based color palette generation
AU2019201268B2 (en) Segmentation of an image based on color and color differences
US9311889B1 (en) Image-based color palette generation
US10049466B2 (en) Color name generation from images and color palettes
US10109051B1 (en) Item recommendation based on feature match
US9135719B1 (en) Color name generation from images and color palettes
KR102390547B1 (en) Image feature data extraction and use
US9633448B1 (en) Hue-based color naming for an image
US9785649B1 (en) Hue-based color naming for an image
CN109409377B (en) Method and device for detecting characters in image
CN103353881B (en) Method and device for searching application
JP5811416B2 (en) Image processing apparatus, image processing method, and program
CN108304839A (en) A kind of image processing method and device
US20210271921A1 (en) Wallpaper management method, apparatus, mobile terminal, and storage medium
CN108182457A (en) For generating the method and apparatus of information
CN113345038B (en) Embroidery image processing method and device, electronic equipment and storage medium
KR20220039578A (en) Method for providing clothing recommendation information based on user-selected clothing, and server and program using the same
US20210264191A1 (en) Method and device for picture generation, electronic device, and storage medium
CN116189009A (en) Training method of remote sensing image processing model, electronic equipment and storage medium
CN113837181B (en) Screening method, screening device, computer equipment and computer readable storage medium
CN114363528A (en) Dial generation method and device, terminal device and computer readable storage medium
US10713792B1 (en) System and apparatus for image processing
CA2845601A1 (en) Segmentation of an image based on color and color differences

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