Data generator, computer readable recording medium, and sewing machine

A data generator includes a memory and a processor. The memory may store a plurality of predetermined colors. The processor may control the data generator to assign a color, to display an embroidery pattern, to designate a color of the thread color data, and to allocate the designated color. The color, which is extracted randomly from the plurality of predetermined colors, may be assigned as a thread color data of each of a plurality of color-based pattern portions. The embroidery pattern may be displayed to a screen with the color assigned to each of the plurality of color-based pattern portions. The color of the thread color data designated from each of the plurality of color-based pattern portions may be included in the displayed embroidery pattern. The designated color may be allocated with priority over the plurality of predetermined colors for each of the plurality of color-based pattern portions.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority from the prior Japanese Patent Application 2011-174907, filed on, Aug. 10, 2011, the entire contents of which are incorporated herein by reference.

FIELD

The disclosure relates to a data generator that may generate embroidery data of an embroidery pattern including a plurality of color-based pattern portions, a computer readable recording medium storing a program which generates data for embroidery, and a sewing machine that may sew the embroidery pattern based on the embroidery data.

BACKGROUND

Conventionally, sewing machines, which sew the embroidery pattern based on the embroidery data, have been known. For the sewing machines, the embroidery data may be stored in storage devise in the sewing machines or external storage devise such as ROM (Read Only Memory) cards or flexible disks. Users may select a desirable embroidery pattern from a plurality of embroidery patterns. The sewing machines load the selected embroidery data to stitch the embroidery pattern to a fabric.

The embroidery pattern includes a plurality of pattern-by-color portions. The embroidery data of the embroidery pattern includes thread color data which identify a color of the pattern-by-color portion. Each of the plurality of pattern-by-color portions is sewn by the thread color which is predetermined as the thread color data. If a color of each of the plurality of pattern-by-color portions is analogous to a color of the fabric, it would be difficult to distinguish the pattern-by-color portion from the fabric. Specifically, in the case that an embroidery pattern of a flower is sewn into a fabric with the same color as that of the pattern-by-color portion of a petal of the flower, it would be difficult to distinguish the petal from the fabric. Thus, the embroidery pattern would be strange because of the lack of the petal.

Some data generators may store coloring data which represent combinations of preferable colors. The data generators may set a color of the thread color data of the pattern-by-color portion based on the coloring data and the fabric data which represent a color of the fabric. The data generators may determine the pattern-by-color portion in the color of the embroidery pattern unambiguously based on the color of the fabric and the coloring data. Some user may prefer to sew each of the plurality of pattern-by-color portions with a preferable color or a strange color rather than with a predetermined color. However, setting a color of the embroidery pattern preferably would be troublesome because it is required to load data of the pattern-by-color portion and to confirm and designate corresponding thread color data.

SUMMARY

The disclosure may provide a data generator, a non-transitory computer readable recording medium storing computer readable instructions, and a sewing machine that may obtain an embroidery pattern which includes various color patterns based on colors preferred by a user.

A data generator includes a memory and a processor. The memory may store a plurality of predetermined colors. The processor may control the data generator to assign a color, to display an embroidery pattern, to designate a color of the thread color data, and to allocate the designated color. The color, which is extracted randomly from the plurality of predetermined colors, may be assigned as a thread color data of each of a plurality of color-based pattern portions. The embroidery pattern may be displayed to a screen with the color assigned to each of the plurality of color-based pattern portions. The color of the thread color data designated from each of the plurality of color-based pattern portions may be included in the displayed embroidery pattern. The designated color may be allocated with priority over the plurality of predetermined colors for each of the plurality of color-based pattern portions.

DETAILED DESCRIPTION

One embodiment of the disclosure is exemplified through a household sewing machine hereinafter referred to as a sewing machine M and will be described in detail with reference toFIGS. 1 to 16.

Referring toFIG. 1, the sewing machine M is primarily configured by a bed1, a pillar2, and an arm3that are structurally integral. The pillar2extends upward from the right end of the laterally oriented bed1. The arm3extends leftward from the upper portion of the pillar2and contains a laterally extending main shaft not shown of the sewing machine and a sewing machine motor4shown inFIG. 4that drives the main shaft in rotation. Description will be given hereinafter with an assumption that the direction in which the user/operator positions himself/herself to face the sewing machine M is the forward direction and the opposite side, naturally, is the rear direction. Further, the direction in which the pillar2is located relative to the center of the bed1is assumed as the rightward direction and the opposite side, is assumed as the left direction.

At one end of the arm3distal from the pillar2, a needle bar5aand a presser bar not shown are provided. The needle bar5ahas a sewing needle5attached to it whereas the presser bar has a presser foot6attached to it. Though not shown, the arm3further contains components such as a needle-bar drive mechanism, a needle-bar swing mechanism, a thread take-up drive mechanism, and a presser-bar drive mechanism. The needle-bar drive mechanism moves the needle bar5aup and down through the rotation of the main shaft. The needle-bar swing mechanism swings the needle bar5ain a direction orthogonal to the direction in which the fabric is fed. In the present embodiment, the needle bar5ais swung in the left and right direction. The thread take-up drive mechanism drives the thread-take up and down in synchronism with the up and down movement of the needle bar5a. The presser-bar drive mechanism drives the presser bar up and down.

At the upper portion of the arm3, an openable/closable cover3ais provided that, when opened, reveals a slot10adefined on the forward mid portion of the arm3for storing a thread spool10. Needle thread drawn from the thread spool10is engaged with a number of components such as the thread take-up that define a thread passageway to be ultimately supplied to the sewing needle5.

On the front side of the arm3, various operation switches such as a start/stop switch8afor starting and stopping a sewing operation is provided as well as a speed adjustment dial8bfor setting the sewing speed, in other words, the speed of rotation of the main shaft.

