Printing apparatus and printing method
By extracting the fabric pattern area in the printing device and determining its positional relationship, the printing inaccuracy caused by fabric deformation is solved, and an accurate printing effect is achieved.
Patent Information
- Application Number
- CN202111425622.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-11-27
- Filing Date
- 2021-11-26
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2041-11-26
AI Technical Summary
When printing fabrics, due to deformation or expansion of the fabrics, it is difficult to correctly grasp the positional relationship of the pattern, resulting in inaccurate printing.
The pattern extraction unit extracts the pattern area based on the comparison between the first image data and the second image data, and searches adjacent pattern areas within a predetermined distance based on the search source, determines the positional relationship, and generates printed image data that conforms to the pattern area.
It realizes accurate grasp of pattern position relationships under fabric deformation, ensuring the correct configuration and printing effect of printed image data.
Smart Images

Figure CN114559753B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a printing apparatus and a printing method. Background Art
[0002] There is known the following technique: searching for a candidate in a target inspection image that is similar to a feature of a standard image obtained by photographing a qualified product that is a product standard (see Patent Document 1).
[0003] Patent Document 1: Japanese Unexamined Patent Application Publication No. 2017-96750.
[0004] Here, it is assumed that when a printed medium is a cloth formed with a pattern, a pattern is extracted from a captured image obtained by photographing the conveyed cloth. In most cases, the pattern is formed periodically on the cloth, but the conveyed cloth may be deformed or stretched (hereinafter referred to as deformation, etc.), and in the captured image, the patterns do not necessarily align neatly in the longitudinal or lateral direction. In order to perform appropriate printing on the cloth, it is necessary to grasp the positional relationship between the patterns in the cloth. However, due to the influence of the above deformation, etc., it is difficult to correctly grasp the positional relationship between the patterns extracted from the captured image. Summary of the Invention
[0005] A printing apparatus includes: a conveying unit that conveys a cloth formed with a pattern in a conveying direction; a photographing unit that photographs the cloth conveyed by the conveying unit; a printing unit that prints the cloth conveyed by the conveying unit; a pattern extraction unit that extracts a pattern region corresponding to the pattern in the second image data based on a comparison between first image data representing the pattern and second image data generated by photographing the cloth by the photographing unit; a printed image generation unit that generates printed image data by arranging third image data representing an image to be printed overlapping the pattern in a manner that conforms to the positional relationship of the extracted pattern region; and a printing control unit that causes the printing unit to perform printing the printed image data on the cloth, and the pattern extraction unit performs the following positional relationship determination process: using one of the pattern regions as a search source pattern region, using a pattern region successfully searched within a fixed range set at a position a predetermined distance from the search source pattern region in a predetermined search direction as a search target pattern region, and storing that the position of the search target pattern region is adjacent to the search source pattern region in the search direction, and the pattern extraction unit performs the positional relationship determination process, using the search target pattern region as a new search source pattern region.
[0006] The printing method includes: a conveying process of conveying a fabric with a pattern formed thereon in a conveying direction; a photographing process of photographing the conveyed fabric; a pattern extraction process of extracting a pattern area corresponding to the pattern in the second image data based on a comparison between first image data representing the pattern and second image data generated by photographing the fabric; a printed image generation process of generating printed image data by arranging third image data representing an image to be printed overlapping the pattern in a positional relationship corresponding to the extracted pattern area; and a printing process of printing the printed image data on the conveyed fabric. The pattern extraction process performs the following positional relationship determination process: using one of the pattern areas as a search source pattern area, using a pattern area successfully searched within a fixed range set at a position a specified distance from the search source pattern area in a specified search direction as a search target pattern area, and storing that the position of the search target pattern area is adjacent to the search source pattern area in the search direction. The pattern extraction process performs the positional relationship determination process, using the search target pattern area as the new search source pattern area. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 is a block diagram schematically showing the configuration of a printing apparatus.
[0008] Figure 2A is a view showing the fabric being conveyed and the structure in its vicinity from a viewpoint looking from above downward.
[0009] Figure 2B is a view showing a part of the structure shown Figure 2A from a viewpoint looking from upstream to downstream.
[0010] Figure 3 is a flowchart showing the printing process.
[0011] Figure 4 is a flowchart showing the details of step S100.
[0012] Figure 5 is a flowchart showing the details of step S130.
[0013] Figure 6 is a view showing a list of the central coordinates of the extracted pattern areas.
[0014] Figure 7 is a view for explaining step S130 by a specific example.
[0015] Figure 8 is a view for explaining steps S140 and S150 by a specific example.
[0016] Figure 9 It is a diagram showing a part of the exemplary pattern image data and the captured image data.
[0017] Figure 10A It is a diagram showing a pattern area having a 1 / 2 phase shift relationship.
[0018] Figure 10B It is a diagram showing a pattern area having a 1 / 3 phase shift relationship.
[0019] Description of reference numerals:
[0020] 10... Printing device, 11... Control unit, 12... Program, 12a... Pattern registration unit, 12b... Pattern extraction unit, 12c... Printed image generation unit, 12d... Printing control unit, 13... Display unit, 14... Operation reception unit, 15... Shooting unit, 16... Conveyor unit, 17... Printing unit, 18... Storage unit, 19... Print head, 20... Carriage, 22... Endless belt, 30... Fabric, 40... Pattern image data, 41... Captured image data, 42, 43... Pattern areas, 50, 51a, 51b, 51c, 51d... Colored image data, 51... Printed image data. Detailed Description of the Invention
[0021] Hereinafter, embodiments of the present invention will be described with reference to the respective drawings. It should be noted that each drawing is merely an example for describing the present embodiment. Since each drawing is an example, there may be cases where the ratio or shape is inaccurate, they do not match each other, or parts are omitted.
[0022] 1. Device Structure:
[0023] Figure 1 Briefly shows the structure of the printing device 10 according to the present embodiment.
[0024] The printing device 10 executes a printing method. The printing device 10 includes a control unit 11, a display unit 13, an operation reception unit 14, a shooting unit 15, a conveyor unit 16, a printing unit 17, a storage unit 18, etc. The control unit 11 includes a CPU 11a as a processor, and is composed of one or more ICs or other non-volatile memories having a ROM 11b, a RAM 11c, etc.
[0025] In the control unit 11, a processor, i.e., the CPU 11a, uses the RAM 11c, etc. as a working area to execute arithmetic processing according to one or more programs 12 stored in the ROM 11b or other memories, etc., thereby controlling the printing device 10. The control unit 11 functions as a pattern registration unit 12a, a pattern extraction unit 12b, a printed image generation unit 12c, a printing control unit 12d, etc. according to the program 12. It should be noted that the processor is not limited to one CPU, and may be a structure that performs processing through multiple CPUs or hardware circuits such as ASICs, or a structure that cooperates with the CPU and hardware circuits for processing.
[0026] The display unit 13 is a unit for displaying visual information, and is composed of, for example, a liquid crystal display, an organic EL display, etc. The display unit 13 may be a structure including a display and a driving circuit for driving the display. The operation reception unit 14 is a unit for receiving a user's operation, and is implemented by, for example, physical buttons, a touch panel, a mouse, or a keyboard. Of course, the touch panel may also be implemented as a function of the display unit 13. The display unit 13 or the operation reception unit 14 may be a part of the structure of the printing device 10, or a peripheral device externally installed with respect to the printing device 10.
[0027] The conveying unit 16 is a mechanism for conveying the printing medium under the control of the control unit 11. In the present embodiment, it is assumed that a jacquard woven fabric, a lace fabric, etc., a fabric having a three-dimensional pattern formed by studying the weaving method of threads or fibers is used as the printing medium. One or a group of certain patterns are formed on the fabric in a repeated arrangement. Hereinafter, one or a group of patterns will be treated as one pattern.
[0028] The conveying unit 16 has, for example, a feeding roller for feeding the fabric before printing wound in a roll shape to the downstream of the conveyance, a belt or a roller for further conveying the fed fabric, a take-up roller for winding the fabric after printing into a roll shape again for recovery, a motor for rotating each roller or belt, etc. Hereinafter, the upstream and downstream in the conveying direction of the conveying unit 16 will be simply referred to as upstream and downstream.
[0029] The photographing unit 15 photographs the fabric conveyed by the conveying unit 16 under the control of the control unit 11. The photographing unit 15 has a structure such as a light source for irradiating the fabric and a photographing element for receiving the reflected light from the fabric, generating image data as a photographing result, and outputting it.
[0030] The printing unit 17 prints the fabric conveyed by the conveying unit 16 under the control of the control unit 11. The printing unit 17 is arranged closer to the downstream than the photographing unit 15. The printing unit 17 prints the fabric based on the printing image data sent by the control unit 11. For example, the printing unit 17 can perform printing by ejecting inks of multiple colors such as cyan, magenta, yellow, and black in an inkjet manner. According to the inkjet method, the printing unit 17 ejects ink dots from nozzles (not shown) based on the printing image data that defines the connection or disconnection of each ink dot for each pixel, thereby printing the fabric.
[0031] The storage unit 18 is a storage unit such as a non-volatile memory or a hard disk drive. The storage unit 18 can be understood as a part of the control unit 11. In addition, the RAM 11c can also be understood as a part of the storage unit 18.
[0032] The printing device 10 can be referred to as a recording device, an image forming device, a printer, etc. The printing device 10 can be implemented not only by a single independent device but also by multiple devices that are communicatively connected to each other via a communication interface or a network. The printing device 10 composed of multiple devices can also be referred to as a printing system 10.
[0033] The printing system 10 is composed of, for example, a printer and one or more information processing devices. The printer includes a photographing unit 15, a conveying unit 16, and a printing unit 17, and the one or more information processing devices function as the control unit 11. The information processing device is, for example, a personal computer (PC), a server, a smart phone, a tablet terminal, or a device having a processing ability equivalent to theirs. In the printing system 10, the device serving as the control unit 11 can also be referred to as an image processing device, a printing control device, etc. Of course, some of the devices constituting the printing system 10 can also be understood as inventions.
[0034] Figure 2A The structure of the conveyed fabric 30 and the vicinity of the fabric 30 is shown from a viewpoint from above to below. In Figure 2A The description of the pattern pre-formed on the fabric 30 is omitted. In Figure 2A The conveying direction of the fabric 30 by the conveying unit 16 is indicated by the reference numeral D1. The reference numeral 22 is an endless belt 22 that is a part of the conveying unit 16. By rotating the endless belt 22, the fabric 30 placed in a state on the endless belt 22 is conveyed from the upstream to the downstream.
[0035] As Figure 2AAs shown, a carriage 20 is disposed above the endless belt 22. The carriage 20 is capable of reciprocatingly moving in a direction D2 that intersects the conveying direction D1. The intersection here refers to orthogonality, but it should be understood that orthogonality includes not only strict orthogonality but also errors generated in the manufacture of the product. The carriage 20 moves along the long guide member 21 in the direction D2. The direction D2 is also referred to as the main scanning direction of the carriage 20 or the print head 19. In addition, the direction D2 is also referred to as the width direction of the fabric 30.
[0036] The carriage 20 is mounted with a print head 19. That is, the print head 19 reciprocates along the width direction D2 together with the carriage 20. Such a carriage 20 or print head 19 constitutes a printing unit 17. Although not shown, a plurality of nozzles are opened on the lower surface of the print head 19 facing the endless belt 22. While moving along the width direction D2 together with the carriage 20, the print head 19 ejects ink from the nozzles according to the print image data.
[0037] As Figure 2A shown, an imaging unit 15 is disposed at a predetermined position above the endless belt 22 and closer to the upstream than the carriage 20 and the print head 19.
[0038] Figure 2B A part of the structure shown is illustrated from the viewpoint from upstream to downstream. Figure 2A The imaging unit 15 uses the lower surface facing the endless belt 22 as an imaging surface 15a, and images the fabric 30 on the endless belt 22 via the imaging surface 15a. The imaging unit 15 is, for example, a line array scanning type camera in which a plurality of imaging elements are arranged along the width direction D2 inside. The imaging unit 15 repeatedly performs imaging in units of lines via a lens (not shown) and imaging elements provided on the imaging surface 15a. In Figure 2B , the imaging range of the imaging unit 15 in the width direction D2 is illustrated by a dotted line. The imaging unit 15 can image almost the entire range of the endless belt 22 in the width direction D2 through the function of the lens.
[0039] The structure of the imaging unit 15 is not limited to Figure 2A , 2B the example. For example, it may also be a structure in which a plurality of imaging units 15 are arranged above the endless belt 22 along the width direction D2, and each of the plurality of imaging units 15 shares a part of the entire range of the endless belt 22 in the width direction D2 for imaging. Alternatively, the imaging unit 15 may be a linear sensor in which a plurality of imaging elements are arranged over almost the entire range of the endless belt 22 in the width direction D2. Or, the imaging unit 15 may also be a structure in which, in the same manner as the case where the print head 19 is mounted on the carriage 20, it is mounted on a carriage capable of moving along the width direction D2, and while moving in the width direction D2 by the carriage, images the endless belt 22.
[0040] 2. Printing method:
[0041] Figure 3 The printing process executed by the control unit 11 according to the program 12 is shown by a flowchart.
[0042] In step S100, the pattern registration unit 12a of the control unit 11 registers the pattern image data representing the pattern formed on the fabric 30 in the storage unit 18. The pattern image data corresponds to the "first image data", and step S100 corresponds to the registration process.
[0043] Figure 4 The details of step S100 are shown by a flowchart.
[0044] In step S102, the pattern registration unit 12a acquires the basic image data representing the pattern of the fabric 30. The fabric 30 is, for example, a fabric in which a pattern designed by a designer is repeatedly woven. Therefore, the basic image data is image data representing the one pattern that is pre-generated using a prescribed software for design or drafting. The pattern registration unit 12a inputs the basic image data saved in a PC from the outside of the printing apparatus 10, for example, according to the operation of the user, and saves the input basic image data in the storage unit 18.
[0045] In step S104, the pattern registration unit 12a acquires pre-scan data, that is, image data generated by pre-scanning the fabric 30. The pre-scan refers to a reading or shooting performed before the shooting of the fabric 30 that starts in step S110 described later. For example, the user causes a scanner outside the printing apparatus 10 to pre-scan the fabric 30. Then, the pattern registration unit 12a inputs the image data generated by this scan from the scanner and saves it in the storage unit 18 as pre-scan data.
[0046] Alternatively, the pre-scan may also be performed by the imaging unit 15. For example, the control unit 11 causes the conveying unit 16 to start conveying the fabric 30, and when the leading end of the fabric 30 reaches a position downstream of the imaging unit 15 by a prescribed distance, the control unit 11 stops the conveyance of the fabric 30. The leading end of the fabric 30 refers to the downstream end of the fabric 30. The imaging unit 15 images the fabric 30 that passes under the imaging unit 15 due to the conveyance, and the pattern registration unit 12a inputs the image data generated by this imaging from the imaging unit 15 and saves it in the storage unit 18 as pre-scan data.
[0047] In step S106, the pattern registration unit 12a compares the basic image data obtained in step S102 with the pre-scanned data obtained in step S104, and extracts a pattern area corresponding to one pattern of the fabric 30 from the pre-scanned data. At this time, the pattern registration unit 12a uses image recognition technology to extract an image area with a higher similarity to the basic image data from the pre-scanned data, and regards this image area as the pattern area.
[0048] Then, in step S108, the pattern registration unit 12a stores the image data corresponding to the pattern area extracted in step S106 as pattern image data in the storage unit 18. Thus, the registration of the pattern image data is completed.
[0049] According to the description in Figure 4 the pattern image data can be said to be at least a part of the pre-scanned data.
[0050] Among them, the pattern registration unit 12a can also simplify step S100 by registering the basic image data itself as the pattern image data in the storage unit 18.
[0051] Returning to Figure 3 the description in
[0052] In step S110, the control unit 11 causes the photographing unit 15 to start photographing the fabric 30 being conveyed by the conveying unit 16 at a prescribed speed. That is, in step S110, the "conveying process" of the fabric 30 is started. In addition, the "photographing process" is started through step S110. The image data in line units generated by the photographing unit 15 by photographing the fabric 30 is sequentially output to the control unit 11. The control unit 11 sequentially stores the image data in line units from the photographing unit 15, thereby obtaining two-dimensional shape photographing image data. The photographing image data corresponds to the "second image data".
[0053] In step S120, the pattern extraction unit 12b extracts a pattern area corresponding to the pattern of the fabric 30 from the photographing image data based on the comparison between the pattern image data registered in step S100 and the photographing image data generated by the photographing in step S110. Multiple patterns are arranged and expressed in the photographing image data. Therefore, the pattern extraction unit 12b extracts the pattern area for each of the patterns arranged and expressed in the photographing image data one by one. Step S120 corresponds to the "pattern extraction process".
[0054] The pattern extraction unit 12b can use image recognition technology to extract an image area with a similarity to the pattern image data higher than a specified value as a pattern area. Specifically, the pattern extraction unit 12b extracts the edges of the image in the pattern image data, and similarly extracts the edges of the image in the captured image data. Then, while shifting the edge distribution in the pattern image data relative to the edge distribution in the captured image data and deforming the pattern image data, the comparison is repeated, and an area with a high evaluation where the degree of coincidence of the edge distributions is above a specified value is extracted as one pattern area. It should be noted that, similar to the processing in step S120, in the above step S106, the pattern registration unit 12a can extract the pattern area in the pre-scanned data based on the degree of coincidence of the edge distributions of the compared images.
[0055] In the present embodiment, the orientation of each image data such as the pattern image data, the captured image data, or the printed image data processed by the control unit 11 is also described corresponding to the conveying direction D1 and the width direction D2. Among them, if the width direction D2 is understood as the X-axis and the conveying direction D1 is understood as the Y-axis, the captured image data defines coordinates in a two-dimensional plane composed of orthogonal X and Y axes. Therefore, the process of extracting the pattern area from the captured image data is a process of determining the coordinates of the pattern area in the captured image data. More specifically, the pattern extraction unit 12b obtains the center coordinates of the area in the captured image data that can be evaluated as one pattern area based on the degree of coincidence of the edge distributions as described above, as the extraction result of one pattern area. Through such processing, the pattern extraction unit 12b extracts a plurality of pattern areas from the captured image data.
[0056] In step S130, the pattern extraction unit 12b determines the positional relationship of the plurality of pattern areas extracted in step S120. Step S130 can also be understood as a part of the pattern extraction process.
[0057] Figure 5 The details of step S130 are shown by a flowchart.
[0058] In step S131, the pattern extraction unit 12b sets at least one of the plurality of pattern areas extracted in step S120 as the "pattern area of the search source".
[0059] Figure 6 List and display the center coordinates of the pattern areas extracted in step S120. In Figure 6 each pattern area, the correspondence between the pattern area name and the center coordinates (X, Y) of the pattern area is recorded. For example, the center coordinates of pattern area A1 are (x1, y1). The information obtained as the extraction result of the pattern area in step S120 is the information of the center coordinates (X, Y) of each pattern area. In Figure 6In this case, for the sake of convenience in explanation, each pattern area is recorded with a pattern area name. Of course, the pattern extraction unit 12b can attach a pattern area name for distinguishing them to the center coordinates (X, Y) of each pattern area obtained through step S120.
[0060] In the initial step S131 of step S130, the pattern extraction unit 12b, for example, Figure 6 sets the pattern area with the smallest X and Y coordinates in the pattern area shown as the search source. Here, by way of example, it is assumed that the pattern area A1 is set as the search source.
[0061] In step S132, the pattern extraction unit 12b sets a search range based on the pattern area of the search source. Specifically, the pattern extraction unit 12b sets a fixed range at a position a specified distance from the pattern area of the search source in a specified search direction as the search range. The specified distance mentioned here refers to a specified distance suitable for searching for other pattern areas adjacent to the search source.
[0062] In step S133, the pattern extraction unit 12b searches for a pattern area within the search range. At this time, if the center coordinates of the pattern area can be found within the search range, the search is successful. The pattern area successfully searched in step S133 is called the "pattern area of the search target".
[0063] In step S134, the pattern extraction unit 12b stores the positional relationship between the pattern area of the search source and the pattern area of the search target. At this time, the pattern extraction unit 12b stores the following information: the position of the pattern area of the search target is adjacent to the pattern area of the search source in the search direction. Steps S131 to S134 correspond to the positional relationship determination process.
[0064] In step S135, the pattern extraction unit 12b determines whether there is a pattern area that should be used as the search source remaining. If there is a pattern area that should be used as the search source remaining, it proceeds from the "yes" determination to step S131. The pattern extraction unit 12b, for example, for all the pattern areas extracted in step S120, can determine "no", that is, there is no pattern area that should be used as the search source remaining, and end step S130 when at least the pattern area that has been used as the search source or the positional relationship with the pattern area of the search source has been stored. When the search in step S133 is unsuccessful, the pattern extraction unit 12b can substantially skip step S134 and enter the determination in step S135.
[0065] After the "Yes" in step S135, in step S131, the pattern extraction unit 12b sets the pattern area that has not been set as the search source in the pattern area extracted in step S120 as the pattern area of the new search source, and repeats the position relationship determination process. At this time, the pattern extraction unit 12b may set the pattern area to be searched as the pattern area of the new search source and repeat the position relationship determination process.
[0066] Figure 7 It is a diagram for illustrating step S130 through a specific example. Figure 7 In it, the center coordinates of a part of the pattern area in the two-dimensional plane composed of the orthogonal X·Y axes are shown. It can be understood that in the figure, the X-axis + direction corresponds to the width direction D2, and the X-axis - direction corresponds to the opposite direction of the width direction D2. In addition, the Y-axis + direction corresponds to the orientation upstream of the conveying direction D1, and the Y-axis - direction corresponds to the orientation downstream of the conveying direction D1.
[0067] In the first step S131 in step S130, the pattern extraction unit 12b sets the pattern area A1 as the search source, for example. Figure 7 The center coordinates (x1, y1) of the pattern area A1 are shown in it. The pattern extraction unit 12b that sets the pattern area A1 as the search source sets a circle C1 centered at a position that is a specified distance W from the center coordinates (x1, y1) in the X-axis + direction, and sets a circle C2 centered at a position that is a specified distance W from the center coordinates (x1, y1) in the X-axis - direction in step S132. In addition, the pattern extraction unit 12b sets a circle C3 centered at a position that is a specified distance H from the center coordinates (x1, y1) in the Y-axis - direction, and sets a circle C4 centered at a position that is a specified distance H from the center coordinates (x1, y1) in the Y-axis + direction.
[0068] That is, the direction parallel to the X-axis or the direction parallel to the Y-axis corresponds to the specified search direction. In addition, such a search direction can be said to be the horizontal or vertical direction of the captured image data. It is sufficient to understand the direction parallel to the width direction D2 as the horizontal direction and the direction parallel to the conveying direction D1 as the vertical direction. The distance H and the distance W are the ideal vertical and horizontal lengths of the pattern area, and are predetermined values in the present embodiment. Alternatively, the pattern extraction unit 12b may also process the vertical length of the pattern image data as the distance H and the horizontal length of the pattern image data as the distance W.
[0069] The circles C1, C2, C3, and C4 set in this way are the search ranges based on the pattern area A1 of the search source. The diameter of the circle as the search range is also predetermined and is a value suitable for searching other pattern areas adjacent to the search source. In step S133, the pattern extraction unit 12b searches for the center coordinates of the pattern area in the circles C1, C2, C3, and C4 respectively, and regards the pattern area whose center coordinates enter these circles as the pattern area to be searched. According to Figure 7 , the center coordinates (x2, y2) of the pattern area A2 enter the circle C1, and the center coordinates (x4, y4) of the pattern area A4 enter the circle C4. Therefore, when the circle C1 is used as the search range, the pattern area A2 can be successfully searched, and when the circle C4 is used as the search range, the pattern area A4 can be successfully searched. In Figure 7 , among the circles set as the search range, the circles into which the center coordinates of the pattern area enter are represented by solid lines, and the circles into which the center coordinates of the pattern area do not enter are represented by double-dashed lines.
[0070] In step S134, the pattern extraction unit 12b stores the information on the following positional relationship: the pattern area A2 to be searched is adjacent to the pattern area A1 of the search source in the +X axis direction, and the pattern area A4 to be searched is adjacent to the pattern area A1 of the search source in the +Y axis direction. After this step S134, the pattern extraction unit 12b sets the pattern areas A2 and A4 as new search sources respectively in step S131 after the determination of "Yes" in step S135.
[0071] Therefore, in step S132, the pattern extraction unit 12b sets a circle C5 centered at a position W away from the center coordinates (x2, y2) of the pattern area A2 in the +X axis direction, sets a circle C6 centered at a position H away from the center coordinates (x2, y2) in the -Y axis direction, and sets a circle C7 centered at a position H away from the center coordinates (x2, y2) in the +Y axis direction. Similarly, the pattern extraction unit 12b sets a circle C8 centered at a position W away from the center coordinates (x4, y4) of the pattern area A4 in the +X axis direction, sets a circle C9 centered at a position W away from the center coordinates (x4, y4) in the -X axis direction, and sets a circle C10 centered at a position H away from the center coordinates (x4, y4) in the +Y axis direction. It should be noted that the pattern extraction unit 12b may not set the circles as the search range in the four directions of the + / - X axis direction and the + / - Y axis direction based on the pattern area of the search source in the direction where the adjacency relationship with other pattern areas has been determined.
[0072] In step S133, the pattern extraction unit 12b searches for the center coordinates of the pattern regions in the circles C5, C6, C7, C8, C9, and C10 respectively, and regards the pattern regions whose center coordinates fall within these circles as the target pattern regions to be searched. According to Figure 7 , the center coordinates (x3, y3) of the pattern region A3 fall within the circle C5, and the center coordinates (x5, y5) of the pattern region A5 fall within the circle C7. In addition, the center coordinates (x5, y5) of the pattern region A5 fall within the circle C8, and the center coordinates (x6, y6) of the pattern region A6 fall within the circle C10.
[0073] Therefore, in step S134, the pattern extraction unit 12b stores the information on the following positional relationships: the target pattern region A3 to be searched is adjacent to the source pattern region A2 in the +X axis direction, and the target pattern region A5 to be searched is adjacent to the source pattern region A2 in the +Y axis direction. Similarly, the pattern extraction unit 12b stores the information on the following positional relationships: the target pattern region A5 to be searched is adjacent to the source pattern region A4 in the +X axis direction, and the target pattern region A6 to be searched is adjacent to the source pattern region A4 in the +Y axis direction. After this step S134, in step S131 after the determination of "Yes" in step S135, the pattern extraction unit 12b sets the pattern regions A3, A5, and A6 as the search sources respectively. Thereafter, the same process is repeated.
[0074] In this way, the pattern extraction unit 12b generates a search chain, and regards the target pattern region whose coordinates are found from the search range as the new search source, and thus repeatedly performs the positional relationship determination process. Thereby, for the multiple pattern regions extracted in step S120, the pattern extraction unit 12b can accurately determine the positional relationships between which pattern regions are adjacent to which other pattern regions in which directions.
[0075] Return to Figure 3 the description of
[0076] In step S140, the printed image generation unit 12c corrects the coloring image data representing the image to be overprinted on the pattern of the fabric 30 to conform to the shape of the pattern region. The coloring image data corresponds to the "third image data". The coloring image data is pre-generated color image data representing the color or the printing range of the color to be applied to a pattern. The coloring image data is, for example, pre-stored in the storage unit 18. Alternatively, the control unit 11, according to the user's operation, inputs the coloring image data saved in a PC external to the printing device 10, for example, and saves the input coloring image data in the storage unit 18.
[0077] In the captured image data, the center coordinates of each pattern region are ideally present at fixed intervals along the conveying direction D1 and the width direction D2, respectively. Additionally, the pattern region is ideally a rectangle with a longitudinal length of H and a transverse length of W. However, as described above, the conveyed fabric 30 may be deformed, etc., so the positional relationship of the center coordinates of the multiple pattern regions extracted from the captured image data in step S120 may sometimes be a configuration affected by such deformation, etc. For example, assume that for the pattern region A2 adjacent to the pattern region A1 in the +X axis direction, its center is ideally at the center of the circle C1, but according to Figure 7 the example, the center coordinates (x2, y2) of the pattern region A2 deviate from the center of the circle C1. Additionally, assume that for the pattern region A4 adjacent to the pattern region A1 in the +Y axis direction, its center is ideally at the center of the circle C4, but according to Figure 7 the example, the center coordinates (x4, y4) of the pattern region A4 deviate from the center of the circle C4.
[0078] Therefore, when performing step S140, the pattern extraction unit 12b or the printed image generation unit 12c determines the shape of each pattern region in the captured image data based on the center coordinates of the pattern regions extracted in step S120 and the positional relationship of the pattern regions determined in step S130. At this time, the pattern extraction unit 12b can determine the shape of each pattern region by repeatedly performing a process of calculating the coordinates of the four corners of a quadrilateral having a center coordinate at the center or approximately the center based on the distance and positional relationship with the center coordinates of the surrounding adjacent pattern regions. Each pattern region thus determined may sometimes be a shape deformed or stretched due to the deformation, etc., of the fabric 30.
[0079] The printed image generation unit 12c deforms the shape of the colored image data in combination with the respective shapes of the pattern regions. As a deformation method, for example, an affine transformation including image enlargement, reduction, rotation, shearing, etc., or other deformation methods are used. Such deformation is through the correction in step S140. Depending on the shape of the pattern region, sometimes the correction in step S140 is not required for the result.
[0080] In step S150, the printed image generation unit 12c arranges the multiple colored image data that have undergone step S140 in correspondence with the positional relationship of the multiple pattern regions in the captured image data, thereby generating printed image data. The printed image data is image data formed by combining the multiple colored image data that have undergone step S140 and is an image for printing on the region of the fabric 30 that is the object to be photographed. Such steps S140 and S150 correspond to the "printed image generation process", and printed image data is generated by arranging the third image data in a manner that conforms to the positional relationship of the extracted pattern regions.
[0081] Reference Figure 8 Illustrate a specific example of steps S140 and S150. Reference numeral 50 denotes colored image data 50. In Figure 8 this example, the colored image data 50 is color image data expressing colors that should be overlapped and colored with a pattern designed with petals as the theme. The colored image data 50 can be understood as an image having a size that is the same as or substantially the same as that of the pattern image data in terms of horizontal and vertical dimensions. Reference numeral 51a denotes the colored image data 51a obtained by correcting the colored image data 50 in combination with the shape of the pattern area A1 having the center coordinates (x1, y1). Similarly, reference numeral 51b is the colored image data 51b obtained by correcting the colored image data 50 in combination with the shape of the pattern area A2 adjacent to the pattern area A1 in the +X axis direction. Figure 8 In, a partial boundary of the corrected colored image data is indicated by a dashed line.
[0082] Reference numeral 51c is the colored image data 51c obtained by correcting the colored image data 50 in combination with the shape of the pattern area A3 adjacent to the pattern area A2 in the +X axis direction. Reference numeral 51d is the colored image data 51d obtained by correcting the colored image data 50 in combination with the shape of the pattern area A4 adjacent to the pattern area A1 in the +Y axis direction. Then, the colored image data 51a, 51b, 51c, 51d... are combined according to the positional relationship of the pattern areas in the captured image data, which is the printed image data 51.
[0083] As Figure 3 indicated by the dashed arrow in, after the control unit 11 starts photographing the fabric 30 in step S110, according to the captured image data sequentially obtained from the photographing unit 15, steps S120 to S150 are repeated. That is, the control unit 11 executes steps S120 and S130 with the captured image data of a specified size amount sequentially obtained from the photographing unit 15 as the object, and executes steps S140 and S150 after receiving the results of steps S120 and S130. Figure 8 The printed image data 51 shown is the printed image data obtained as a result of one cycle of steps S120 to S150.
[0084] In step S160, the printing control unit 12d starts printing the printed image data generated in step S150 on the fabric 30. That is, the "printing process" starts through step S160. The printed image generation unit 12c sequentially generates printed image data by repeating steps S140 and S150, and outputs the printed image data to the printing control unit 12d in the order of generation. The printing control unit 12d appropriately performs various necessary processes such as so-called color conversion processing or halftone processing on the printed image data obtained from the printed image generation unit 12c, and converts it into printed image data in a form used by the printing unit 17 during printing. The printing control unit 12d may also temporarily store the converted printed image data in a buffer.
[0085] Then, the printing control unit 12d transfers the converted printed image data to the printing unit 17, and at a specified moment when the position of the fabric 30 started to be imaged through step S110 reaches below the print head 19, causes the printing unit 17 to start printing by moving the carriage 20 and ejecting ink from the print head 19 based on the printed image data. Thus, the color images represented by the respective colored image data constituting the printed image data are printed overlapping the patterns in a form corresponding to the respective patterns in the fabric 30.
[0086] The conveying unit 16 is provided with an encoder that detects the rotation amount of a roller or a belt that rotates for conveying. The printing control unit 12d calculates the conveying distance of the fabric 30 based on the detection signal from the encoder. Therefore, the printing control unit 12d can grasp the current position of the fabric 30 started to be imaged through step S110 in the conveying direction D1, and at the moment when this position reaches below the print head 19, cause the printing unit 17 to start printing on the fabric 30.
[0087] After starting printing in step S160, the control unit 11 determines whether to end printing (step S170). The control unit 11 determines "yes" when it is necessary to end printing, and enters the end process of step S180. The control unit 11 determines that printing is ended, for example, when receiving an instruction to end printing from the user, or when the conveyance of the fabric 30 of a predetermined length amount is ended.
[0088] In the end process of step S180, the control unit 11 stops the imaging of the fabric 30 by the imaging unit 15. In addition, after causing the printing unit 17 to perform printing based on the printed image data generated in one cycle of the last steps S120 to S150, the control unit 11 stops the drive of the conveying unit 16 or the printing unit 17, and ends Figure 3 the flowchart. Of course, the control unit 11 may stop the conveying unit 16 after performing necessary processes such as controlling the take-up roller to wind up the fabric 30.
[0089] 3. N-fold search:
[0090] An additional explanation is given regarding the position relationship determination process. In the position relationship determination process, in addition to searching for a pattern region adjacent to the pattern region of the search source as described above, the pattern extraction unit 12b can also search for a pattern region at a certain distance from the pattern region of the search source. That is, in steps S131 to S133, the pattern extraction unit 12b regards the pattern region successfully searched within a fixed range at a position set at a distance of a specified distance × N in the search direction from the search source pattern region as the "pattern region of the N-fold search target". Then, in step S134, it stores that the position of the pattern region of the N-fold search target is among the first N in the search direction from the pattern region of the search source. N is an integer of 2 or more. Here, N = 2. Incidentally, being at the previous position of the pattern region of the search source means being adjacent to the pattern region of the search source.
[0091] Refer again to Figure 7 for an explanation. Assume that in step S131, the pattern extraction unit 12b sets the pattern region A1 with the center coordinates (x1, y1) as the search source. At this time, in step S132, in addition to Figure 7 the circles C1, C2, C3, C4 shown, it also sets a circle centered at a position at a distance of W × 2 from the center coordinates (x1, y1) in the +X axis direction, a circle centered at a position at a distance of W × 2 from the center coordinates (x1, y1) in the -X axis direction, a circle centered at a position at a distance of H × 2 from the center coordinates (x1, y1) in the -Y axis direction, and a circle centered at a position at a distance of H × 2 from the center coordinates (x1, y1) in the +Y axis direction as the search range based on the center coordinates (x1, y1). Then, in step S133, the pattern extraction unit 12b searches for the center coordinates of the pattern region in each of these eight circles in total.
[0092] According to the extraction accuracy of the pattern region in step S120, sometimes a pattern region actually expressed in the captured image data is not extracted. Assume that the center coordinates (x2, y2) of the pattern region A2 are not extracted in step S120. When the center coordinates (x2, y2) are not extracted, the pattern extraction unit 12b cannot find the center coordinates of the pattern region from the circle C1 set based on the center coordinates (x1, y1) of the pattern region A1. As a result, the search chain premised on multiple pattern regions being adjacent and connected in the search direction is interrupted, and it is impossible to search for the pattern region A3, etc. located in the +X axis direction after the pattern region A1.
[0093] For such an adverse situation, as described above, if a search is performed within a fixed range at a position that is a specified distance × N from the pattern area of the search source in the search direction, even if it is assumed that the adjacent pattern area A2 cannot be searched for with the pattern area A1 as the search source, it is possible to search for the pattern area A3 with the center coordinates (x3, y3) that are the first two in the +X direction from the pattern area A1.
[0094] It should be noted that considering the influence of deformation of the fabric 30, etc., the farther the search range set based on the pattern area of the search source is from the search source, the less able to correctly search for the pattern area that is the first N in the search direction from the pattern area of the search source. Therefore, it is appropriate for N to be approximately 2 or 3.
[0095] In addition, according to the position relationship determination process, as described above, even when the center coordinates (x2, y2) of the pattern area A2 are not extracted in step S120, the search chain bypasses the pattern area A2 and detours, so that it is possible to search for the pattern area A3, etc. that is in the +X direction after the pattern area A1. Specifically, taking the pattern area A1 with the center coordinates (x1, y1) as the search source, the pattern area A4 with the adjacent center coordinates (x4, y4) in the +Y direction is searched for. Then, linked to this, taking the pattern area A4 as the search source, the pattern area A5 with the adjacent center coordinates (x5, y5) in the +X direction is searched for. Furthermore, taking the pattern area A5 as the search source, an unillustrated pattern area adjacent in the +X direction is searched for. Furthermore, taking this unillustrated pattern area as the search source, the pattern area A3 with the adjacent center coordinates (x3, y3) in the -Y direction is searched for. Figure 7
[0095]
[0096] 4. Method for determining the size of the search range:
[0097] Previously, it was explained that the diameter of the circle set as the search range in step S132 is a specified value, but the method for determining the size of the search range can also be as follows, for example.
[0098] Figure 9 Part of the pattern image data 40 registered in step S100 and the captured image data 41 generated by the capture in step S110 are illustrated. In addition, in Figure 9 Specifically, patterns composed of hearts, etc. in the image data are shown. In step S120, the pattern extraction unit 12b extracts the pattern area from the captured image data 41 based on the comparison between the pattern image data 40 and the captured image data 41.
[0099] In Figure 9 In the captured image data 41, each solid-line frame indicated by the reference numeral 42 is a pattern area 42. In addition, in Figure 9Each frame of the dashed line indicated by reference numeral 43 in the figure is also a pattern area 43. Both the pattern areas 42 and 43 have the same pattern as the pattern image data 40. As can be seen from the previous description, in step S120, the pattern extraction unit 12b extracts the center coordinates of each of the pattern areas 42 and 43 in the captured image data 41.
[0100] If attention is paid to each frame of the solid line in the captured image data 41, within the captured image data 41, the pattern areas 42 are continuous without overlap at a fixed period. Additionally, if attention is paid to each frame of the dashed line in the captured image data 41, within the captured image data 41, the pattern areas 43 are continuous without overlap at a fixed period. Moreover, the pattern area 42 and the pattern area 43 are offset from each other by a distance of 1 / 2 of the period of the pattern area in the conveying direction D1 and the width direction D2 respectively. In this way, in various fabrics 30, a design is adopted such that the same pattern areas can be extracted from positions that are offset by a distance of 1 / 2 of the generation period of a certain pattern area.
[0101] In the present embodiment, a relationship in which a part of each other overlaps and they are offset from each other by a distance of 1 / 2 of the period of the pattern area in the conveying direction D1 and the width direction D2, such as the pattern area 42 and the pattern area 43, is referred to as a "1 / 2 phase shift" relationship. The pattern areas 42 are continuous without overlap and have a same-phase relationship. The pattern areas 43 are also continuous without overlap and have a same-phase relationship. Moreover, the area covered by multiple connected pattern areas 42 is also covered by multiple connected pattern areas 43. Therefore, considering that in steps S140 and S150, the printing image generation unit 12c configures and generates a series of printing image data corresponding to the positional relationship between the coloring image data and the pattern areas, for the printing image generation unit 12c, it is only necessary to have information on either the pattern area 42 or the pattern area 43 having a 1 / 2 phase shift relationship. Therefore, a search range of the following size is set: based on the pattern area as the search source, the pattern extraction unit 12b can search for the same-phase pattern areas and cannot search for different-phase pattern areas.
[0102] Figure 10A And Figure 9 Similarly, several pattern areas having a 1 / 2 phase shift relationship in the captured image data are shown by solid and dashed lines. In Figure 10A For ease of observation, the patterns as shown in Figure 9 are omitted. Reference numerals Ap and Ar indicate two pattern areas Ap and Ar that are in the same phase and adjacent to each other in the +X axis direction. The pattern areas Ap and Ar can be understood as Figure 9An example between the pattern regions 42 shown. On the other hand, the reference numerals Aq and As indicate two pattern regions that are in the same phase and adjacent to each other in the +X axis direction. The pattern regions Aq and As can be understood as Figure 9 An example between the pattern regions 43 shown. That is, there is a relationship of a 1 / 2 phase shift between the pattern regions Ap and Ar and the pattern regions Aq and As.
[0103] In Figure 10A , each of the pattern regions Ap, Aq, Ar, and As is schematically shown as a rectangle, but the actual shape of the pattern region is deformed or stretched as affected by the deformation of the fabric 30 as described above. In step S120, as the extraction result of the pattern regions, the center coordinates (X, Y) of each of the pattern regions Ap, Aq, Ar, and As are obtained.
[0104] When the pattern extraction unit 12b sets the pattern region Ap as the search source in step S131, in step S132, a circle Cp centered at a position that is at a distance W from the center coordinates (xp, yp) of the pattern region Ap in the +X axis direction is set as one of the search ranges. The circle Cp is, of course, a search range for searching for the center coordinates of the pattern region Ar adjacent to the pattern region Ap in the +X axis direction. In addition, the center coordinates of the pattern region As having a 1 / 2 phase shift relationship should not be searched for by the circle Cp. Similarly, when the pattern extraction unit 12b sets the pattern region Aq as the search source in step S131, in step S132, a circle Cq centered at a position that is at a distance W from the center coordinates (xq, yq) of the pattern region Aq in the +X axis direction is set as one of the search ranges. The circle Cq is a search range for searching for the center coordinates of the pattern region As adjacent to the pattern region Aq in the +X axis direction, and the center coordinates of the pattern region Ar having a 1 / 2 phase shift relationship should not be searched for by this circle Cq.
[0105] Therefore, the pattern extraction unit 12b sets the diameter of the circle as the search range to a specified value shorter than 1 / 2 of the diagonal length of the pattern image data. It can be said that the vertical and horizontal sizes of the pattern image data are approximately the same as the vertical and horizontal sizes of the pattern region. Therefore, if the diameter of the circle as the search range is set to a length shorter than 1 / 2 of the diagonal length of the pattern image data, then when two pattern regions having a 1 / 2 phase shift relationship are used as search sources respectively, the two search ranges set like the circles Cp and Cq do not overlap theoretically. As a result, through the search chain described above, the pattern extraction unit 12b can store the positional relationship between the pattern regions in the same phase with each other.
[0106] Supplementary description is made for the processing after step S135 on the premise that the captured image data includes a pattern area having a 1 / 2 phase shift relationship. When the captured image data includes a pattern area having a 1 / 2 phase shift relationship, among the multiple pattern areas showing the center coordinates in Figure 6 roughly half of the pattern areas are in-phase pattern area groups (first group), and roughly the remaining pattern areas are in-phase pattern area groups and are groups (second group) having a 1 / 2 phase shift relationship with the first group.
[0107] When the pattern area set as the search source in step S131 happens to be a pattern area belonging to the first group, the pattern extraction unit 12b stores the positional relationships between the pattern areas belonging to the first group by repeating steps S131 to S134. In step S132, the diameter of the circle used as the search range is set to a specified value shorter than 1 / 2 of the diagonal length of the pattern image data. When the pattern extraction unit 12b stores their adjacency relationships, etc. for all the pattern areas belonging to the first group and enters step S135, since there are still pattern areas not used as the search source, the judgment goes from "yes" to step S131, and the nearest search target pattern area found in step S133 is used as the new search source.
[0108] However, since the pattern area of this new search source belongs to the first group, there are no pattern areas that can be searched based on this new search source pattern area except for the other pattern areas in the first group for which the positional relationships have already been stored, and the search chain is essentially interrupted. When the search chain is interrupted like this, the pattern extraction unit 12b sets any pattern area not yet used as the search source as the new search source in step S131 and repeats steps S131 to S134. As a result, the pattern extraction unit 12b also stores the positional relationships between the pattern areas belonging to the second group.
[0109] Therefore, when the judgment in step S135 is "no", the pattern extraction unit 12b can, based on the association of the presence or absence of positional relationships, Figure 6The information of the multiple pattern regions shown is classified into a first group and a second group. The pattern extraction unit 12b identifies the association without a positional relationship between the first group and the second group. In addition, depending on the extraction accuracy of the pattern regions in step S120, the central coordinates of a region that is actually not equivalent to the pattern expressed by the pattern image data may be erroneously extracted. The region where the central coordinates are erroneously extracted in this way is called a pseudo-pattern region. In the captured image data, the positions of the pseudo-pattern regions are irregular, and even if the pseudo-pattern regions are used as search sources, it is basically impossible to successfully search for the pattern regions of the first group or the second group. Therefore, when it is determined as "no" in step S135, the pattern extraction unit 12b can classify the information of the multiple pattern regions extracted in step S120 into a first group, a second group, and even a pseudo-pattern region group.
[0110] The pattern extraction unit 12b provides the information on the positional relationship of the pattern regions of any one of the groups divided as described above to the printed image generation unit 12c to perform the steps after step S140. Basically, the pattern extraction unit 12b can select the group with the largest number of included pattern regions and provide the information on the positional relationship of its pattern regions to the printed image generation unit 12c. For example, the pattern extraction unit 12b provides the information on the positional relationship of the pattern regions of the first group to the printed image generation unit 12c and discards the information related to the second group and the pseudo-pattern region group. It should be noted that the number of pattern regions in the pseudo-pattern region group is much smaller than that in the first group and the second group, so it can be easily determined as a group that should not provide information to the printed image generation unit 12c.
[0111] In the design of the pattern adopted by the fabric 30, in addition to Figure 9 the 1 / 2 phase shift exemplified, for example, there are also patterns composed of pattern regions with a 1 / 3 phase shift relationship, or patterns composed of pattern regions with a 1 / 4 phase shift relationship.
[0112] Figure 10B Several pattern regions with a 1 / 3 phase shift relationship in the captured image data are shown by solid lines and dashed lines. In Figure 10B it is the same as Figure 10A and for the sake of easy observation, the pattern itself is omitted. For Figure 10B the common description with Figure 10A is omitted. In Figure 10B the reference numerals At and Av indicate two pattern regions that are in the same phase and adjacent in the +X axis direction, and the reference numerals Au and Aw indicate two pattern regions that are in the same phase and adjacent in the +X axis direction. That is, in Figure 10BIn this case, a part of the pattern regions At and Av overlaps with a part of the pattern regions Au and Aw, and they have a relationship of 1 / 3 phase shift, and are offset from each other by a distance of 1 / 3 of the period of the pattern regions in the conveying direction D1 and the width direction D2.
[0113] When the pattern extraction unit 12b sets the pattern region At as the search source in step S131, in step S132, a circle Ct centered at a position W away from the center coordinates (xt, yt) of the pattern region At in the +X axis direction is set as one of the search ranges. The circle Ct is a search range for searching the center coordinates of the pattern region Av adjacent to the pattern region At in the +X axis direction, and the center coordinates of the pattern region Aw having a relationship of 1 / 3 phase shift should not be searched through this circle Ct. Similarly, when the pattern extraction unit 12b sets the pattern region Au as the search source in step S131, in step S132, a circle Cu centered at a position W away from the center coordinates (xu, yu) of the pattern region Au in the +X axis direction is set as one of the search ranges. The circle Cu is a search range for searching the center coordinates of the pattern region Aw adjacent to the pattern region Au in the +X axis direction, and the center coordinates of the pattern region Av having a relationship of 1 / 3 phase shift should not be searched through this circle Cu.
[0114] Although not shown in the figure, in Figure 10B 's example, a group of pattern regions having a relationship of 2 / 3 phase shift with respect to the pattern regions At and Av and a relationship of 1 / 3 phase shift with respect to the pattern regions Au and Aw certainly exists in the captured image data. In Figure 10B In this case, the pattern extraction unit 12b sets the diameter of the circle as the search range to a specified value shorter than 1 / 3 of the diagonal length of the pattern image data. With such a structure, when the pattern regions having a relationship of 1 / 3 phase shift are used as search sources respectively, the two search ranges set like the circles Ct and Cu do not overlap theoretically. As a result, the pattern extraction unit 12b stores the positional relationship related to a plurality of in-phase pattern regions (the first group) including the pattern regions At and Av in step S130, stores the positional relationship related to a plurality of in-phase pattern regions (the second group) including the pattern regions Au and Aw, and further stores the positional relationship related to a plurality of in-phase pattern regions (the third group) that do not belong to either of these first and second groups. The pattern extraction unit 12b provides the information on the positional relationship of the pattern regions in any one of these first to third groups to the printed image generation unit 12c, and enables it to perform the steps after step S140.
[0115] According to such Figure 9 、 Figure 10A or Figure 10BFor example, when the captured image data has a pattern area with a 1 / J phase shift relationship, in step S132, the pattern extraction unit 12b determines the diameter D of the circle as the search range to be a value that satisfies the following formula (1) based on J and the length L of the diagonal of the pattern image data.
[0116] D < L×1 / J…(1)
[0117] It should be noted that the value of J depends on the design adopted for the fabric 30. The pattern extraction unit 12b only needs to obtain J by some means. For example, the value of J can be obtained through the operation of the user on the operation reception unit 14.
[0118] 5. Summary:
[0119] In this way, according to the present embodiment, the printing apparatus 10 includes: a conveying unit 16 that conveys the fabric 30 formed with a pattern in the conveying direction D1; a photographing unit 15 that photographs the fabric 30 conveyed by the conveying unit 16; a printing unit 17 that prints on the fabric 30 conveyed by the conveying unit 16; a pattern extraction unit 12b that extracts a pattern area corresponding to the pattern in the second image data based on the comparison between the first image data expressing the pattern and the second image data generated by photographing the fabric 30 by the photographing unit 15; a printed image generation unit 12c that arranges the third image data expressing the image to be printed overlapping the pattern in a manner that conforms to the positional relationship of the extracted pattern area, thereby generating printed image data; and a printing control unit 12d that causes the printing unit 17 to perform printing the printed image data on the fabric 30. Then, the pattern extraction unit 12 performs the following positional relationship determination process: using one of the pattern areas as the pattern area of the search source, using the pattern area successfully searched within a fixed range set at a position a specified distance from the pattern area of the search source in a specified search direction as the pattern area of the search target, and storing that the position of the pattern area of the search target is adjacent to the pattern area of the search source in the search direction. Further, the pattern extraction unit 12b uses the pattern area of the search target as the pattern area of the new search source and performs the positional relationship determination process.
[0120] As described above, due to the influence of deformation of the fabric 30, etc., the pattern areas in the second image data are not necessarily arranged neatly in the vertical or horizontal direction. In addition, the information obtained from the extraction of the pattern area in step S120 is only Figure 6 a list of the center coordinates shown. Therefore, it has been difficult to correctly grasp the positional relationship between the pattern areas in the captured image data. In contrast, according to the present embodiment, the pattern extraction unit 12b uses the pattern area of the search target as the new search source, repeatedly performs the positional relationship determination process, and stores the adjacency relationship between the pattern area of the search source and the pattern area of the search target found within a fixed range set based on this.
[0121] That is, although the arrangement of the pattern regions in the second image data is also deformed or tilted due to the deformation of the fabric 30 or the like, as long as it is the positional relationship between adjacent pattern regions, the offset from the ideal positional relationship in the conveyance direction D1 or the width direction D2 is small, and it is easy to search for the other based on one of them. Therefore, by repeatedly performing the positional relationship determination process as in the present embodiment, the pattern extraction unit 12b can accurately determine the positional relationship between the plurality of pattern regions. It should be noted that the so-called adjacent means adjacent in the previous specific example, but may also include a positional relationship that is not adjacent but adjacent to each other.
[0122] In addition, according to the present embodiment, when N is an integer of 2 or more, the pattern extraction unit 12b may also, in the positional relationship determination process, set the pattern region successfully searched within a fixed range at a position that is a specified distance × N from the pattern region of the search source in the search direction as the pattern region of the N-fold search target, and store that the position of the N-fold search target pattern region is in the first N positions in the search direction from the pattern region of the search source.
[0123] According to the above structure, it is easy to prevent the search chain from being interrupted due to repeated execution of the positional relationship determination process.
[0124] In addition, according to the present embodiment, the pattern extraction unit 12b may also perform a search with the longitudinal direction of the second image data as the search direction and perform a search with the lateral direction of the second image data as the search direction in the positional relationship determination process.
[0125] According to the above structure, for a plurality of pattern regions repeatedly existing two-dimensionally in the second image data, the mutual positional relationship can be determined.
[0126] Among them, the present embodiment can also be applied to the case of determining the positional relationship of a plurality of pattern regions arranged in a one-dimensional manner.
[0127] In addition, according to the present embodiment, when the fixed range is set as a circle, the pattern extraction unit 12b may set the diameter of the circle to be shorter than 1 / 2 of the length of the diagonal of the first image data.
[0128] According to the above structure, the pattern extraction unit 12b can exclude, from the search targets, pattern regions having a relationship of different phases such as a 1 / 2 phase shift in the second image data, search for pattern regions having a relationship of the same phase, and store the association of the positions of the search source and the search target.
[0129] In addition, according to the present embodiment, for all the multiple pattern regions extracted from the second image data, when at least the pattern region serving as the search source or the positional relationship with the pattern region of the search source is stored, the pattern extraction unit 12b groups the multiple pattern regions based on the presence or absence of associated positional relationships. When divided into multiple groups, the information on the positional relationship of the pattern regions in any one group is provided to the printed image generation unit 12c.
[0130] According to the above structure, when the second image data includes pattern regions having different phase relationships, the pattern extraction unit 12b can provide the necessary information excluding the useless to the printed image generation unit 12c to generate printed image data.
[0131] In addition to the printing apparatus 10, the present embodiment also discloses inventions of various classifications such as a system, a program, and a method.
[0132] The printing method includes: a conveying step of conveying a fabric 30 formed with a pattern in a conveying direction D1; a photographing step of photographing the conveyed fabric 30; a pattern extraction step of extracting, based on a comparison between first image data representing the pattern and second image data generated by photographing the fabric 30, a pattern region corresponding to the pattern in the second image data; a printed image generation step of arranging third image data representing an image to be printed overlapping the pattern in a manner conforming to the positional relationship of the extracted pattern region, thereby generating printed image data; and a printing step of printing the printed image data on the conveyed fabric 30. Then, the pattern extraction step performs the following positional relationship determination process: using one of the pattern regions as a pattern region serving as a search source, using a pattern region within a fixed range successfully searched at a position set at a predetermined distance from the pattern region of the search source in a predetermined search direction as a pattern region serving as a search target, and storing that the position of the pattern region serving as the search target is adjacent to the pattern region of the search source in the search direction. Further, the pattern extraction step uses the pattern region serving as the search target as a new pattern region serving as a search source and performs the positional relationship determination process.
[0133] Although in Figure 2A the example, a structure of a so-called serial printer in which the print head 19 is mounted on the carriage 20 and moves is disclosed, the print head 19 can also be a so-called line head. That is, the print head 19 can be a long strip print head that is not mounted on the carriage 20 and can cover the width of the fabric 30 in the width direction D2.
[0134] In Figure 2A 、 2B the structure shown by the reference numeral 22 may not be an endless belt but a platen serving as a table for supporting the fabric 30 from below. That is, it can also be understood that the fabric 30 conveyed by a roller (not shown) moves on the platen.
[0135] The fixed range where the search range is set at a position at a specified distance from the pattern area of the search source is not limited to a circle, and may be, for example, an ellipse or a polygon.
[0136] This embodiment can also be applied to cases where materials other than the fabric 30 are used in printing, such as a printing medium made of paper and having a pattern formed thereon.
Claims
1. A printing device, characterized in that, Comprising: A conveying unit that conveys the patterned fabric in the conveying direction; An imaging unit that images the fabric conveyed by the conveying unit; A printing unit that prints the fabric conveyed by the conveying unit; A pattern extraction unit that extracts a pattern area corresponding to the pattern in the second image data based on a comparison between the first image data representing the pattern and the second image data generated by imaging the fabric by the imaging unit; A printed image generation unit that generates printed image data by arranging the third image data representing the image to be printed overlapping the pattern in a manner conforming to the positional relationship of the extracted pattern area; And A printing control unit that causes the printing unit to print the printed image data on the fabric, The pattern extraction unit performs the following positional relationship determination process: using one of the pattern areas as the search source pattern area, and using the pattern area successfully searched within a fixed range set at a position a specified distance from the search source pattern area in the specified search direction as the search target pattern area, and storing that the position of the search target pattern area is adjacent to the search source pattern area in the search direction; The pattern extraction unit performs the positional relationship determination process and uses the search target pattern area as the new search source pattern area.
2. The printing apparatus according to claim 1, wherein When N is an integer of 2 or more, in the positional relationship determination process, the pattern extraction unit uses the pattern area successfully searched within a fixed range set at a position of the specified distance × N from the search source pattern area in the search direction as the N-fold search target pattern area, and stores that the position of the N-fold search target pattern area is in the first N positions in the search direction from the search source pattern area.
3. The printing apparatus according to claim 1 or 2, wherein In the positional relationship determination process, the pattern extraction unit performs the search using the longitudinal direction of the second image data as the search direction and also performs the search using the lateral direction of the second image data as the search direction.
4. The printing apparatus according to claim 1 or 2, wherein When the pattern extraction unit sets the fixed range as a circle, the diameter of the circle is set to a length shorter than 1 / 2 of the length of the diagonal of the first image data.
5. The printing apparatus according to claim 4, wherein For all the multiple pattern areas extracted from the second image data, when at least the pattern area used as the search source or the positional relationship with the search source pattern area is stored, the pattern extraction unit groups the multiple pattern areas based on the presence or absence of positional relationship association; When divided into multiple groups, the pattern extraction unit provides the information on the positional relationship of the pattern areas in any one group to the printed image generation unit.
6. A printing method, characterized in that, Comprising: A conveying process that conveys the patterned fabric in the conveying direction; An imaging process that images the conveyed fabric; A pattern extraction process that extracts a pattern area corresponding to the pattern in the second image data based on a comparison between the first image data representing the pattern and the second image data generated by photographing the fabric; A printed image generation process that generates printed image data by arranging the third image data representing an image to be printed overlapping the pattern in a positional relationship that conforms to the extracted pattern area; And A printing process that prints the printed image data on the conveyed fabric, The pattern extraction process performs the following positional relationship determination process: using one of the pattern areas as a search source pattern area, and using the pattern area successfully searched within a fixed range set at a position a specified distance from the search source pattern area in a specified search direction as a search target pattern area, and storing that the position of the search target pattern area is adjacent to the search source pattern area in the search direction; The pattern extraction process performs the positional relationship determination process, using the search target pattern area as the new search source pattern area.
Citation Information
Patent Citations
Positioning method, positioning apparatus, program and computer readable recording medium
JP2017096750A
Printing apparatus and printing method
CN114559752A