This application claims priority to Japanese Patent Application No. 2012-059568, filed Mar. 16, 2012, the content of which is hereby incorporated herein by reference in its entirety.
The present disclosure relates to an apparatus that is capable of creating embroidery data used to sew an embroidery pattern by a sewing machine, and to a non-transitory computer-readable storage medium storing computer-readable instructions that cause an apparatus to create such embroidery data.
An apparatus is known that is capable of creating embroidery data for embroidering a design based on image data of an image, such as a photograph or the like, using a sewing machine that is capable of embroidery sewing. Based on image data acquired from an image that is read by, for example, an image scanner, a CPU of the known apparatus calculates an angle characteristic and an intensity of the angle characteristic (hereinafter referred to as an angle characteristic intensity) of each of sections in the image. The CPU arranges line segments in accordance with the calculated angle characteristics and angle characteristic intensities. The angle characteristic is information that indicates a direction in which continuity of a color is high. The angle characteristic intensity is information that indicates a magnitude of a color change. After that, the CPU determines a color of each of the line segments and connects the line segments of the same color. The CPU creates the embroidery data by converting data that indicates the connected line segments into data that indicates stitches.
In the above-described apparatus, in order to effectively reflect the characteristics of the entire image, the CPU arranges line segments, giving priority to an angle characteristic with a strong intensity. On the other hand, in a section where the angle characteristic intensity is weak, the CPU arranges the line segments using a method that in which angle characteristics of surrounding pixels are taken into account or a method in which the angle characteristics are limited to a fixed direction. With the method in which the angle characteristics of the surrounding pixels are taken into account, it is possible to effectively express the features of the original image. However, there may be cases in which a unique embroidered texture cannot be produced. Further, with the method in which the angle characteristics are limited to the fixed direction, there may be cases in which stitches in the fixed direction, which are formed in a section where the angle characteristic is weak, stand out excessively.
Various embodiments of the broad principles derived herein provide an apparatus that is capable of creating embroidery data for forming stitches that naturally add a unique embroidered texture while effectively expressing features of an original image, and a non-transitory computer-readable medium storing computer-readable instructions that cause an apparatus to create such embroidery data.
Various embodiments provide an apparatus that includes a processor and a memory configured to store computer-readable instructions. The computer-readable instructions cause, when executed by the processor, the apparatus to perform steps that include calculating, based on image data of an image that is an aggregation of a plurality of pixels, a first angle characteristic and an intensity of the first angle characteristic with respect to each of the plurality of pixels, wherein the first angle characteristic is information indicating a direction in which continuity of a color in the image is high, and the intensity is information indicating a magnitude of change of the color, arranging a first line segment in a position that corresponds to a first pixel based on the calculated first angle characteristic, wherein the first pixel is a pixel whose calculated intensity is equal to or more than a threshold value, among the plurality of pixels, calculating a second angle characteristic of a second pixel based on the first angle characteristic of at least one pixel adjacent to the second pixel, wherein the second pixel is a pixel whose calculated intensity is smaller than the threshold value, among the plurality of pixels, acquiring information indicating a third angle characteristic, wherein the third angle characteristic is an angle characteristic set in advance, calculating a fourth angle characteristic based on the calculated second angle characteristic and on the third angle characteristic indicated by the acquired information, arranging a second line segment in a position that corresponds to the second pixel based on the calculated fourth angle characteristic, and creating, as embroidery data, data indicating at least stitches that respectively correspond to the arranged first line segment and the arranged second line segment.
Various embodiments also provide a non-transitory computer-readable medium storing computer-readable instructions. The computer-readable instructions cause, when executed by a processor of an apparatus, the apparatus to perform steps that include calculating, based on image data of an image that is an aggregation of a plurality of pixels, a first angle characteristic and an intensity of the first angle characteristic with respect to each of the plurality of pixels, wherein the first angle characteristic is information indicating a direction in which continuity of a color in the image is high, and the intensity is information indicating a magnitude of change of the color, arranging a first line segment in a position that corresponds to a first pixel based on the calculated first angle characteristic, wherein the first pixel is a pixel whose calculated intensity is equal to or more than a threshold value, among the plurality of pixels, calculating a second angle characteristic of a second pixel based on the first angle characteristic of at least one pixel adjacent to the second pixel, wherein the second pixel is a pixel whose calculated intensity is smaller than the threshold value, among the plurality of pixels, acquiring information indicating a third angle characteristic, wherein the third angle characteristic is an angle characteristic set in advance, calculating a fourth angle characteristic based on the calculated second angle characteristic and on the third angle characteristic indicated by the acquired information, arranging a second line segment in a position that corresponds to the second pixel based on the calculated fourth angle characteristic, and creating, as embroidery data, data indicating at least stitches that respectively correspond to the arranged first line segment and the arranged second line segment.
Embodiments will be described below in detail with reference to the accompanying drawings in which:
Hereinafter, an embodiment will be explained with reference to the drawings. First, a configuration of an embroidery data creation apparatus 1 will be explained with reference to
The embroidery data creation apparatus 1 may be a dedicated apparatus for creating embroidery data, or may be a general purpose apparatus, such as a personal computer or the like. In the present embodiment, a general purpose apparatus is shown as an example. As shown in
A display 24, which is a display device, is connected to the video controller 16 and a keyboard 21, which is an input device, is connected to the key controller 17. A CD-ROM 54 can be inserted into the CD-ROM drive 18. For example, when an embroidery data creation program is set up, the CD-ROM 54 that stores the embroidery data creation program may be inserted into the CD-ROM drive 18. Then, the embroidery data creation program may be read and stored in a program storage area 153 of the HDD 15. The embroidery data creation program may be acquired from an external device or via a network and stored in the program storage area 153. A memory card 55 can be connected to the memory card connector 23, and information of the memory card 55 can be read or information can be written into the memory card 55. In the present embodiment, image data of an image to be used as a base to create the embroidery data may be read into the embroidery data creation apparatus 1 via the image scanner 25, for example.
Storage areas of the HDD 15 will be explained. As shown in
The sewing machine 3 will be briefly explained with reference to
An embroidery frame 41, which is configured to hold a work cloth to be embroidered, can be disposed above the bed portion 30. When embroidery sewing is performed, the embroidery frame 41 may be moved to a needle drop point by a Y direction drive portion 42 and an X direction drive mechanism (not shown in the drawings). The needle drop point is indicated by an X-Y coordinate system that is unique to the sewing machine 3. The Y direction drive portion 42 may be disposed above the bed portion 30. The X direction drive mechanism is housed in a body case 43. A needle bar 35 on which a sewing needle 44 is mounted and a shuttle mechanism (not shown in the drawings) may be driven in accordance with the movement of the embroidery frame 41, and thus an embroidery pattern may be formed on the work cloth. The Y direction drive portion 42, the X direction drive mechanism, the needle bar 35 and the like may be controlled, based on the embroidery data, by a control device (not shown in the drawings) that includes a microcomputer etc. built in the sewing machine 3.
A memory card slot 37 is provided in a side surface of the pillar 36 of the sewing machine 3. The memory card 55 can be inserted into and removed from the memory card slot 37. For example, the embroidery data created by the embroidery data creation apparatus 1 may be stored in the memory card 55 via the memory card connector 23. After that, the memory card 55 may be inserted into the memory card slot 37 of the sewing machine 3, and the stored embroidery data may be read out and stored in the sewing machine 3. The control device (not shown in the drawings) of the sewing machine 3 may control sewing operations of an embroidery pattern performed by the sewing machine 3, based on the embroidery data read out from the memory card 55. The sewing machine 3 can thus sew the embroidery pattern based on the embroidery data created by the embroidery data creation apparatus 1.
The embroidery data creation processing that is performed by the embroidery data creation apparatus 1 of the present embodiment will be explained with reference to
As shown in
The CPU 11 acquires information indicating set angle characteristics (step S3) Each of the set angle characteristics is set in advance as an angle characteristic to be taken into account with respect to a pixel whose intensity is less than a predetermined threshold value, and stored in the set value storage area 154 of the HDD 15. The angle characteristic is information that indicates a direction in which continuity of a color in an image is high. In other words, the angle characteristic is information that indicates a direction in which (an angle at which) a color of a pixel shows more continuity, when the color of the pixel is compared with colors of other pixels around the pixel. The angle characteristic intensity is information that indicates a magnitude of a color change. Therefore, a pixel (hereinafter referred to as a first pixel) having an angle characteristic intensity that is equal to or more than a predetermined threshold value corresponds to a distinctive section of the image. On the other hand, a pixel (hereinafter referred to as a second pixel) having an angle characteristic intensity that is less than the predetermined threshold value corresponds to a section in which the features are weak.
In the known embroidery data creation method, line segments that correspond to stitches are arranged based on the angle characteristics and the angle characteristic intensities, and thus the embroidery data is created. More specifically, line segments centered on the first pixels that form a distinctive section are arranged first, by priority, and line segments centered on the second pixels are arranged thereafter. Note that each of the line segments centered on the second pixels is arranged in the following manner. Firstly, the line segment is arranged only for the second pixel that does not overlap with already arranged line segments. Secondly, the angle characteristic of the second pixel is re-calculated, taking into account angle characteristics of pixels (hereinafter referred to as surrounding pixels) around the second pixel. Then the line segment is arranged based on the re-calculated angle characteristic. This means that the direction of the stitch in the section with weak features is corrected to a direction that is closer to the direction of surrounding stitches. With this method, the stitches in the section with weak features can fit in well with the surrounding stitches, and it is thus possible to effectively express the distinctive section of the original image.
However, a great appeal of embroidery may be that it is possible to produce various textures utilizing the directions of stitches. For example, in a case where the photograph shown in
Information that indicates the set angle characteristics will be explained in more detail with reference to
Specifically, first, the CPU 11 calculates an angle characteristic corresponding to each of the pixels that form the image of each of the patterns. The CPU 11 sets a matrix having the same size as the image, and sets angle characteristics calculated for corresponding pixels to elements of the matrix, respectively. Thus, the CPU 11 can create the matrix that indicates the set angle characteristics for each of the patterns. In a case of the concentric circular stitching pattern shown in
In a case where a plurality of types of matrices that correspond to a plurality of stitching patterns are stored in advance in the set value storage area 154 in this manner, at step S3 of the embroidery data creation processing shown in
After the information (the matrix in the present embodiment) indicating the set angle characteristics has been acquired, the CPU 11 calculates the angle characteristic and the angle characteristic intensity for each of all the pixels that form the original image (step S5). The angle characteristic and the angle characteristic intensity may be calculated using any method. The angle characteristic and the angle characteristic intensity can be calculated using a method that is described in detail, for example, in Japanese Laid-Open Patent Publication No. 2001-259268, the relevant portion of which is incorporated herein by reference. Therefore, a detailed explanation will be omitted here and only an outline will be explained. First, the CPU 11 sets, as a target pixel, one of the plurality of pixels that form the original image and sets, as a target region, the target pixel and a predetermined number of (eight, for example) pixels around the target pixel. Based on an attribute value (a luminance value, for example) relating to a color of each of the pixels in the target region, the CPU 11 identifies a direction in which the continuity of the color in the target region is high, and sets the identified direction as the angle characteristic of the target pixel. The angle characteristic is represented by an angle that is defined when the target pixel is set as the center, the rightward direction in the image is set to 0 degrees, the downward direction is set to 90 degrees and the leftward direction is set to 180 degrees. Further, the CPU 11 calculates a value indicating the magnitude of color change in the target region, and sets the calculated value as the angle characteristic intensity of the target pixel.
The CPU 11 sequentially performs the processing that calculates the angle characteristic and the angle characteristic intensity in this manner, for all the pixels that form the original image. The CPU 11 stores data indicating the angle characteristics and the angle characteristic intensities of the respective pixels in a predetermined storage area of the RAM 12. The CPU 11 may perform the same processing taking a plurality of pixels as target pixels, rather than taking one pixel as a target pixel. The CPU 11 may calculate the angle characteristic and the angle characteristic intensity using a Prewitt operator or a Sobel operator, instead of using the method described above.
Based on the calculated angle characteristic intensity, the CPU 11 identifies each of the pixels that form the original image as either the first pixel or the second pixel. The CPU 11 stores, in the RAM 12, information that indicates that each of the pixels is either the first pixel or the second pixel (step S7). Specifically, the CPU 11 identifies, among the pixels that form the original image, a pixel whose angle characteristic intensity is equal to or more than a predetermined threshold value as the first pixel. The CPU 11 identifies, as the second pixel, a pixel whose angle characteristic intensity is less than the predetermined threshold value. The threshold value that is used at step S7 may be a fixed value that is set in advance and stored in the set value storage area 154 of the HDD 15. The threshold value may also be a value that is determined by the CPU 11 based on the angle characteristic intensities of all the pixels that are calculated at step S5. Alternatively, the user may look at the angle characteristic intensities of all the pixels calculated at step S5 and input a value, which may be used as the threshold value.
The CPU 11 re-calculates the angle characteristic, taking into account the angle characteristics of the surrounding pixels, for each of the pixels identified at step S7 as the second pixels, and stores the re-calculated angle characteristic in the RAM 12 (step S9). As the re-calculation method, the method can be used that is described in detail, for example, in Japanese Laid-Open Patent Publication No. 2001-259268, the relevant portion of which is incorporated herein by reference. Therefore, a detailed explanation will be omitted here and only an outline will be explained.
First, the CPU 11 sets one of the second pixels as a target pixel, and sequentially scans the surrounding pixels (for example, eight pixels adjacent to the target pixel when a single pixel is set as the target pixel). In a case where at least one identified first pixel is included in the surrounding pixels, the CPU 11 calculates Sum1 and Sum2. The identified first pixel is the first pixel whose angle characteristic intensity is equal to or more than the threshold value. Sum1 is a sum of products of a cosine value of the angle characteristic and the angle characteristic intensity of the at least one identified first pixel. Sum 2 is a sum of products of a sine value of the angle characteristic and the angle characteristic intensity of the at least one identified first pixel. The CPU 11 calculates an arctangent value (tan−1 (Sum2/Sum1)) of the value (Sum2/Sum1) obtained by dividing Sum2 by Sum1. The CPU 11 sets the arctangent value as a new angle characteristic of the second pixel set as the target pixel. In this manner, the CPU 11 sequentially re-calculates the angle characteristics of the second pixels. When the angle characteristic of the second pixel is re-calculated, if the angle characteristic of the second pixel that has already been re-calculated exists among the surrounding pixels, the CPU 11 uses the re-calculated angle characteristic of the second pixel to perform the calculation, in the same manner as the angle characteristic of the first pixel. In a case where the surrounding pixels include neither the first pixel nor the second pixel for which the re-calculation has been performed, the CPU 11 sets the original angle characteristic, as it is, as the re-calculated angle characteristic of the second pixel.
The CPU 11 calculates, for each of the second pixels, a final angle characteristic to determine an arrangement direction of the line segment, based on the angle characteristic re-calculated at step S9 and on the set angle characteristic indicated by the information acquired at step S3. The CPU 11 stores the calculated final angle characteristic in the RAM 12 (step S11). The CPU 11 calculates the final angle characteristic of each of the second pixels using the following method, for example. The angle characteristic intensity of a processing target second pixel is defined as S. The threshold value for the angle characteristic intensity used at step S7 to distinguish between the first pixel and the second pixel is defined as T. The angle characteristic of the processing target second pixel that has been re-calculated using the known method at step S9 is defined as θ1. The set angle characteristic indicated by the element that corresponds to the processing target second pixel in the matrix acquired at step S3 is defined as θ2. The final angle characteristic of the second pixel is defined as θ3. The
CPU 11 uses these values to respectively calculate dX and dY based on the following two formulas.
dX=cos θ1×S+cos θ2×(T−1−S)
dY=sin θ1×S+sin θ2×(T−1−S)
The CPU 11 calculates an arctangent value of the value (dY/dX) obtained by dividing dY by dX, as the final angle characteristic θ3 of the second pixel, as shown by the following formula.
θ3=tan−1(dY/dX)
Note that, in the above-described formulas, cos θ1 (sin θ1) is multiplied by the angle characteristic intensity S of the second pixel, as it is. On the other hand, cos θ2 (sin θ2) is multiplied by the value obtained by subtracting 1 and the angle characteristic intensity S of the second pixel from the threshold value T. This is because, since the second pixel corresponds to the section with weak features, a greater weight is added to θ1, which has been calculated using the angle characteristic(s) of the first pixel(s) in the surrounding pixels, than to the set angle characteristic θ2. Consequently, the angle characteristic of the second pixel with a stronger angle characteristic among the second pixels becomes closer to θ1, which has been calculated using the angle characteristic(s) of the first pixel(s) in the surrounding pixels. In contrast, the angle characteristic of the second pixel with a weaker angle characteristic among the second pixels becomes closer to the set angle characteristic θ2. In other words, the angle characteristic of the second pixel located close to a distinctive section is corrected to be closer to the direction of the surrounding stitches, as in the known art. On the other hand, the angle characteristic of the second pixel around which there is almost no distinctive section is corrected to be closer to the pre-set stitching direction of the stitching pattern.
The method for calculating the final angle characteristic of each of the second pixels explained above is merely an example, and another method may be used for the calculation. For example, the CPU 11 may respectively calculate dX and dY using the following formulas and may calculate θ3. Note that α is a fixed value that is larger than 0 and smaller than 1, and is applied in common to all the pixels.
dX=cos θ1×α+cos θ2×(1−α)
dY=sin θ1×α+sin θ2×(1−α)
In this case, neither dX nor dY depends on the angle characteristic intensity of the second pixel. The closer the value of α is to 1, the closer the value of θ3 is to θ1. The closer the value of α is to 0, the closer the value of θ3 is to θ2. Therefore, by appropriately setting the value of α, the user can specify the degree of the influence of the set angle characteristic θ2 as desired.
The CPU 11 may also calculate dX and dY, respectively, using the following formulas and may calculate θ3,
dX=cos θ1×S×α+cos θ2×(T−1−S)×(1−+)
dY=sin θ1×S×α+sin θ2×(T−1−S)×(1−α)
In this case, dX and dY depend on the angle characteristic intensity of the second pixel. However, by appropriately setting the value of α, the user can specify the degree of the influence of the set angle characteristic θ2.
After calculating the final angle characteristic of the second pixel, the CPU 11 performs processing that arranges line segments that respectively correspond to the stitches of the embroidery pattern (step S13). The processing that arranges the line segments may be performed using any known method. For example, the method can be used that is described in detail in Japanese Laid-Open Patent Publication No. 2001-259268, the relevant portion of which is incorporated herein by reference. With this method, line segments that do not overlap with each other as much as possible are arranged to fill the entire image as fully as possible. Hereinafter, only an outline will be explained. First, the CPU 11 sequentially arranges line segments with respect to the first pixels identified at step S7 while scanning the pixels forming the image from the left to the right and from the top to the bottom. Specifically, centered on each of the first pixels, the CPU 11 arranges a line segment which has a predetermined length (a length set in advance or a length input by the user) and which extends in the direction indicated by the angle characteristic calculated at step S5. That is, the CPU 11 arranges the line segment that directly expresses the feature in the image. The CPU 11 stores, in the RAM 12, information (coordinates) that indicates endpoints of each of the line segments.
When the line segment arrangement is complete for all the first pixels, the CPU 11 sequentially arranges line segments with respect to the second pixels that do not overlap with the line segments that correspond to the first pixels, among the second pixels identified at step S7, while scanning the pixels forming the image from the left to the right and from the top to the bottom. If any line segment that corresponds to another second pixel has already been created, the CPU 11 only arranges the line segment with respect to the second pixel that does not overlap with the already created line segment either. The line segment that corresponds to the second pixel is a line segment which has a predetermined length centered on the second pixel and which extends in the direction indicated by the angle characteristic calculated at step S11. That is, with respect to each of the second pixels, in accordance with the angle characteristic intensity of the second pixel, the CPU 11 arranges the line segment that extends in the direction that is a combination of the stitching direction of the stitching pattern selected from among the stitching patterns (refer to
After arranging the line segments corresponding to the first pixels and the second pixels, the CPU 11 performs processing that determines the color of each of the line segments (step S15), processing that connects the line segments of the same color (step S17), and processing that creates embroidery data that is usable in the sewing machine 3 (refer to
In the processing that determines the color of each of the line segments (step S15), the CPU 11 sets a predetermined range centered on the target pixel in the original image, as a range (a reference region) in which the color of the original image are referred to. The CPU 11 determines the color of the line segment that corresponds to the target pixel so that an average value of the colors in the reference region of the original image is equal to an average value of the colors that have already been determined for the line segments arranged in a corresponding region. The corresponding region is a region having the same size as the reference region centered on the target pixel. That is, the CPU 11 sequentially determines a color of each of the line segments based on the colors of the original image and the already determined colors of the line segments. Based on the determined color of the line segment, the CPU 11 determines a color of a thread (a thread color) to be used to sew a stitch that corresponds to the line segment. For example, the CPU 11 may determine the thread color that corresponds to the line segment to be a color that is closest to the determined color of the line segment, among a plurality of available thread colors that can be used for embroidery sewing. Specifically, the CPU 11 may calculate a spatial distance in an ROB space between RGB values of each of the available thread colors and ROB values of the color of the line segment, and may determine the thread color for which the spatial distance is the smallest, as the thread color corresponding to each line segment.
At the processing that sequentially connects the line segments of the same thread color (step S17), first, the CPU 11 identifies the line segment that is closest to the position that corresponds to the left end of the image, as a first line segment in an order of connection. The CPU 11 sets one of two endpoints of the identified line segment as a starting point, and sets the other endpoint as an ending point. The CPU 11 determines, as a second line segment to be connected, a line segment having an endpoint that is closest to the ending point of the first line segment, among the other line segments of the same thread color. In a similar manner, the CPU 11 sequentially connects the ending point of the already connected line segment with an endpoint of a line segment of the same thread color that is closest to the ending point. After that, the CPU 11 connects line segment groups, in which the line segments are connected for each thread color, by connecting endpoints that are close to each other. Thus, the CPU 11 connects all the line segments. The CPU 11 creates data that indicates positions (coordinates) of the endpoints of all the connected line segments, the order of connection and the thread colors.
In the processing that creates the embroidery data (step S19), the CPU 11 converts the coordinates of the endpoints of all the line segments into coordinates of the coordinate system that is unique to the sewing machine 3, and obtains data that indicates needle drop points, the order of sewing and the thread colors. In this manner, the CPU 11 creates the embroidery data. The CPU 11 stores the created embroidery data in the embroidery data storage area 152 of the HDD 15.
As explained above, according to the embroidery data creation apparatus 1 of the present embodiment, with respect to the first pixels that correspond to the distinctive section of the original image, the line segments are arranged based on the angle characteristics calculated (step S5) based on the image data. On the other hand, with respect to the second pixels that correspond to the section with weak features, the final angle characteristics are calculated (step S 11) by taking into account the set angle characteristics set in advance, in addition to the angle characteristics that have been re-calculated (step S9) by taking into account the angle characteristics of the surrounding pixels. The line segments are then arranged based on the final angle characteristics. Then, based on the data of the arranged line segments, the embroidery data is created for the sewing machine 3 to form the stitches of the embroidery pattern.
If the angle characteristics that can produce a unique embroidered texture are set in advance as the set angle characteristics, the set angle characteristics can be reflected in the arrangement directions of the line segments that correspond to the second pixels. Therefore, as compared to a case in which only the angle characteristics of the surrounding pixels are taken into account as in the known art, it is possible to produce a unique embroidered texture by the stitches that correspond to the second pixels. Further, the angle characteristics of the surrounding pixels can also be reflected in the arrangement directions of the line segments that correspond to the second pixels. Therefore, as compared to a case in which only the set angle characteristics are taken into account, the line segments that correspond to the second pixels do not stand out excessively, and it is possible to form stitches that fit in more with the line segments that correspond to the first pixels. In other words, according to the embroidery data creation apparatus 1 of the present embodiment, it is possible to create the embroidery data that can form stitches that naturally add a unique embroidered texture while effectively expressing the features of the original image.
Further, in the present embodiment, the plurality of matrices corresponding to the plurality of types of stitching patterns (refer to
In the embroidery data creation processing (refer to
The above-described embodiment can be modified in various ways. For example, the processing may be changed such that the user can set the region in which the set angle characteristics are to be taken into account with respect to the second pixels, namely, the region to which a unique embroidered texture is to be added. Hereinafter, embroidery data creation processing according to a modified example will be explained with reference to
As shown in
For example, first, the CPU 11 may cause the display 24 to display a region setting screen (not shown in the drawings) that includes the original image (refer to
Alternatively, the user may drag the mouse 22 freehand. The CPU 11 may set the applied region by identifying a movement trajectory of a pointer (not shown in the drawings) of the mouse 22 as a boundary line of the applied region. In a case where the movement trajectory of the pointer is not closed, the CPU 11 may set the applied region by connecting a starting point and an ending point of the movement trajectory. The CPU 11 may store information indicating the boundary line of the set applied region in the RAM 12.
For example, in a case where the user wants to add a unique embroidered texture just to the background section of the girl in the original image shown in
The processing that calculates the angle characteristics and the angle characteristic intensities of all the pixels based on the image data of the original image (step S5) and the processing that identifies the first pixels and the second pixels (step S7) are the same as in the above-described embodiment. The processing that uses the known method to re-calculate the angle characteristics of the second pixels by taking into account the angle characteristics of the surrounding pixels (step S9) is the same as in the above-described embodiment.
Next, with respect to the second pixels in the applied region, the CPU 11 calculates the final angle characteristics of the second pixels in the applied region, based on the angle characteristics re-calculated at step S9 and on the set angle characteristics indicated by the information acquired at step S3 (step S12). A method for calculating the final angle characteristics is basically the same as the method explained for the processing at step S11 of the above-described embodiment. Note, however, that the processing in the modified example differs in that the second pixels to be set as targets are not the second pixels in the entire region of the original image, but only the second pixels in the applied region.
In the subsequent processing that arranges the line segments at step S14, the CPU 11 arranges the line segments that correspond to the first pixels in the same manner as the above-described embodiment. On the other hand, a method for arranging the line segments that correspond to the second pixels differs depending on whether or not the processing target second pixel is located in the applied region. First, with respect to each of the second pixels in the applied region (including the second pixels on the boundary line), the CPU 11 arranges a line segment in the same manner as the above-described embodiment. More specifically, centered on each of the second pixels, the CPU 11 arranges a line segment which has a predetermined length and which extends in the direction indicated by the angle characteristics calculated at step S12. On the other hand, with respect to each of the second pixels that are located outside the applied region, the CPU 11 applies the angle characteristic which has been re-calculated using the known method at step S9, by taking into account the angle characteristics of the surrounding pixels to the original angle characteristic of the second pixel. More specifically, centered on each of the second pixels, the CPU 11 arranges a line segment which has a predetermined length and which extends in the direction indicated by the angle characteristic calculated at step S9.
The subsequent processing that determines the color of each of the line segments (step S15), the processing that connects the line segments (step S17), and the processing that creates the embroidery data (step S19) are the same as in the above-described embodiment.
As explained above, in the embroidery data creation processing according to the modified example, the angle characteristics of the surrounding pixels and the set angle characteristics are taken into account only for the second pixels in the set applied region, and only the angle characteristics of the surrounding pixels are taken into account for the second pixels outside the applied region. Therefore, if the user specifies only a particular region (a region in which color change in the image is particularly small, such as a background behind a person, for example), it is possible to cause the embroidery data creation apparatus 1 to create the embroidery data to which a unique embroidered texture is added.
Also in this modified example, the CPU 11 need not necessarily perform the processing that arranges all the line segments collectively at step S14. Specifically, after arranging just the line segments corresponding to the first pixels identified at step S7, the CPU 11 may perform the processing at step S9 and step S12 only for the second pixels in the applied region to calculate the final angle characteristics, and thereafter arrange the line segments. Further, for the second pixels outside the applied region, the CPU 11 may re-calculate the angle characteristics by performing the processing at step S9, and thereafter perform the line segment arrangement processing.
The above-described modified example is merely an example and other modifications may be made to the above-described embodiment. For example, a plurality of types of information that can be selected (for example, the matrices of the above-described embodiment) need not necessarily be prepared as the information indicating the set angle characteristics. The CPU 11 may consistently use one type of set angle characteristic information. The information indicating the set angle characteristics need not necessarily be information relating to the repetitive pattern of the stitches in predetermined directions as exemplified in the above-described embodiment.
In the case of the repetitive pattern of the stitches in the predetermined directions, the matrix exemplified in
For example, in the case of the concentric circular stitching pattern shown in
θ=tan−1 {dx/(−dy)}
Also in the case of another repetitive pattern, such as the sine wave (refer to
Further, the information indicating the set angle characteristics may be information that indicates, for example, an angle to rotate the angle characteristics re-calculated by taking into account the angle characteristics of the surrounding pixels at step S9 of the embroidery data creation processing (refer to
The apparatus and methods described above with reference to the various embodiments are merely examples. It goes without saying that they are not confined to the depicted embodiments. While various features have been described in conjunction with the examples outlined above, various alternatives, modifications, variations, and/or improvements of those features and/or examples may be possible. Accordingly, the examples, as set forth above, are intended to be illustrative. Various changes may be made without departing from the broad spirit and scope of the underlying principles.
Number | Date | Country | Kind |
---|---|---|---|
2012-059568 | Mar 2012 | JP | national |