On the front face of the pillar2, a sizable and vertically elongate liquid crystal display9capable of displaying in full color is provided, which is hereinafter simply referred to as an LCD9. The LCD9displays various information such selection of patterns/stitches including embroidery patterns and utility stitches, names of various functionalities to be executed in a sewing operation, and user interfaces such as screens such as those shown inFIG. 5for setting the colors to be applied to the embroidery patterns as will be later described. On the front face of the LCD9, a touch panel9ais provided as shown inFIG. 2that has multiple touch keys comprising transparent electrodes and touch keys. The touch keys are depressed by the user's fingers or a touch pen not shown for selecting embroidery patterns to be sewn, giving instructions for executing the desired function, and setting various parameters, etc.

On the right side surface of the pillar2, a card slot12is provided for insertion of a memory card11only shown inFIG. 2that stores data such as embroidery data for various types of embroidery patterns.

On the upper surface of the bed1, a needle plate not shown is provided. Within the bed1below the needle plate components such as a cloth feed mechanism, a horizontal shuttle mechanism, and a thread cutter are provided neither of which are shown. The cloth feed mechanism drives a feed dog up and down and backend forth. The horizontal shuttle mechanism contains a bobbin and forms stitches in cooperation with a sewing needle5. The thread cutter mechanism cuts a needle thread and a bobbin thread.

The bed1allows detachable attachment of an embroidery frame transfer device13at its left end. The embroidery frame transfer device13is primarily configured by a body14and a movable section15. The body14is substantially level with the upper surface of the bed1when the embroidery frame transfer device13is attached to the bed1. The movable member15is provided on the upper surface of the body14so as to be movable in the left and right direction over the body14. The embroidery frame transfer device13is further provided with a carriage17, an X-direction transfer mechanism and a Y-direction transfer mechanism that are neither shown. The carriage17is attached to the movable member15so as to be movable in the front and rear direction relative to the movable member15and allows detachable attachment of an embroidery frame16which holds a fabric CL to be sewn. The X-direction transfer mechanism drives the carriage17as well as the movable member15in the left and right direction. The Y-direction transfer mechanism drives the carriage17in the front and rear direction. The X- and Y-direction transfer mechanisms are each provided with a dedicated motor later described, which are identified as an X-axis motor18and a Y-axis motor19shown inFIG. 2, to drive the carriage17holding the embroidery frame16in the X and Y directions respectively. In the present embodiment, the X direction indicates the left and right direction and the Y direction indicates the forward and rear direction.

Next, a description will be given on a control system of the sewing machine M with reference to the block diagram ofFIG. 2.

A controller21is primarily configured by a microcomputer including a CPU22, a ROM23, a RAM24, a card slot12, an input interface27a, an output interface27b, and a bus28that interconnects the foregoing elements. The input interface27aestablishes connection with components such as a start/stop switch8aand a touch panel9a, whereas the output interface27bestablishes connection with components such as sewing machine motor4, an X-axis motor18, a Y-axis motor19, the LCD9and drive circuits31,32,33, and34that drive the foregoing components, respectively. The controller21, the LCD9, and the drive circuit34are examples of a display unit. Components such as the controller21, the touch panel9a, the LCD9, and the drive circuit34constitute embroidery data generator30.

The ROM23pre-stores items such as embroidery data, a sewing control program, a master thread information table, and a display control program that controls the LCD9. The master thread information table contains all the information pertaining to types of threads used in embroidering such as the later described color information, and product ID. The ROM23further stores an embroidery data processing program which makes the computer function as a processing unit for generating embroidery data. The foregoing programs and data may be stored in an internal storage such as an EEPROM25or an external storage such as a memory card11. In case the embroidery data processing program is stored in the external storage, the controller21executes the program by loading it into the RAM24.

The RAM24is provided with a storage area for temporarily storing items such as the above described programs, data, various settings made through the touch panel9a, and the result of calculation by the controller21.FIG. 3exemplifies the RAM24provided with storage areas such as a program storage area241, a settings storage area242, an embroidery data storage area243, a flag storage area244, a sewing condition storage area245, image display data storage area246, a color information storage area247, a repository storage area248, and an extraction data storage area249.

The program storage area241stores various programs read from sources such as the ROM23. The settings storage242stores settings and look-up tables being referred during program execution. The embroidery data storage area243stores the source data on which the embroidery data generation is based. The flag storage area244stores various flags used during program execution. The sewing condition storage area245stores various conditions applied when sewing a given embroidery pattern. The image display data storage area246stores image data and settings of the screens to be displayed on the LCD9.

The color information storage area247is an area for storing data used in coloring the embroidery patterns and stores information such as the later described palette table containing palette-based color numbers. As later described in detail, the repository storage area248stores the colors designated by the user from the color-based pattern portions of the embroidery pattern. The extraction data storage area249is a primary storage area for storing colors randomly extracted from the palette table. The RAM24provided with the repository storage area248is one example of a second storage.

Next, an embroidery pattern in the context of the disclosure will be described through an example of an embroidery pattern40displayed on a screen103shown on LCD9, which is an illustration of a flower. The embroidery pattern40comprises n number of color-based pattern portions identified as a first pattern portion401to nth pattern portion40n. More specifically, the first pattern portion901that represent the petals of the flower are sewn in red, the second pattern portion402that represent the leaves are sewn in yellow, and the third pattern portion403that represent the stems are sewn in green. As described above, the pattern portions401to40nare color-based pattern portions that are each assigned a color. The colors assigned to each of the pattern portions401to40nneed not be unique.

The embroidery data is used to sew embroidery patterns with the sewing machine M and comprises multiplicity of color-based pattern portion data for each embroidery pattern. Referring toFIG. 4, for instance, the embroidery data of the embroidery pattern40contains multiplicity of needle drop data specified for each of the pattern portions401to40n, sewing sequence data specifying the sequence in which the pattern portions401to40nare sewn as indicated as “PATTERN1, . . . , PATTERN N”, and thread color data. The thread color data is data appended to assign a color to each color-based pattern portion and the color is assigned from the collection of color information by a later described assigning unit.

