Scattered bead pattern drawing method and device, equipment and storage medium
By obtaining the attribute parameters of the scattered beads and the relative coordinates of the stitches, the rotation angle of the scattered beads and the drawing position of the 3D effect diagram are calculated, and the 3D effect diagram of the scattered beads is drawn, which solves the problem of poor display effect of scattered bead patterns and achieves an intuitive and realistic display effect.
Patent Information
- Application Number
- CN202310305300.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-03-27
AI Technical Summary
Existing technologies have poor display effects for scattered bead patterns, mainly based on lines or simple geometric plane graphics, which are not intuitive or realistic enough.
By obtaining the attribute parameters of the scattered beads and the relative coordinates of the stitches, the rotation angle of the scattered beads and the drawing position of the 3D effect diagram are calculated, and a 3D effect diagram of the scattered beads is drawn to intuitively show the embroidery effect of the scattered bead pattern.
It achieves an intuitive and realistic display of the three-dimensional effect of scattered bead patterns, enhancing the visual experience of the embroidery effect.
Smart Images

Figure CN116145344B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the embroidery technical field, and particularly to a scattered bead pattern drawing method, device, equipment and storage medium. BACKGROUND
[0002] The pearl embroidery is also called bead embroidery, which is to embroider different types of scattered beads such as hollow beads, bead tubes, artificial gems and shiny bead pieces on clothes to produce a dazzling effect. At present, the pearl embroidery is generally applied to stage performance clothes to add beauty and attractiveness to the clothes, and is also widely used in shoe uppers, bags and jewelry boxes.
[0003] Before the scattered bead pattern is embroidered by using the embroidery machine, the scattered bead pattern needs to be previewed on the electric control operation head to directly view the finished product effect after the scattered bead pattern is embroidered. However, the current scattered bead pattern is mostly displayed based on lines or simple geometric plane figures, and the display effect is poor. SUMMARY
[0004] The present application provides a scattered bead pattern drawing method, device, equipment and storage medium to solve the problem of poor display effect when the scattered bead pattern is displayed based on lines or simple geometric plane figures.
[0005] In a first aspect, the present application provides a scattered bead pattern drawing method, comprising: obtaining scattered bead attribute parameters and needle trace relative coordinates of scattered beads in a scattered bead pattern to be drawn, the scattered bead attribute parameters comprising scattered bead types, scattered bead colors and scattered bead sizes; obtaining a scattered bead three-dimensional effect drawing according to the scattered bead attribute parameters; determining a scattered bead rotation angle and a drawing position corresponding to the scattered bead three-dimensional effect drawing according to the needle trace relative coordinates; and drawing the scattered bead three-dimensional effect drawing to the drawing position according to the scattered bead rotation angle to obtain a three-dimensional effect drawing corresponding to the scattered bead pattern.
[0006] In a possible implementation manner, the scattered bead rotation angle is determined according to the needle trace relative coordinates, comprising: obtaining absolute coordinates of a needle trace corresponding to the scattered bead according to the needle trace relative coordinates; determining picture coordinates of the needle trace corresponding to the scattered bead according to the absolute coordinates of the needle trace corresponding to the scattered bead; determining a horizontal direction included angle of adjacent needle traces in a picture according to the picture coordinates of the adjacent needle traces, and determining the scattered bead rotation angle as the horizontal direction included angle.
[0007] In a possible implementation manner, the picture coordinates of the needle trace corresponding to the scattered bead are determined according to the absolute coordinates of the needle trace corresponding to the scattered bead, comprising: multiplying the absolute coordinates of the needle trace corresponding to the scattered bead by a proportionality coefficient to obtain the picture coordinates of the needle trace corresponding to the scattered bead, the proportionality coefficient being a ratio of a scattered bead pattern size to a scattered bead pattern drawing area.
[0008] In a possible implementation, the drawing position corresponding to the three-dimensional effect picture of the scattered bead is determined according to the following manner: the middle position of the adjacent stitch is determined as the drawing position corresponding to the three-dimensional effect picture of the scattered bead.
[0009] In a possible implementation, the drawing of the three-dimensional effect picture of the scattered bead to the drawing position according to the rotation angle of the scattered bead includes: adjusting the size of the three-dimensional effect picture of the scattered bead to the product of the size of the scattered bead and the proportionality coefficient, and rotating the three-dimensional effect picture of the scattered bead according to the rotation angle of the scattered bead to obtain an adjusted three-dimensional effect picture of the scattered bead; and drawing the adjusted three-dimensional effect picture of the scattered bead to the drawing position.
[0010] In a possible implementation, the scattered bead pattern drawing method further includes: determining the embroidery progress corresponding to the scattered bead pattern; and in the drawing of the three-dimensional effect picture of the scattered bead, the three-dimensional effect picture of the scattered bead is drawn differently according to the embroidery progress.
[0011] In a possible implementation, the scattered bead pattern drawing method further includes: before the drawing, displaying a setting page for setting the scattered bead attribute parameter; receiving a setting operation of the scattered bead attribute parameter acting on the setting page; and in response to the setting operation, generating the corresponding three-dimensional effect picture of the scattered bead.
[0012] In a second aspect, an embodiment of the present application provides a scattered bead pattern drawing device, including:
[0013] The first obtaining module is configured to obtain the scattered bead attribute parameter and the stitch relative coordinate of the scattered bead in the scattered bead pattern to be drawn, the scattered bead attribute parameter including the scattered bead type, the scattered bead color, and the scattered bead size.
[0014] The second obtaining module is configured to obtain the three-dimensional effect picture of the scattered bead according to the scattered bead attribute parameter.
[0015] The determining module is configured to determine the rotation angle of the scattered bead and the drawing position corresponding to the three-dimensional effect picture of the scattered bead according to the stitch relative coordinate.
[0016] The drawing module is configured to draw the three-dimensional effect picture of the scattered bead to the drawing position according to the rotation angle of the scattered bead, to obtain the three-dimensional effect picture corresponding to the scattered bead pattern.
[0017] In a possible implementation, the determining module is specifically configured to: obtain the absolute coordinate of the stitch corresponding to the scattered bead according to the stitch relative coordinate; determine the picture coordinate of the stitch corresponding to the scattered bead according to the absolute coordinate of the stitch corresponding to the scattered bead; determine the horizontal direction included angle of the adjacent stitch in the picture according to the picture coordinate of the adjacent stitch, and determine the rotation angle of the scattered bead as the horizontal direction included angle.
[0018] In a possible implementation, the determining module can also be configured to: multiply the absolute coordinate of the stitch corresponding to the scattered bead by a proportionality coefficient to obtain the picture coordinate of the stitch corresponding to the scattered bead, the proportionality coefficient being the ratio of the size of the scattered bead pattern to the drawing area of the scattered bead pattern.
[0019] In a possible implementation, the drawing position corresponding to the three-dimensional effect diagram of the scattered beads is determined according to the following manner: determining the middle position of the adjacent stitches as the drawing position corresponding to the three-dimensional effect diagram of the scattered beads.
[0020] In a possible implementation, the drawing module is specifically configured to: adjust the size of the three-dimensional effect diagram of the scattered beads to the product of the size of the scattered beads and the proportion coefficient, and rotate according to the rotation angle of the scattered beads to obtain an adjusted three-dimensional effect diagram of the scattered beads; and draw the adjusted three-dimensional effect diagram of the scattered beads to the drawing position.
[0021] In a possible implementation, the scattered bead pattern drawing apparatus further includes an embroidering module configured to: determine the embroidering progress corresponding to the scattered bead pattern; and perform differential drawing according to the embroidering progress when drawing the three-dimensional effect diagram of the scattered bead pattern.
[0022] In a possible implementation, the scattered bead pattern drawing apparatus further includes a generation module configured to: display a setting page for setting the attribute parameters of the scattered beads before drawing; receive a setting operation of the attribute parameters of the scattered beads acting on the setting page; and generate the corresponding three-dimensional effect diagram of the scattered beads in response to the setting operation.
[0023] In a third aspect, the present application provides an electronic device, including: at least one processor; and a memory connected with the at least one processor; wherein the memory is used to store instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the scattered bead pattern drawing method provided in the first aspect.
[0024] In a fourth aspect, the present application provides a computer readable storage medium, and the computer readable storage medium stores computer execution instructions. When the computer execution instructions are executed, the computer execution instructions are used to implement the scattered bead pattern drawing method provided in the first aspect.
[0025] In a fifth aspect, the present application provides a program product, and the program product contains computer execution instructions. When the computer execution instructions are executed, the computer execution instructions are used to implement the scattered bead pattern drawing method provided in the first aspect.
[0026] The application provides a method and device for drawing a scattered-bead pattern, an apparatus and a storage medium. The method comprises the following steps: obtaining scattered-bead attribute parameters and needle trace relative coordinates of scattered beads in a scattered-bead pattern to be drawn; obtaining a scattered-bead three-dimensional effect diagram according to the scattered-bead attribute parameters, i.e., scattered-bead types, scattered-bead colors and scattered-bead sizes; determining a scattered-bead rotation angle and a drawing position corresponding to the scattered-bead three-dimensional effect diagram according to the needle trace relative coordinates; and drawing the scattered-bead three-dimensional effect diagram to the drawing position according to the scattered-bead rotation angle, so as to obtain a three-dimensional effect diagram corresponding to the scattered-bead pattern. The three-dimensional effect diagram corresponding to the scattered-bead pattern drawn based on the scattered-bead three-dimensional effect diagram can intuitively and realistically show the embroidery effect of the scattered-bead pattern. BRIEF DESCRIPTION OF DRAWINGS
[0027] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0028] Figure 1 A flowchart of a scattered-bead pattern drawing method provided by an embodiment of the application;
[0029] Figure 2 An interface diagram for setting scattered-bead attribute parameters according to scattered-bead types provided by an embodiment of the application;
[0030] Figure 3 An interface diagram for setting scattered-bead attribute parameters provided by an embodiment of the application;
[0031] Figure 4 Shape diagrams corresponding to different types of scattered-bead three-dimensional effect diagrams provided by an embodiment of the application;
[0032] Figure 5 A diagram of a three-dimensional effect diagram corresponding to a scattered-bead pattern provided by an embodiment of the application;
[0033] Figure 6 A flowchart of a scattered-bead pattern drawing method provided by another embodiment of the application;
[0034] Figure 7 An interface diagram in scattered-bead pattern embroidery provided by an embodiment of the application;
[0035] Figure 8 A structural diagram of a scattered-bead pattern drawing device provided by an embodiment of the application;
[0036] Figure 9 A structural diagram of an electronic device provided by an embodiment of the application.
[0037] The specific embodiments of the present application have been shown by the above drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to restrict the scope of the present application in any way, but to illustrate the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0038] The exemplary embodiments will be described in detail herein with reference to the accompanying drawings. In the following description, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments are not representative of all embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0039] First, the terms related to the present application are explained:
[0040] Scattered beads: the material of bead embroidery, bead embroidery is also called bead embroidery, which is to use hollow beads, bead tubes, artificial gems, shiny beads and other materials to embroider on clothes to produce a dazzling effect, which is generally used on stage costumes to add beauty and attractiveness to the clothes, and is also widely used on shoe uppers, bags, jewelry boxes, etc.
[0041] Embroidery pattern: a sample of embroidery, an embroidery machine can embroider various complex embroidery products according to pattern data;
[0042] Rice beads: rice-shaped scattered beads;
[0043] Tubular beads: tubular scattered beads;
[0044] Bubble beads: pearl-shaped scattered beads;
[0045] Diamond beads: diamond-shaped scattered beads.
[0046] Based on the problem that the scattered bead patterns in the related art are mostly based on lines or simple geometric planar patterns for display, and the display effect is poor, the present application preforms various scattered bead corresponding scattered bead three-dimensional effect drawings on the embroidery machine, and sets scattered bead corresponding scattered bead attribute parameters, i.e. scattered bead type, scattered bead color and scattered bead size. When previewing the scattered bead pattern, the scattered bead rotation angle and the drawing position corresponding to the scattered bead three-dimensional effect drawing are calculated according to the needle trace relative coordinates in the scattered bead pattern, and further, the scattered bead three-dimensional effect drawing is drawn to the drawing position according to the scattered bead rotation angle, so as to obtain the three-dimensional effect drawing corresponding to the scattered bead pattern. The three-dimensional effect drawing obtained by drawing can intuitively and realistically display the embroidery effect of the scattered bead pattern.
[0047] In order to facilitate understanding, first, the application scenario of the embodiments of the present application is introduced.
[0048] The application scenario of the embodiment of the present application includes an embroidery machine. Before performing a pattern embroidery, a user needs to preview the pattern on an electric control operating head. The previewed pattern can intuitively show the finished product effect after the pattern embroidery. In the application scenario of the embodiment of the present application, the embroidery machine is mainly used for embroidering a scattered pearl pattern. Before embroidering the scattered pearl pattern, the embroidery machine draws a three-dimensional effect diagram corresponding to the scattered pearl pattern, for the user to preview on the electric control operating head. Specifically, first, the attribute parameters of the corresponding scattered pearls in the scattered pearl pattern are set, and a three-dimensional effect diagram of the scattered pearls is preset in the embroidery machine system based on the attribute parameters of the scattered pearls. Further, the rotation angle of the scattered pearls and the drawing position corresponding to the three-dimensional effect diagram of the scattered pearls are calculated in real time according to the relative coordinates of the stitches in the scattered pearl pattern, and the three-dimensional effect diagram of the scattered pearls is drawn to the drawing position according to the rotation angle of the scattered pearls, to obtain the three-dimensional effect diagram corresponding to the scattered pearl pattern.
[0049] It can be understood that the execution subject provided by the embodiment of the present application can be an embroidery machine.
[0050] Based on the above application scenario, the embroidery machine is taken as the execution subject, and the scattered pearl pattern drawing method provided by the embodiment of the present application will be described in detail in combination with specific embodiments.
[0051] Figure 1 The flowchart of the scattered pearl pattern drawing method provided by an embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the scattered pearl pattern drawing method includes the following steps:
[0052] S101, obtaining the attribute parameters of scattered pearls and the relative coordinates of stitches in a scattered pearl pattern to be drawn, the attribute parameters of the scattered pearls including the type, color and size of the scattered pearls.
[0053] For example, the type of the scattered pearls can be rice beads, tube beads, bubble beads and diamond beads, etc.
[0054] For example, the color of the scattered pearls can be orange, yellow, gray, blue, green, white and purple, etc.
[0055] For example, the size of the scattered pearls can be any size between 2 mm and 12 mm.
[0056] In a possible implementation, the scatter bead attribute parameter of the scatter bead in the scatter bead pattern can be determined according to the scatter bead type determined according to the customer demand in the scatter bead pattern. For example, the scatter bead type can be represented by a capital letter, or represented by a lowercase letter or a number, and the like. For example, when the scatter bead type is represented by A bead-H bead, the corresponding relationship between the scatter bead type and the scatter bead attribute parameter can be as follows: A bead represents 2mm orange bubble beads, B bead represents 2mm red diamond beads, C bead represents 2mm yellow rice beads, D bead represents 2mm blue tube beads, E bead represents 2mm green bubble beads, F bead represents 2mm purple diamond beads, G bead represents 2mm white diamond beads, and H bead represents 2mm orange diamond beads.
[0057] It can be understood that the number of scatter bead types in the scatter bead pattern is determined according to the actual demand of the customer, and the number of scatter bead types in the scatter bead pattern drawing method provided by the embodiment of the present application is not limited.
[0058] Figure 2 The interface diagram provided by the embodiment of the present application for setting the scatter bead attribute parameter according to the scatter bead type is shown in FIG. 6. Figure 2 As shown in the figure, the interface diagram includes the scatter bead type and the editing box 21 for setting the scatter bead attribute parameter corresponding to the scatter bead type. Specifically, the scatter bead type is represented by A-H, and the scatter bead attribute parameter can be set in the corresponding editing box 21. As shown in FIG. 7, Figure 2 The corresponding relationship between the scatter bead type and the scatter bead attribute parameter is similar to the above, which will not be described here.
[0059] Figure 3 The interface diagram provided by the embodiment of the present application for setting the scatter bead attribute parameter is shown in FIG. 8. Figure 3 As shown in the figure, the interface diagram includes the scatter bead size, the scatter bead type and the scatter bead color. Specifically, the scatter bead size can be set in the corresponding editing box 31, and the scatter bead type and the scatter bead color can be set according to the direction selection button 32 of the triangle.
[0060] The stitch relative coordinates can also be called scatter bead codes or scatter bead stitch codes, which represent the relative coordinates of each needle corresponding to the scatter bead drawing.
[0061] In S102, the scatter bead three-dimensional effect diagram is obtained according to the scatter bead attribute parameter.
[0062] Optionally, the scatter bead three-dimensional effect diagram can be drawn based on the hardware and software platform in the embroidery machine, and stored in the embroidery machine system for use when drawing the scatter bead pattern or embroidering the scatter bead pattern.
[0063] Figure 4 The shape diagram corresponding to the different types of scatter bead three-dimensional effect diagrams provided by the embodiment of the present application is shown in FIG. 9. Figure 4As shown, the shape of the solid effect diagram corresponding to the round beads is similar to a rounded cube 41, the shape of the solid effect diagram corresponding to the tube beads is similar to a cuboid 42, the shape of the solid effect diagram corresponding to the drill beads is similar to a cone 43, and the shape of the solid effect diagram corresponding to the ball beads is similar to a sphere 44. It can be understood that, according to different combinations of the type, color and size of the scattering beads, a plurality of different solid effect diagrams of the scattering beads can be obtained. The scattering bead drawing method provided in the embodiments of the present application does not limit the types of the solid effect diagrams of the scattering beads.
[0064] In a possible implementation manner, the obtaining of the solid effect diagram of the scattering beads according to the scattering bead attribute parameter can include the following steps: displaying a setting page for setting the scattering bead attribute parameter before drawing, receiving a setting operation of the scattering bead attribute parameter acting on the setting page, and generating the corresponding solid effect diagram of the scattering beads in response to the setting operation. It should be noted that the solid effect diagram of the scattering beads in the scattering bead pattern drawing method provided in the embodiments of the present application can be generated in real time.
[0065] In another possible implementation manner, the solid effect diagram of the scattering beads can be obtained from the embroidery machine system according to the scattering bead attribute parameter.
[0066] S103, determining the scattering bead rotation angle and the drawing position corresponding to the solid effect diagram of the scattering beads according to the needle trace relative coordinates.
[0067] The scattering bead rotation angle is the angle at which the scattering beads need to be rotated when drawing the scattering bead pattern. The scattering bead drawing position is the specific drawing position of the scattering beads in the solid effect diagram corresponding to the scattering bead pattern.
[0068] The determination of the scattering bead rotation angle and the drawing position corresponding to the solid effect diagram of the scattering beads according to the needle trace relative coordinates will be described in detail below in combination with specific embodiments.
[0069] S104, drawing the solid effect diagram of the scattering beads to the drawing position according to the scattering bead rotation angle to obtain the solid effect diagram corresponding to the scattering bead pattern.
[0070] Optionally, the size of the solid effect diagram of the scattering beads is adjusted to the product of the size of the scattering beads and the proportionality coefficient, and the solid effect diagram of the scattering beads is rotated according to the scattering bead rotation angle to obtain an adjusted solid effect diagram of the scattering beads, and the adjusted solid effect diagram of the scattering beads is drawn to the drawing position. The proportionality coefficient is the ratio of the size of the scattering bead pattern to the drawing area of the scattering bead pattern.
[0071] Figure 5 A schematic diagram of the solid effect diagram corresponding to the scattering bead pattern provided in the embodiments of the present application is shown in FIG. 4. As shown in FIG. 4, the shape of the solid effect diagram corresponding to the round beads is similar to a rounded cube 41, the shape of the solid effect diagram corresponding to the tube beads is similar to a cuboid 42, the shape of the solid effect diagram corresponding to the drill beads is similar to a cone 43, and the shape of the solid effect diagram corresponding to the ball beads is similar to a sphere 44. Figure 5As shown, the three-dimensional effect diagram corresponding to the scattered bead pattern can intuitively display the scattered bead pattern. It should be noted that, in the scattered bead pattern drawing method provided by the embodiment of the present application, the color of the scattered bead in the three-dimensional effect diagram corresponding to the scattered bead pattern drawn is consistent with the scattered bead color in the set scattered bead attribute parameter, Figure 5 In the embodiment, the scattered bead color is not embodied.
[0072] In the embodiment, the scattered bead color is not embodied.
[0072] In the embodiment, the scattered bead color is not embodied.
[0073] Based on the above embodiment, the following will be combined with Figure 6 The step S103 of determining the scattered bead rotation angle according to the needle trace relative coordinates will be described in detail.
[0074] Figure 6 The flow chart of the scattered bead pattern drawing method provided by another embodiment of the present application is shown in FIG. 6. Figure 6 As shown, the step of determining the scattered bead rotation angle according to the needle trace relative coordinates can further include the following steps:
[0075] S601, obtaining the absolute coordinates of the needle trace corresponding to the scattered bead according to the needle trace relative coordinates.
[0076] Optionally, the absolute coordinates of the needle trace corresponding to the scattered bead can be obtained by summation of the needle trace relative coordinates. For example, the absolute coordinates of the current needle of the scattered bead can be the sum of the absolute coordinates of the previous needle of the scattered bead and the relative coordinates of the current needle.
[0077] S602, determining the picture coordinates of the needle trace corresponding to the scattered bead according to the absolute coordinates of the needle trace corresponding to the scattered bead.
[0078] Optionally, the absolute coordinates of the needle trace corresponding to the scattered bead are multiplied by a proportionality coefficient to obtain the picture coordinates of the needle trace corresponding to the scattered bead, wherein the proportionality coefficient is the ratio of the size of the scattered bead pattern to the drawing area of the scattered bead pattern.
[0079] It can be understood that the picture coordinates corresponding to the scattered bead are the position coordinates in the three-dimensional effect diagram of the scattered bead.
[0080] S603, determining the horizontal direction angle of the adjacent needle traces in the picture according to the picture coordinates of the adjacent needle traces.
[0081] Exemplarily, the adjacent needle trace can be the current needle and the last needle.
[0082] Optionally, an angle in a horizontal direction between the picture coordinate of the current needle and the picture coordinate of the last needle is calculated.
[0083] S604, the rotation angle of the scattered beads is determined as the angle in the horizontal direction.
[0084] In the embodiment of the present application, the absolute coordinates of the needle trace corresponding to the scattered beads are obtained according to the relative coordinates of the needle trace, the picture coordinates of the needle trace corresponding to the scattered beads are determined according to the absolute coordinates of the needle trace corresponding to the scattered beads, the angle in the horizontal direction of the adjacent needle trace in the picture is determined according to the picture coordinates of the adjacent needle trace, and the rotation angle of the scattered beads is determined as the angle in the horizontal direction. The rotation angle of the scattered beads is calculated according to the relative coordinates of the needle trace corresponding to the scattered beads, so that the three-dimensional effect diagram of the scattered beads is more intuitive and the display effect is more realistic.
[0085] Optionally, in the scattered bead pattern drawing method provided by the embodiment of the present application, the drawing position corresponding to the three-dimensional effect diagram of the scattered beads is determined according to the following manner: the middle position of the adjacent needle trace is determined as the drawing position corresponding to the three-dimensional effect diagram of the scattered beads. Specifically, the middle position of the adjacent needle trace can be the middle coordinate between the picture coordinates corresponding to the adjacent needle trace.
[0086] It should be noted that the scattered bead pattern drawing method provided by the embodiment of the present application can also be used to determine the embroidery progress corresponding to the scattered bead pattern. In one possible implementation, the embroidery progress corresponding to the scattered bead pattern is determined, and when drawing the three-dimensional effect diagram of the scattered bead pattern, the embroidery progress is used for different drawing.
[0087] Exemplarily, the embroidery progress corresponding to the scattered bead pattern can be starting to embroider the scattered bead pattern, being in the process of embroidering the scattered bead pattern, and completing the embroidery of the scattered bead pattern.
[0088] Exemplarily, when drawing the three-dimensional effect diagram of the scattered bead pattern, when the embroidery progress is starting to embroider the scattered bead pattern, the color of the scattered beads in the three-dimensional effect diagram of the scattered bead pattern is drawn as the original color or a transparent color; when the embroidery progress is in the process of embroidering the scattered bead pattern, the color of the scattered beads that have completed the embroidery in the three-dimensional effect diagram of the scattered bead pattern is drawn according to the color corresponding to the three-dimensional effect diagram of the scattered beads; and when the embroidery progress is completing the embroidery of the scattered bead pattern, the color of all the scattered beads in the three-dimensional effect diagram of the scattered bead pattern is drawn according to the color corresponding to the three-dimensional effect diagram of the scattered beads.
[0089] In another possible implementation, the embroidery progress of the scattered bead pattern can also be determined according to the progress bar displayed on the interface diagram.
[0090] Figure 7 The interface diagram in the process of embroidering the scattered bead pattern provided by the embodiment of the present application is shown in FIG. 5. Figure 7As shown, the arrow indicates the direction of embroidering, that is, counterclockwise, the white cross 71 indicates the position being embroidered, the scattered beads shown in the black rectangular frame 72 indicate the completed embroidery, and the dashed line frame 73 indicates the progress bar of the embroidery. As can be seen from the figure, the current scattered bead pattern embroidery has been completed 31%. It should be noted that the color of the scattered bead in the black rectangular frame 72 that has completed the embroidery is drawn according to the scattered bead color in the set scattered bead attribute parameter, Figure 7 The scattered bead color is not embodied in the middle, and the color of the scattered bead being embroidered is drawn in gray.
[0091] The following is an embodiment of the device of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0092] Figure 8 The structure schematic diagram of the scattered bead pattern drawing device provided by an embodiment of the present application is shown in FIG. 8. Figure 8 As shown, the scattered bead pattern drawing device 80 includes a first acquisition module 810, a second acquisition module 820, a determination module 830, and a drawing module 840.
[0093] The first acquisition module 810 is configured to acquire the scattered bead attribute parameters and the needle trace relative coordinates of the scattered beads in the scattered bead pattern to be drawn, the scattered bead attribute parameters including the scattered bead type, the scattered bead color, and the scattered bead size; the second acquisition module 820 is configured to acquire the scattered bead three-dimensional effect picture according to the scattered bead attribute parameters; the determination module 830 is configured to determine the scattered bead rotation angle and the drawing position corresponding to the scattered bead three-dimensional effect picture according to the needle trace relative coordinates; and the drawing module 840 is configured to draw the scattered bead three-dimensional effect picture to the drawing position according to the scattered bead rotation angle, to obtain the three-dimensional effect picture corresponding to the scattered bead pattern.
[0094] In a possible implementation manner, the determination module 830 is specifically configured to: obtain the absolute coordinates of the needle trace corresponding to the scattered bead according to the needle trace relative coordinates; determine the picture coordinates of the needle trace corresponding to the scattered bead according to the absolute coordinates of the needle trace corresponding to the scattered bead; determine the horizontal direction included angle of the adjacent needle traces in the picture according to the picture coordinates of the adjacent needle traces, and determine the scattered bead rotation angle as the horizontal direction included angle.
[0095] In a possible implementation manner, the determination module 830 can also be configured to: multiply the absolute coordinates of the needle trace corresponding to the scattered bead by a proportionality coefficient to obtain the picture coordinates of the needle trace corresponding to the scattered bead, the proportionality coefficient being the ratio of the scattered bead pattern size to the scattered bead pattern drawing area.
[0096] In a possible implementation manner, the drawing position corresponding to the scattered bead three-dimensional effect picture is determined according to the following manner: determining the middle position of the adjacent needle traces as the drawing position corresponding to the scattered bead three-dimensional effect picture.
[0097] In a possible implementation, the drawing module 840 is specifically configured to: adjust the size of the three-dimensional effect picture of the scattered beads to a product of the size of the scattered beads and the scale factor, and rotate the three-dimensional effect picture of the scattered beads according to the rotation angle of the scattered beads to obtain an adjusted three-dimensional effect picture of the scattered beads; and draw the adjusted three-dimensional effect picture of the scattered beads to the drawing position.
[0098] In a possible implementation, the scattered bead pattern drawing apparatus further includes an embroidering module (not shown) configured to: determine an embroidering progress corresponding to the scattered bead pattern; and draw the three-dimensional effect picture of the scattered bead pattern in a differentiated manner according to the embroidering progress.
[0099] In a possible implementation, the scattered bead pattern drawing apparatus further includes a generation module (not shown) configured to: before drawing, display a setting page for setting a scattered bead attribute parameter; receive a setting operation of the scattered bead attribute parameter acting on the setting page; and in response to the setting operation, generate a corresponding three-dimensional effect picture of the scattered beads.
[0100] The apparatus provided by the embodiments of the present application can be used to execute the method steps provided by the method embodiments, and has similar implementation principles and technical effects, which will not be repeated here.
[0101] It should be noted that the division of each module of the above apparatus is only a logical function division, and all or part of the modules can be integrated into one physical entity, or can be physically separated. The modules can all be implemented in the form of software invoked by a processing element; or all be implemented in the form of hardware; or part of the modules are implemented in the form of software invoked by a processing element, and part of the modules are implemented in the form of hardware. For example, the processing module can be a separately established processing element, or can be integrated into a chip of the above apparatus, and in addition, the processing module can be stored in the form of program code in the memory of the above apparatus, and the functions of the processing module are invoked and executed by a processing element of the above apparatus. The implementation of other modules is similar. In addition, all or part of the modules can be integrated together, or can be independently implemented. The processing element herein can be an integrated circuit having a signal processing capability. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware or an instruction in the form of software in the processing element.
[0102] For example, the above modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when a certain module above is implemented by a form of processing element scheduling code, the processing element can be a general purpose processor, such as a Central Processing Unit (CPU) or other processor capable of invoking code. For another example, the modules can be integrated together to implement in a form of System-On-a-Chip (SOC).
[0103] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as Digital Video Disc (DVD)) or semiconductor media (such as solid state disk (SSD)) and the like.
[0104] Figure 9 The structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the electronic device includes a processor 100, a memory 200, a communication interface 300, and a bus 400. Figure 9As shown, the electronic device 90 includes at least one processor 910, a memory 920, a communication interface 930, and a system bus 940. The memory 920 and the communication interface 930 are connected with the processor 910 through the system bus 940 and complete communication with each other, the memory 920 is configured to store instructions, the communication interface 930 is configured to communicate with other devices, and the processor 910 is configured to invoke the instructions in the memory to perform the method steps provided in the above method embodiments, and the specific implementation manners and technical effects are similar, which will not be described here.
[0105] The Figure 9 The system bus 940 mentioned in the above embodiment can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus 940 can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0106] The communication interface 930 is configured to realize communication between the database access device and other devices (for example, a client, a read-write library, and a read-only library).
[0107] The memory 920 can include a Random Access Memory (RAM) and can also include a non-volatile memory, for example, at least one disk memory.
[0108] The processor 910 can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0109] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores computer execution instructions. When the computer execution instructions are executed by a processor, the computer execution instructions are configured to realize the method steps in the above method embodiments, and the specific implementation manners and technical effects are similar, which will not be described here.
[0110] The embodiment of the present application further provides a program product containing computer execution instructions. When the computer execution instructions are executed, the method steps in the method embodiment described above are implemented, and the specific implementation manners and technical effects are similar, and thus are not described here.
[0111] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0112] It should be understood that the application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the appended claims.
[0113] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose authorization or refusal.
Claims
1. A method for drawing a scattered bead pattern, characterized in that, include: Obtain the scattered bead attribute parameters and stitch relative coordinates of the scattered beads in the scattered bead pattern to be drawn. The scattered bead attribute parameters include scattered bead type, scattered bead color, and scattered bead size. Based on the scattered bead attribute parameters, obtain the 3D effect image of the scattered beads; Based on the relative coordinates of the needle marks, determine the rotation angle of the loose beads and the drawing position corresponding to the three-dimensional effect of the loose beads; The size of the three-dimensional effect image of the scattered beads is adjusted to the product of the size of the scattered beads and the scale coefficient, and rotated according to the rotation angle of the scattered beads to obtain the adjusted three-dimensional effect image of the scattered beads. The adjusted three-dimensional effect image of the scattered beads is drawn to the drawing position to obtain the three-dimensional effect image corresponding to the scattered bead pattern. Determine the rotation angle of the loose beads based on the relative coordinates of the needle marks, including: Based on the relative coordinates of the stitches, the absolute coordinates of the stitches corresponding to the loose beads are obtained; Multiply the absolute coordinates of the stitch corresponding to the scattered beads by a scaling factor to obtain the image coordinates of the stitch corresponding to the scattered beads. The scaling factor is the ratio of the size of the scattered bead pattern to the area where the scattered bead pattern is drawn. Determine the horizontal angle between adjacent stitches in the image based on their image coordinates. The rotation angle of the loose beads is determined to be the included angle in the horizontal direction; The drawing position corresponding to the three-dimensional effect of the scattered beads is determined according to the following method: the middle position of the adjacent stitches is determined as the drawing position corresponding to the three-dimensional effect of the scattered beads.
2. The method for drawing scattered bead patterns according to claim 1, characterized in that, Also includes: Determine the embroidery progress corresponding to the scattered bead pattern; When drawing the three-dimensional effect diagram of the scattered bead pattern, the drawing is differentiated according to the progress of the embroidery.
3. The method for drawing scattered bead patterns according to claim 1, characterized in that, Also includes: Before drawing, a settings page is displayed to set the attribute parameters of the scattered beads; Receive setting operations on the scattered bead attribute parameters applied to the settings page; In response to the setting operation, a corresponding 3D effect image of scattered beads is generated.
4. A device for drawing scattered bead patterns, characterized in that, include: The first acquisition module is used to acquire the scattered bead attribute parameters and the relative coordinates of the stitches of the scattered beads in the scattered bead pattern to be drawn. The scattered bead attribute parameters include the scattered bead type, scattered bead color and scattered bead size. The second acquisition module is used to acquire a three-dimensional effect image of the scattered beads based on the attribute parameters of the scattered beads; The determining module is used to determine the rotation angle of the loose beads and the drawing position corresponding to the three-dimensional effect of the loose beads based on the relative coordinates of the needle stitches. The drawing module is used to adjust the size of the three-dimensional effect image of the scattered beads to the product of the size of the scattered beads and the proportion coefficient, and rotate it according to the rotation angle of the scattered beads to obtain the adjusted three-dimensional effect image of the scattered beads. The adjusted three-dimensional effect image of the scattered beads is drawn to the drawing position to obtain the three-dimensional effect image corresponding to the scattered bead pattern. The determining module is used for: Determine the rotation angle of the loose beads based on the relative coordinates of the needle marks, including: Based on the relative coordinates of the stitches, the absolute coordinates of the stitches corresponding to the loose beads are obtained; Multiply the absolute coordinates of the stitch corresponding to the scattered beads by a scaling factor to obtain the image coordinates of the stitch corresponding to the scattered beads. The scaling factor is the ratio of the size of the scattered bead pattern to the area where the scattered bead pattern is drawn. Determine the horizontal angle between adjacent stitches in the image based on their image coordinates. The rotation angle of the loose beads is determined to be the included angle in the horizontal direction; The determining module is specifically used to determine the middle position of the adjacent stitches as the drawing position corresponding to the three-dimensional effect of the scattered beads.
5. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory is used to store instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the bead pattern drawing method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method for drawing scattered bead patterns as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Three-dimensional dwelling size modeling method based on two-dimensional dwelling size diagram
CN101930627A