Still referring toFIG. 4, “PATTERN1” appearing in the top row of the first pattern portion indicates the sewing sequence data that identifies the first sewn pattern portion and “RED” is the color data indicating the color in which the pattern portion is to be sewn, which is specified by color models such as RGB values in implementation. The needle drop data “Xa0, Ya0” . . . “XaN, YaN” indicate the coordinates in which the sewing needle5carrying the red thread color is to be struck in the specified sequence. The pattern portion data sewn second in sequence and onwards similarly contain: the sewing sequence data which range, in this case, from “PATTERN2” to “PATTERN n”; the thread color data ranging from “lime green” to “yellow”; and the needle drop data ranging from “XbN, YbN” to “XnN, YnN”. The embroidery data also contains image data, such as bmp data not shown, that are to be displayed on the LCD9, and the image of the embroidery pattern appears on the LCD9in the color assigned by the thread color data.

The EEPROM25stores color information from which a color is assigned to the embroidery data in the form of thread color data. The EEPROM25is one example of a first storage. The color information pertains, for example, to the colors of threads wound on thread spools10which are made available for use with the sewing machine M and is pre-defined in RGB values. In the present embodiment, some of the color information stored in the EEPROM25is implemented as a first palette table which contains information for producing a first color palette56ashown inFIG. 6. The first palette table contains RGB values of 64 colors and palette-based color numbers 1 to 64 associated with each RGB value. Apart from the first palette table, the EEPROM25further implements some of the color information as a second palette table which stores information of colors pre-selected by the user from the color information. The second palette table contains information for producing a second color palette56bshown inFIG. 7. The second palette table is a custom palette table which may be edited by the user to contain RGB values and their associated palette-based color numbers for a maximum of 300 colors.

The present embodiment further employs HSV color model which is a different representation of RGB values. HSV stands for Hue, Saturation, and Value and HSV value is calculated by the controller21based on RGB values by applying known calculation methods. Hue H indicates the type of color such as red, purple, and blue, and is represented by a numerical range of 0 to 360. Saturation S indicates the vividness of the color and is represented by a numerical range of 0.0 to 1.0. Value V indicates the brightness of the color and is represented by a numerical range of 0.0 to 1.0.

The color information may be categorized by type such as “Vivid”, “Soft”, and “Gradation” as shown inFIG. 5. Each category of the color information is distinguished by threshold values represented by HSV values.

For instance, the “Vivid” category is established by setting threshold Svfor saturation S as indicated in step D2ofFIG. 16. The “Vivid” category contains the color information having saturation S greater than threshold Sv. The colors categorized as “Vivid” have a vivid tone and have a relatively high level of saturation. The “Soft” category is established by setting a range of saturation S defined by upper limit SS1and lower limit SS2as indicated in step D2. The colors categorized as “Soft” do not vary significantly in their level of saturation and generally give a soft impression. The “Gradation” category is established by setting a range of Hue H thresholds HG1to HG2centering on Hue H of a certain color as indicated in step C2ofFIG. 15. The colors categorized as “Gradation” thus, show a gradation of a given color such as purple ranging between threshold HG1which may correspond to red and threshold H2which may correspond to blue. Each of the above described thresholds Sv, SS2, HG1and HG2are stored in the EEPROM25.

By depressing, or also hereinafter touching, either of the touch keys51bto51dassociated with the categories “vivid”, “Soft”, and “Gradation”, a coloring mode is specified which extracts colors according to the selected category. In contrast, touching the key51aassociated with the “Random” category specifies a coloring mode in which colors are selected from multiplicity of colors spanning across different categories. As will be later described in detail, each of the coloring modes associated with keys51ato51dexecutes an assignment process that randomly extracts and assigns a color for each thread color data of the color-based pattern portion.

The controller21is configured to generate a random number in the aforementioned assignment process by executing a program function which takes the maximum palette-based color number as a parameter and generates a random number falling within the range of the palette-based color number. For example, a random number is generated that ranges from 1 to 64 based on the first palette table. The controller21searches the palette-based color number within the first palette table that matches the generated random number and extracts information such as the RGB value associated with the matching palette-based color number. Thus, a color is randomly selected from 64 cells of the first color palette56a, each cell representing 1 of the 64 colors.

Next, a description will be given with reference toFIGS. 5 and 12on the screens displayed on the LCD9during the generation of embroidery data and particularly during the coloring of the thread color data.FIGS. 5 to 12illustrate screens100to104displayed on the LCD9. Because the LCD9is a color display, contents of screens100to104such as embroidery pattern images and the first and second color palettes56aand56bcan be displayed in various colors.

FIG. 5exemplifies a coloring mode selection screen100used for coloring the embroidery data being generated. The coloring mode selection screen100comprises a preview image area50that displays a preview image, a mode specifier51, a thread color data display area52, a color count specifier53, and palette selection keys54aand54b. A preview image is an image of the end result of an embroidery operation performed based on the embroidery data corresponding to the embroidery pattern selected by the user.

The mode specifier51is provided with keys51ato51deach associated with either of the “Random”, “Vivid”, “Soft”, and “Gradation” modes discussed above. The color count specifier53is provided with plus and minus keys that, when touched, increments or decrements the total number of colors to be used as the thread color data of the embroidery data. For instance, when only 6 colors are specified by the color count specifier53, the embroidery pattern is colored with only 6 colors. Touching the palette selection keys54aor54binvokes the first color edit screen101A or the second color edit screen101B.

As shown inFIG. 6, the first color edit screen101A comprises a shuffle key55and the first color palette56ain addition to components such as the preview image area50and the thread color data display area52. The thread color display area52provides a list of colors, along with icons of thread spools52arepresenting the listed color, that are associated with the color-based pattern portions of the embroidery pattern displayed in the preview image area50as well as the sewing time allocated for each of the color-based pattern portions. The first color palette56acontains 64 cells of colors arranged in 8 rows with each row containing 8 cells. Each of the 64 cells is assigned a palette-based color number of the first color palette56a. For example, the 8 cells in the topmost row is assigned an RGB value of the palette-based color number1to8defined in the first palette table starting from the leftmost cell. The rest of the rows are numbered in similar manner up to number64. Thus, the first color palette56acontains 64 colors representing the color information contained in the first color table.

Referring now toFIG. 7, the second color edit screen101B comprises the preview image area50just like the first color edit screen101A and is provided with the second color palette56binstead of the first color palette56a. The second color palette56brepresents the second palette table and is capable of accommodating a maximum of 300 colors into 300 cells each associated with the RGB values of the color information. The second color palette56bcorresponds to the aforementioned custom palette table.FIG. 7partially shows 50 out of the 300 cells of the second color palette56b. The first and second color edit screens101A and101B are switched interchangeably by operating the pair of palette selection keys54aand54b. By operating the shuffle key55, the process flow returns to the coloring mode selection screen100.

In the coloring mode selection screen100, either of the keys51ato51dassociated with the coloring modes “Random”, “Vivid”, “Soft”, and “Gradation” desired by the user is touched to execute the color assignment in the selected coloring mode. Responsively, a thumbnail screen102A shown inFIG. 8is displayed.

The thumbnail screen102A comprises: an embroidery pattern selection area61which displays multiple embroidery patterns, such as 6 in number, a return key62, a repository key63, and a refresh key64. The embroidery pattern selection area61displays shrunk thumbnail images61aof embroidery patterns having unique combination of colors which were randomly assigned as the thread color data. Touching the refresh key61renews the color assignment of the thread color data and 6 new embroidery patterns are displayed in addition to the 6 embroidery patterns currently displayed.

FIG. 9illustrates the 6 new embroidery patterns displayed on a new thumbnail screen10213. Touching the refresh key64thus, allows additional variations of coloring samples to be generated and shown in the form of thumbnail images61aacross multiple screens202A and10213. The user may navigate between screens102A and10213by touching navigation keys60a, and60bprovided at the lower portion of each of the screens102A and10213. The fractions “ 1/1” and “½” appearing in the field located between the navigation keys60aand60bshown inFIGS. 8 and 9represent the page numbers of screens102A and102B.

Operation of the return key62returns the process flow back to the coloring mode selection screen100. Further, touching the thumbnail image61aof the embroidery pattern in either of thumbnail screens102A and10213invokes the enlarge screen103shown inFIG. 10.

The enlarge screen103comprises an enlarged image area65, a close key66, a set key67, and a keep color key68. The enlarged image area65provides an enlarged view of an embroidery pattern40corresponding to the selected thumbnail image61awhich is highlighted in bold frame inFIG. 8. If the user finds any color in the embroidery pattern40displayed in the enlarged image area65, the user may touch the relevant color-based pattern portion. For instance, when the user touches the pattern portion401, the outline of the pattern portion401is highlighted in bold frame colored distinctly from the color of the pattern portion401as shown inFIG. 11. When the keep color key68is touched in this state, the color of pattern portion401is stored in a priority color palette71provided on the repository screen104shown inFIG. 12. The touch panel9aand the controller21are examples of a designating unit for allowing the user to designate a desired color to the thread color data from the choice of color-based pattern portions displayed on the enlarge screen103.

Touching the set key67provided on the enlarge screen103returns the process flow back to the coloring mode selection screen100and populates the embroidery pattern displayed in the enlarged image area65into the preview image area50of the coloring mode selection screen100. Touching the close key66provided on the enlarge screen103returns the process flow back to the thumbnail screen102A or102B.

The repository screen104is invoked by touching the repository key63provided on the thumbnail screen102A and1025. The repository screen exemplified inFIG. 12is provided with the priority color palette71comprising a matrix of 24 cells and a return key72. The color information of the color designated by the user through the designating unit is registered in sequence from the left uppermost cell. The priority color palette71allows a visual recognition of the colors designated by the designating unit at a glance through the screen. When the return key72of the repository screen109is operated, the process flow returns to the thumbnail screen102A or1025. In the present embodiment, the priority color palette71is configured to hold a maximum of 29 colors, but it may be arranged to hold more or less than 24 colors as found appropriate.

In the present embodiment, the repository storage area248within the RAM24is configured to store a priority palette table which provides a mapping between a maximum of 24 entries of RGB values and palette-based color numbers ranging from 1 to 24.

The controller21, when executing random extraction, is configured to prioritize the colors stored in the priority palette table, i.e. the repository storage area248over the colors stored in the first or the second palette table. Each of the extracted colors is assigned to the thread color data of each color-based pattern portion. The above described configuration facilitates generation of the embroidery data through random coloration while allowing the use of colors in accordance with the preference and sensibility of the user.

With reference toFIGS. 13A to 16, the operation of an embroidery data processing program will be described with an emphasis on the coloring of the thread color data.FIGS. 13A to 16are flowcharts indicating the flow of processes executed by the controller21based on the embroidery data processing program.

The user reads the embroidery data from the ROM23by operating the touch panel9ato display a pattern selection screen not shown on the LCD9. When the desired embroidery pattern is selected from the multiple embroidery patterns displayed on the pattern selection screen by touching the desired embroidery pattern, the coloring mode selection screen100illustrated inFIG. 5is invoked that displays the selected embroidery pattern as identified as step A1in the flowchart ofFIG. 13A.

When either of the palette selection keys54aand54bis touched in the coloring mode selection screen100, the palette flag is either set or reset. Based on the status of the flag, the controller21judges which of the palettes56aor56bis to be used for the random coloring in the subsequent steps such as step C1. Further, at step A1, the plus key and the minus key of the color count specifier53provided in the coloring mode selection screen100are operated to specify the total count of colors to be used in the coloring of the selected embroidery pattern, which is also referred to as specified coloring count “x”.

Then, at step A2, the coloring mode is specified by the operation of either of the keys51ato51dassociated with either of “Random”, “Vivid”, “Soft”, and “Gradation”, whereafter the process proceeds to step A3indicated inFIG. 14to execute the random coloring process.

At step B1of the random coloring process, a judgment is made as to whether or not either of the coloring modes “Random”, “Vivid”, and “Soft” has been specified. If neither are specified (step B1: NO), meaning that “Gradation” has been specified, the process proceeds to step B2indicated inFIG. 15to execute the extraction process based on the “Gradation” coloring mode.

In the “Gradation” coloring mode, the controller21refers to the palette flag. If it is found, for instance, that the first color palette56ais set, a random number ranging within the number of colors present in the palette is produced at step C1, which range is 1 to 64 in this case. Then, color-based palette numbers 1-64 of the first palette table is searched to find the number that matches the produced random number and the color corresponding to the matching color-based palette number is selected as the base color. Then at step C2, the controller21further calculates the HSV value based on the RGB value of the selected base color to specify a range represented as threshold HG1and HG2centering on the calculated Hue H.

Thereafter, at step C3, the controller21first extracts colors from the priority palette table. At this instance, however, the user has not designated any colors using the designating unit and thus, there are no colors stored in the repository storage area248(step C4: NO) at this point in time. Thus, at step C5, the controller21calculates Hue H based on the RGB value of the color represented by palette-based color number1of the first palette table and judges whether or not the calculated hue H falls within the range of threshold HG1and HG2. If the calculated hue H falls within threshold HG1and HG2the color represented by palette-based color number1of the first palette table is stored in the color information storage area247as a color belonging to the “Gradation” category. The same process is repeated one by one for the palette-based color number2and beyond stored in the first palette table. Thus, the colors within the first palette table having been classified as the “Gradation” category become selected as the target of extraction and the updated information is stored in the color information storage area247.

Having completed the selection from the 64 colors, the count of colors selected from the priority palette table at step C3, which amounts to zero at this point in time, and the count of colors selected from the first palette table are added to obtain a sum which is compared with the specified coloring count “x” at step C6to judge whether or not the sum is equal to or greater than the specified coloring count “x”. If the sum is less than the specified coloring count “x” (step C6: NO), a judgment is made to specify a new base color at step C7and the process returns to step C1to reproduce a random number as described earlier. Steps C1to C7are repeated and if the sum of the colors selected base on the base color becomes equal to or greater than the specified coloring count “x” (step C6: YES), “x” colors are selected from the selected colors at step C8.

In the extraction process, a random number is produced within the range of total count of selected colors stored in the color information storage area247. The produced random number is compared with the palette-based color numbers of the selected colors and the RGB value associated with the matching palette-based color number is extracted. As described above, a random number is used to randomly extract “x” unique colors from the color information storage area247. The extracted color is stored in the extracted data storage area249of the RAM24and the process flow returns to step B4indicated inFIG. 14.

At step B4, the randomly extracted colors are each assigned to the thread color data of each of the color-based pattern portions. Prior to the assignment process, the specified coloring count “x” is subtracted from the total count “n” of the color-based pattern portions, and in case of any deficiencies, in other words, if n−x>0, an additional selection process is executed. That is, additional colors are selected from the color information storage area247in order to equalize the total count n of color-based pattern portions and the count of colors within the extracted data storage area249. The selected colors are additionally stored in the extraction data storage area249such that the number of entries of colors within the extraction data storage area249equals the total count “n” of color-based pattern portion. Then, the entries of colors stored in the extraction data storage area249are shuffled prior to the assignment process. That is, because the extraction data storage area249contains multiple entries of the same color as the result of the additional selection process, the entries are shuffled so that they are arranged in random order. After a color has been assigned to each of the “n” number of color-based pattern portions to complete the coloring of the first embroidery pattern, all of the thread color data associated with the first embroidery pattern is stored in the RAM24.

In the present embodiment, 6 unique embroidery patterns are displayed on the thumbnail screen102A. Thus, the second to sixth embroidery patterns (step B5: NO) are additionally generated through steps B1, B2, B4, and B5. If the generated embroidery pattern is found to be distinct from those previously generated, the thread color data associated with the currently generated embroidery pattern is stored at step B4as was the case for the first embroidery pattern. Thus, steps B1, B2, B4, and B5are repeated until all the embroidery patterns to be displayed as thumbnails have been generated (step B5: YES) to provide 6 unique embroidery patterns under the “Gradation” coloring mode.

In case either of the “Random”, “Vivid”, and “Soft” coloring mode was specified at step B1(step B1: YES), the extraction process identified as step B3and detailed inFIG. 16is executed instead of step B2.

Referring to the flowchart inFIG. 16, if no colors are registered with the priority color palette (step D1: YES), no colors can be retrieved from the priority palette table (step D7: NO). The symbol “T” indicated in step D7of the flowchart represents the resultant count of colors extracted based on the colors stored in the priority palette table after having undergone the later described steps D2to D6.

The controller21, when making a judgment that the first color palette56ahas been selected, for instance, based on the status of the palette flag, proceeds to step D8to select a color meeting the requirements of the selected coloring mode from the first color palette.

For example, in case the “Random” coloring mode is selected, neither of thresholds Sv, SS1SS2HG1nor HG2is specified and thus, the RGB values associated with palette-based color numbers 1 to 64 are stored as they are in the color information storage area247of the RAM24. In other words, if no category is specified, the entries of 64 colors in the first palette table are stored intact within the color information storage area247.

In case the “Vivid” or “Soft” coloring mode has been specified, saturation S is calculated based on the RGB value of palette-based color number1. Then a judgment is made as to whether the calculated saturation S is greater than threshold value Sv, or within the range of threshold SS1to SS2. In case saturation S of palette-based color number1is greater than threshold value Sv, or within the range of threshold SS1to SS2, palette-based color number1is stored in the color information storage area247with the categorization of “Vivid” or “Soft”. Similarly, for colors associated with palette-based color number2and onwards, saturation S is calculated based on the read RGB value for comparison with threshold Svor the range of threshold SS1to SS2, and a judgment is made as to whether or not to store the information to the color information storage area247. As described in this example in which the “Vivid” or “Soft” coloring mode has been specified and the first palette table has been selected, the colors belonging to the “Vivid” or “Soft” category become selected from the 64 colors of the first palette table and are stored in the color information storage area247with the updated information.

After the colors belonging to the “Random”, “Vivid”, and “Soft” coloring modes have been selected, the count of colors amounting to the difference of specified coloring count “x” and color count “T”, indicating the colors extracted through steps D2to D6and amounting to 0 at this instance (T=0), is extracted at step D9from the selected colors. The extraction process utilizes a random number produced in the aforementioned manner to randomly extract “x” unique colors. The extracted colors are stored in the extraction data storage area249of the RAM24and the process flow returns to step B4of the flowchart indicated inFIG. 14.

At step B4, the assignment process similar to the process executed in the “Gradation” coloring mode is executed, and on completing the generation of the first of the six embroidery patterns, the entire thread color data for the first embroidery pattern is stored in the RAM24. Thus, for the second embroidery pattern and onwards, steps B1, B3, B4, and B5are repeated until all the embroidery patterns to be displayed as thumbnails have been generated (step B5: YES). Thus, 6 unique embroidery patterns under the “Random”, “Vivid”, or “Soft” coloring mode are generated and the process flow returns to step A4of the flowchart indicated inFIG. 13.

The controller21is one example of a first assigning unit, which, in step A3or the later described step A14, executes a first assigning routine that randomly extracts colors to be used as thread color data for each color-based pattern portion from the first or the second palette table when no colors are specified in the priority palette table and assigns the extracted colors to each of the color-based pattern portions. More precisely, the first assigning unit includes a first extracting unit that executes the aforementioned steps B2and B3and a first assigning unit in a narrower sense that executes the aforementioned step B4.

At step A4, a first display routine is executed that displays to the thumbnail screen102A shrunk thumbnail images of multiple embroidery patterns, 6 of which are shown inFIG. 8, generated in the selected coloring mode. When either of the thumbnail images61aare touched (step A5: YES), the enlarge screen103shown inFIG. 10is invoked at step A6. The enlarge screen103provides an enlarged view of the selected thumbnail image61a.

If the user finds any color of his/her preference in the embroidery pattern40shown in the enlarged image area65, the user may touch the relevant color-based pattern portion (step A7: NO, step A8: YES). For instance, when the user touches the pattern portion401, the outline of the pattern portion401is highlighted in bold frame colored distinctly from the color of the pattern portion401(step A9). When the keep color key68is touched in this state (step A10: YES), the color of the pattern portion401is stored in the repository storage area248of the RAM24and registered with the priority color palette71at step A11. Operation of the close key66provided in the enlarge screen103returns the process flow back to thumbnail screen102A (step A12: YES). The aforementioned steps A8and A9are examples of a designating routine which allows the designation of the desired colors for used as the thread color data by the designating unit. The aforementioned steps A10and A11are examples of a storing routine that stores the colors designated by the designating routine to the second storage.

Touching the refresh key64provided on the thumbnail screen102A (step A13: YES) executes a random coloring process similar to the process executed in step A3(step A14). As a result, newly extracted colors are assigned to the thread color data and the thumbnail screen102B being separate from the thumbnail screen102A and displaying 6 new embroidery patterns as shown inFIG. 9is invoked (step A4). Thus, the user is allowed to display multiple randomly colored embroidery patterns over multiple screens102A and102B. Further, if the user finds any color of his/her preference in the embroidery patterns, the user may enlarge the relevant embroidery pattern and touch the color-based pattern portion (step A5to A10) to register a new color with the repository storage area248(step A11). Thus, the RGB values of one or more colors registered or designated by the user as well as the palette-based color number associated with the RGB value are added to the priority palette table of the repository storage area248.

The colors stored in the priority palette table can be viewed by touching the repository key63provided on the thumbnail screen102A and1025(step A15: YES, step A16). More specifically, the repository screen109is provided with the priority color palette71which displays the colors designated by the user. Though only 3 colors are registered with the priority color palette71exemplified inFIG. 12, the priority color palette71has a capacity to allow the user to readily register multiple colors of his/her preference from the multiple embroidery patterns displayed. Touching the return key72in the repository screen104returns the process flow back to the thumbnail screen102A or1023(step A17: YES).

In case the return key62provided on the thumbnail screens102A and1023is touched (step A18: YES), the process flow is returned to the coloring mode selection screen100, meaning that the process flow is returned to step A1. Thus, the user is allowed to reset various settings such as the selection of the palette56aor56bused in the random coloring, the specification of coloring count “x”, and the coloring mode, and proceed to execute the random coloring process at step A3. In the random coloring process at step A3or the random coloring process of step A14triggered by another operation of the refresh key64(step A13: YES), the use of colors registered with the priority color palette71is prioritized over the colors registered with the first color palette56aand the second color palette56b.

In the extraction process based on “Gradation” coloring mode at step B2, the selection of colors stored in the priority palette table indicated as step C3of the flowchart ofFIG. 15is prioritized over the selection of colors stored in the first or the second palette table indicated as step C5of the same flowchart. As described earlier, thresholds HG1and HG2are specified based on the selected base color at steps C1and C2and at step C3, a judgment is made as to whether or not hue calculated for the colors stored in the priority palette table falls within threshold HG1and HG2. Then, the colors belonging to the “Gradation” category is selected from the colors within the priority palette table and stored in the color information storage area247.

After the selection from the priority palette table has been completed, a judgment is made as to whether or not the count of the selected colors is equal to or greater than the specified coloring count “x” at step C4and if not (step C4: NO), the colors falling within the range of thresholds HG1and HG2are selected from the first or the second palette table as well (step C5). Then a judgment is made as to whether or not the sum of count of colors selected from the priority palette table at step C3and the count of colors selected from the first or the second palette table is equal to or greater than the specified coloring count “x” (step C6) and if not, the base color is renewed as indicated in steps C7and C1. Steps C1to C7are repeated until the count of colors selected based on the base color becomes equal to or greater than the specified coloring count “x” (step C6: YES), whereafter “x” colors are extracted from the plurality of colors at step C8.

The color information storage area247is configured to prioritize the storage of colors selected from the priority palette table over the colors selected from the first or the second palette table. In case a YES judgment is made at step C4, only the colors selected from the priority palette table is stored in the color information storage area247. As a result, the colors stored in the priority palette table, if any, will always be stored and extracted with the utmost priority. Thus, in the “Gradation” coloring mode indicated as step B2in the flowchart ofFIG. 14, the colors selected from the priority color palette71are randomly extracted with priority and the extracted colors are assigned to the color data of each color-based pattern portion at step B4. As described earlier, the present embodiment executes the above described coloring process indicated in steps B1, B2, B4, and B5to generate 6 embroidery patterns at a time and displays thumbnail images of the generated embroidery patterns on the thumbnail screen102A at step A9in the flowchart ofFIG. 13A.

Further, even when either of the “Random”, “Vivid”, or “Soft” coloring mode is selected (step B3ofFIG. 14), the colors registered with the priority color palette71will be used with priority if any colors are registered with the priority color palette71by the user.

More specifically, a judgment is made as to whether or not color count R of the priority palette table is 0 at step D1and if not (step D1: NO), the color (s) are acquired from the priority palette table in step D2.

In case the “Random” coloring mode is selected, neither of thresholds Sv, SS1SS2HG1nor HG2are specified as mentioned earlier, and thus, the RGB values associated with the colors stored in the priority palette table are stored as they are in the color information storage area247of the RAM24. In contrast, in case either of the “Vivid” or “Soft” category is specified as the coloring mode, a judgment is made on the colors stored in the priority palette table based on saturation S calculated from the RGB value of each color to determine whether or not saturation S is greater than threshold Svor whether or not saturation S is within the range of threshold SS1to SS2. Based on the judgment, the colors within the priority palette table that have been classified into the “Vivid” or “Soft” category are selected and stored in the color information storage area247.

Then, a judgment is made as to whether or not the count “R′” of colors selected from the priority palette table is 0, and if not (step D3: NO), a judgment is made at step D4as to whether or not the selected color count “R′” is greater than specified color count “x”. If the selected color count “R′” is greater than the specified color count “x” (step D4: NO), “x” colors are randomly extracted from the priority palette table at step D6. As a result, the final count “T” (T=x) of colors extracted by way of step D6is stored in the extraction data storage area249. In case the selected color count R′ is equal to less than the specified coloring count “x” (step D4: YES, i.e. 0<R′≦x), the colors selected at step D2is stored as they are in the extraction data storage area249at step D5.

At step D7, a judgment is made as to whether or not count “T” of the colors extracted by way of steps D2to D6matches the specified coloring count “x” (step D7: YES, i.e. T=x) and if not (step D7: NO), the difference is compensated by selecting additional colors from the first or the second palette table at step D8and the selected colors are extracted at step D9. More specifically, when the “Random” coloring mode is selected, the colors stored in the first or the second palette table are stored as they are in the color information storage area247as described earlier. In case “Vivid” or “Soft” category is specified as the coloring mode, the colors specified in the first or the second palette table are selected for classification into the “Vivid” or “Soft” category based on thresholds Sv, SS1, and SS2. Thus, after additionally selecting colors belonging to either of the “Random”, “Vivid”, and “Soft” categories at step D8, the count of colors amounting to the difference between the specified coloring count “x” and count “T” of colors extracted by way of steps D2to D6(x−T) are randomly extracted from the selected colors at step D9. The extracted colors are stored in the extraction data storage area249in addition to the colors having been selected form the priority palette table.

The color information storage area247is configured to prioritize the storage of colors selected from the priority palette table over the colors selected from the first or the second palette table. In case a YES judgment is made at step D7by way of step D6, only the colors selected from the priority palette table is stored in the extraction data storage area249. Thus, when operating under either of the “Random”, “Vivid”, and “Soft” coloring modes indicated as step B3in the flowchart ofFIG. 14, the colors stored in the priority color palette71are extracted with priority and assigned to the color data of each of the color-based pattern portion at step B4. As described earlier, the present embodiment executes the above described coloring process indicated in steps B1, B3, B4, and B5to generate 6 embroidery patterns at a time and displays thumbnail images of the generated embroidery patterns on the thumbnail screen102A at step A4of the flowchart ofFIG. 13A.

As described above, the controller21is one example of a second assigning unit, which, in step A3or the later described step A14, executes a second assigning routine that prioritizes the extraction of colors from the repository storage area248or more specifically from the priority palette table. More precisely, the second assigning unit includes a second extracting unit that executes the aforementioned steps B2and B3and a second assigning unit in a narrower sense that executes the aforementioned step B4. Step A1executed after the second assigning routine is one example of a second display routine.

The assignment process executed by the second assigning unit utilizes the colors specified by the user and thus, is more likely to be successful in generating a coloring sample of the embroidery pattern, presented in the form of thumbnail image61a, that is desired by the user as compared to the assignment process executed solely by the first assigning unit. If the user finds a color that he/she likes, the user may touch the relevant thumbnail image61a(step A5: YES) to invoke the enlarge screen103at step A6and further touch the set key67(step A7: YES). As a result, the process flow returns to step A19in which a screen transition is made back to the coloring mode selection screen100which now shows a preview image of the embroidery pattern which was displayed in the enlarged image area65to end the process.

As described above, the controller21of the embroidery data generator30executes the first assigning routine that randomly extracts colors from the first or the second palette table stored in the first storage and assigns the extracted colors to the thread color data of each color-based pattern portion. The controller21further executes a first display routine that displays on the screen the image of the embroidery pattern having its color-based pattern portions colored in the colors assigned by the first assigning routine. Still further, the controller21executes a designating routine and a storing routine in which the color desired by the user is designated from the color-based pattern portions of the embroidery pattern displayed by the first display routine and the designated color is stored in the second storage. Then the controller21executes the second assigning routine that prioritizes the execution of the assignment process based on the priority palette stored in the second storage.

According to the above described configuration, the primary coloring executed by the first assigning routine readily achieves coincidental and out-of-the-ordinary coloring of the embroidery pattern. Further, because the embroidery pattern is displayed on the screen, visual recognition of the colors assigned to the color-based pattern portions comes with ease.

Further, the secondary coloring executed by the second assigning routine allows the colors designated by the user from the color-based pattern portions displayed on the screen to be assigned with priority over other colors. This facilitates generation of embroidery data while incorporating the colors desired by the user into the embroidery pattern.

The first display routine displays multiple embroidery patterns on the thumbnail screens102A and1025. The combination of colors assigned to the color-based pattern portions in each embroidery pattern is unique. The designating routine designates a color the user wishes to assign to the thread color data from the color-based pattern portions of the embroidery patterns displayed on screens102A and102B. According to such configuration, the user is allowed to readily designate the desired color while viewing the look of the colored embroidery pattern displayed on screens102A and102B.

The controller21comprises an enlarging unit that displays an enlarged image of only the desired embroidery pattern to the enlarge screen103among the choice of multiple embroidery patterns. In the designating routine, the controller21is configured to designate the desired color from the color-based pattern portions of the enlarged embroidery pattern. The enlarged image of the embroidery pattern improves the visibility of the embroidery pattern and allows the embroidery pattern to be viewed in detail. Thus, the designation of color assigned to a small color-based pattern portion can be done with ease.

Similarly, the enlarging feature facilitates the designation of color in sewing machines that only come with a small LCD.

The displaying unit displays the embroidery pattern in the color assigned to each color-based pattern portion by both the first assigning unit and the second assigning unit. This facilitates the visual recognition of the colors assigned to the color-based pattern portions. More specifically, the first display routine allows a visual recognition of the colors assigned by the first assigning routine and the second display routine allows a visual recognition of the colors assigned by the second assigning routine.

The controller21and the touch panel9aresponsible for the execution of steps A13and A14are examples of a re-coloring unit that re-executes, in response to user instructions, the assignment process by the first assigning routine or the second assigning routine. The re-coloring unit allows the repetition of color extraction and assignment. Thus, the embroidery data of the embroidery patterns displayed on the thumbnail screens102A and102B may be re-colored to the satisfaction of the user through the execution of the re-coloring unit.

More specifically, in response to user instructions, the controller21executes a first re-coloring routine that re-executes the first assigning routine or a second re-coloring routine that re-executes the second assigning routine as steps A13and A14. The controller21further executes a first re-displaying routine as step A4after the execution of the first re-coloring routine and a second re-displaying routine as step A4after the execution of the second re-coloring routine. Thus, the embroidery data of the embroidery patterns displayed on the thumbnail screens102A and102B may be re-colored to the satisfaction of the user through the execution of the first or the second re-coloring routine.

The disclosure is not limited to the foregoing embodiment but may be modified or expanded as follows.

The embroidery data generator need not be provided within the sewing machine M but may be incorporated in a readily available personal computer or a dedicated computer machine provided with components such as a mouse, a keyboard, a memory card connector, and a display.

In case the sewing machine and the embroidery data generator are configured separately unlike the embodiment discussed above, the sewing machine and the embroidery data generator may exchange data through wire or wireless communication.

The first and the second storages are not limited to the RAM24or the EEPROM25but may be configured as other types of internal storage incorporated in the sewing machine or the embroidery data generator, or as a removable external storage detachably attached to the sewing machine or the embroidery data generator. For instance, the second storage may be configured by a nonvolatile storage medium such as an EEPROM instead of the RAM24. A storage configured by a nonvolatile memory allows the color designated by the designating unit to be retained even after the sewing machine M is turned off.

In the embodiment discussed above, the extraction process is performed randomly by the first or the second extraction unit at steps B2or B3. Further, the extracted colors are assigned by the first or the second assigning unit after being shuffled at step B4, thereby enabling a random assignment. In an alternative embodiment, either the extraction (step B2/B3) or the assigning (step B4) may be executed at random.

The transition between the screens100to104is not limited to the flow indicated inFIGS. 13A and 13Band may be modified as desired. For instance, if the return key72is operated at step A17of the flowchart ofFIG. 13A, the process may return to step A1such that the transition is made from the repository screen104to the coloring mode selection screen100. According to such configuration, the user is allowed to check the content of the priority color palette71in the repository screen104and proceed immediately to the execution of the coloring process by the first or the second assigning unit after specifying the coloring mode in the coloring mode selection screen100. This provides a user friendly system in which the embroidery patterns can be colored through settings made based on visual recognition provided through the transition of the screens.

The computer readable recording medium that stores the embroidery data processing program is not limited to the ROM23provided in the controller21but may be configured by a CD-ROM, a flexible disk, a DVD, a memory card11, or the like. In such case, the computer readable recording medium is read and executed through the computer of a controller provided in the embroidery data generator to provide operation and effects similar to those of the above described embodiment.

The foregoing description and drawings are merely illustrative of the principles of the disclosure and are not to be construed in a limited sense. Various changes and modifications will become apparent to those of ordinary skill in the art. All such changes and modifications are seen to fall within the scope of the disclosure as defined by the appended claims.