Printing method, printing device, and program
The printing method and apparatus address medium distortion by calculating and correcting deviations in template images to enhance the accuracy of printed images on materials such as fabric, paper, and film.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2026-04-08
AI Technical Summary
Existing printing methods face challenges in maintaining matching accuracy between a captured image and a template image due to medium distortion, leading to decreased correction accuracy of printed images when distortion is significant.
A printing method and apparatus that utilizes a computer-controlled printing device to acquire and match template images with captured images, calculate deviations, and correct print images based on these deviations to account for medium distortion, ensuring accurate alignment and printing.
The method enhances the accuracy of image correction and printing by effectively addressing medium distortion, thereby improving the precision of printed images on materials like fabric, paper, and film.
Smart Images

Figure 2026060241000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a printing method, a printing apparatus, and a program.
Background Art
[0002] Patent Document 1 describes a printing method in which a template image including feature points of a pattern is matched with a captured image of a medium having the pattern, thereby detecting distortion of the medium. In this printing method, an image is printed on the medium in accordance with the pattern by correcting the printed image in accordance with the distortion of the medium.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In such a printing method, if the distortion of the medium is large, the matching accuracy between the captured image and the template image may decrease. In this case, the correction accuracy of the printed image may decrease.
Means for Solving the Problems
[0005] A printing method for solving the above problems is a printing method in which a computer controls a printing device for printing on a medium, and the computer includes: acquiring a captured image of a medium having a pattern; acquiring a first template image including a first region of interest set in a pattern image showing the pattern; acquiring a second template image including a second region of interest set in the pattern image; extracting a first corresponding region corresponding to the first region of interest by matching the first template image to the captured image; calculating a first deviation, which is the deviation between the position coordinates of the first region of interest in the pattern image and the position coordinates of the first corresponding region in the captured image; correcting the second template image based on the first deviation; extracting a second corresponding region corresponding to the second region of interest by matching the corrected second template image to the captured image; calculating a second deviation, which is the deviation between the position coordinates of the second region of interest in the pattern image and the position coordinates of the second corresponding region in the captured image; correcting a print image showing an image to be printed on the medium based on the second deviation; and causing the printing device to print the corrected print image.
[0006] A printing apparatus for solving the above problems comprises a printing unit for printing an image on a medium and a control unit, wherein the control unit is configured to perform the following actions: acquire a captured image of a medium having a pattern; acquire a first template image including a first region of interest set in a pattern image showing the pattern; acquire a second template image including a second region of interest set in the pattern image; extract a first corresponding region corresponding to the first region of interest by matching the first template image to the captured image; calculate a first deviation, which is the deviation between the position coordinates of the first region of interest in the pattern image and the position coordinates of the first corresponding region in the captured image; correct the second template image based on the first deviation; extract a second corresponding region corresponding to the second region of interest by matching the corrected second template image to the captured image; calculate a second deviation, which is the deviation between the position coordinates of the second region of interest in the pattern image and the position coordinates of the second corresponding region in the captured image; correct a print image showing the image to be printed on the medium based on the second deviation; and cause the printing unit to print the corrected print image.
[0007] A program to solve the above problem causes a computer that controls a printing device for printing on a medium to perform the following actions: acquire a captured image of a medium having a pattern; acquire a first template image including a first region of interest set in a pattern image showing the pattern; acquire a second template image including a second region of interest set in the pattern image; extract a first corresponding region corresponding to the first region of interest by matching the first template image with the captured image; calculate a first deviation, which is the deviation between the position coordinates of the first region of interest in the pattern image and the position coordinates of the first corresponding region in the captured image; correct the second template image based on the first deviation; extract a second corresponding region corresponding to the second region of interest by matching the corrected second template image with the captured image; calculate a second deviation, which is the deviation between the position coordinates of the second region of interest in the pattern image and the position coordinates of the second corresponding region in the captured image; correct a print image showing the image to be printed on the medium based on the second deviation; and print the corrected print image on the printing device. [Brief explanation of the drawing]
[0008] [Figure 1] Figure 1 is a block diagram showing an example of a printing apparatus. [Figure 2] Figure 2 is a plan view showing an example of a patterned medium. [Figure 3] Figure 3 shows an example of a pattern image. [Figure 4] Figure 4 shows an example of a captured image. [Figure 5] Figure 5 shows an example of a printed image. [Figure 6] Figure 6 shows an example of mapping data. [Figure 7] Figure 7 shows an example of a template image. [Figure 8] Figure 8 shows the corresponding area obtained by template matching. [Figure 9]Figure 9 shows the deviation between the region of interest and the corresponding region. [Figure 10] Figure 10 shows the corrected template image. [Figure 11] Figure 11 shows a different deviation than that in Figure 9. [Figure 12] Figure 12 shows a corrected template image, different from that in Figure 10. [Figure 13] Figure 13 shows the correspondence area obtained by the corrected template matching. [Figure 14] Figure 14 is a flowchart showing an example of the printing process. [Modes for carrying out the invention]
[0009] The following describes an example of a printing device and printing method with reference to the diagram. First, the printing device will be described. The printing device is an inkjet printer that prints images such as characters and photographs by ejecting ink, which is an example of a liquid, onto a medium such as paper, fabric, or film.
[0010] <Printing device> As shown in Figure 1, the printing device 11 includes a printing unit 12. The printing unit 12 is configured to print an image onto a medium 99. More specifically, the printing unit 12 prints an image onto the medium 99 by discharging a liquid onto the medium 99. The printing unit 12 has a head for discharging the liquid. In one example, the printing unit 12 has a serial head that scans across the medium 99. The printing unit 12 may also have a line head capable of discharging liquid simultaneously across the width of the medium 99. The printing unit 12 may also print an image onto the medium 99 by fixing powder onto the medium 99. The printing device 11 may be, for example, a laser printer.
[0011] As shown in FIG. 2, the medium 99 has a pattern P1. The pattern P1 is composed of figures, patterns, etc. previously applied to the medium 99 to give the medium 99 a design property. The pattern P1 is periodically formed in the medium 99. In one example, the pattern P1 is periodically formed in the medium 99 so as to appear repeatedly in the conveyance direction Y1. The conveyance direction Y1 is the direction in which the medium 99 is conveyed. The pattern P1 may be periodically formed in the width direction X1. The width direction X1 is a direction different from the conveyance direction Y1. The width direction X1 is a direction indicating the width of the medium 99. The width direction X1 and the conveyance direction Y1 are directions extending on the plane of the medium 99.
[0012] The medium 99 may be a fabric. The medium 99 is, for example, a jacquard fabric. The jacquard fabric is a fabric that constitutes the pattern P1 by weaving. The pattern P1 may be formed by the unevenness due to weaving, or may be formed by the color of the yarn used for weaving. The pattern P1 may be formed by pre-dyeing the medium 99. The pattern P1 may be formed by previously printing on the medium 99. The medium 99 is not limited to the jacquard fabric, and may be just a simple fabric. The medium 99 is not limited to fabrics, and may also be paper, film, etc.
[0013] The medium 99 may be long in the conveyance direction Y1. The medium 99 may be, for example, a fabric, paper, film, etc. fed out from a roll-shaped web. The medium 99 is not limited to being long in the conveyance direction Y1, and may also be in a single sheet form.
[0014] As shown in FIG. 1, the printing apparatus 11 may include a conveyance unit 13. The conveyance unit 13 is configured to convey the medium 99. The conveyance unit 13 may include a belt, rollers, etc. In one example, the conveyance unit 13 conveys the medium 99 intermittently. The conveyance unit 13 may also convey the medium 99 continuously.
[0015] The printing device 11 may include a photographing unit 14. The photographing unit 14 is configured to photograph the medium 99. The photographing unit 14 includes, for example, a camera. The photographing unit 14 photographs the medium 99 before printing is performed by the printing unit 12.
[0016] The photographing unit 14 may be configured to photograph the medium 99 conveyed by the conveying unit 13. In one example, the photographing unit 14 is located upstream of the printing unit 12 in the conveying direction Y1. The photographing unit 14 may be configured to photograph the medium 99 set on the photographing table.
[0017] The photographing unit 14 photographs the medium 99 so that the pattern P1 is captured. In one example, the photographing unit 14 photographs the entire width of the medium 99. The photographing unit 14 may be configured to scan the medium 99 or may be configured to be long in the width direction X1.
[0018] The printing device 11 includes a storage unit 15. The storage unit 15 is configured to store one or more programs. The storage unit 15 includes memories such as ROM and RAM. The storage unit 15 may include storage media such as SSD and HDD.
[0019] In addition to the programs, the storage unit 15 stores various data used during printing. In one example, the storage unit 15 stores the pattern image D1. The storage unit 15 stores the photographed image D2. The storage unit 15 stores the printed image D3. The storage unit 15 stores the mapping data D4. The storage unit 15 stores a plurality of template images T0. The storage unit 15 stores, for example, the first template image T1. The storage unit 15 stores, for example, the second template image T2. The storage unit 15 stores, for example, the third template image T3.
[0020] As shown in Figure 3, pattern image D1 is an image representing pattern P1. Pattern image D1 is the basic data for pattern P1. Pattern image D1 can also be said to be an image representing the ideal pattern P1. More specifically, pattern image D1 shows the ideal shape of pattern P1. Pattern image D1 may be generated by the printing device 11. Pattern image D1 may also be input to the printing device 11 from an external device other than the printing device 11.
[0021] The pattern image D1 may be generated from CAD data showing a pattern P1 created by software. In one example, the pattern image D1 is obtained from CAD data of pattern P1 and a pre-scan image of the medium 99 taken in advance. For example, the pattern image D1 is obtained by correcting the brightness of the image shown in the CAD data based on the brightness shown in the pre-scan image. The CAD data is used to obtain the medium 99 having pattern P1. Based on the CAD data, the medium 99 having pattern P1 may be manufactured by a loom, or the medium 99 having pattern P1 may be manufactured by a printing device 11. The pre-scan image may be obtained by the shooting unit 14 taking a picture of the medium 99 having pattern P1 in advance. The pre-scan image may also be obtained by a shooting device other than the shooting unit 14 taking a picture of the medium 99 having pattern P1 in advance.
[0022] As shown in Figure 4, the captured image D2 is an image of the medium 99. The captured image D2 is an image showing the pattern P1. The captured image D2 is an image of the medium 99 captured across its entire width. The captured image D2 is an image of the medium 99 captured to include at least one cycle of the pattern P1. The captured image D2 may be generated by the printing device 11. In one example, the captured image D2 is generated when the imaging unit 14 photographs the medium 99. The captured image D2 may be input to the printing device 11 from an external device. The captured image D2 may be an image of the medium 99 photographed by an imaging device other than the imaging unit 14.
[0023] The captured image D2 is a different image from the pre-scanned image. Captured image D2 is an image taken during printing. For example, captured image D2 is an image taken during the process of transport by the transport unit 13. Captured image D2 can also be said to represent the state of the medium 99 during printing. Therefore, in captured image D2, distortion may occur in the medium 99 due to the tension applied to the medium 99 during transport, the orientation of the medium 99 during printing, etc.
[0024] As shown in Figure 5, the printed image D3 is an image printed on the medium 99. The printed image D3 shows the shape, color, etc., of the image to be printed on the medium 99 having the pattern P1. The printed image D3 is printed on the medium 99 by the printing unit 12. The printing unit 12 prints the printed image D3 in accordance with the pattern P1. The printed image D3 is, for example, an image that colors the pattern P1. The printed image D3 is not limited to an image that colors the pattern P1; it may be an image that represents a pattern different from the pattern P1, or it may be an image that is the front and back of the pattern P1 inverted. The printed image D3 may be printed on the same side of the medium 99 as the side with the pattern P1, or on the opposite side. The printed image D3 may be generated by the printing device 11. The printed image D3 may be input to the printing device 11 from an external device.
[0025] As shown in Figure 6, the mapping data D4 is data that indicates multiple regions of interest R0 set in the pattern image D1. A region of interest R0 is an area in the pattern image D1 that contains characteristic parts. For example, a region of interest R0 is an area in the pattern image D1 that contains characteristic points. The mapping data D4 indicates the position, size, etc., of each of the multiple regions of interest R0 in the pattern image D1. The mapping data D4 can also be said to be data that defines multiple regions of interest R0. The mapping data D4 may be data that is attached to the pattern image D1. The mapping data D4 may be generated by the printing device 11. For example, the mapping data D4 may be generated by the printing device 11 setting multiple regions of interest R0 in the pattern image D1. The mapping data D4 may be input to the printing device 11 from an external device.
[0026] The region of interest R0 is set manually or automatically. The region of interest R0 may be set manually by the user operating the computer. The region of interest R0 may be set automatically by the computer operating according to a predetermined algorithm. In this case, the region of interest R0 is set by the computer extracting feature points from the pattern image D1.
[0027] The region of interest R0 may be set in areas of the pattern image D1 where the brightness gradient is large. For example, the region of interest R0 may be set at the edges or corners of pattern P1. In the example shown in Figure 6, for clarity, multiple regions of interest R0 are set to be scattered throughout the pattern image D1, not limited to the edges and corners of pattern P1.
[0028] The mapping data D4 may include a first region of interest R1. That is, multiple regions of interest R0 may include a first region of interest R1. The first region of interest R1 is the region containing the first feature point in the pattern image D1. The mapping data D4 may also include a second region of interest R2. That is, multiple regions of interest R0 may include a second region of interest R2. The second region of interest R2 is the region containing the second feature point in the pattern image D1. The mapping data D4 may also include a third region of interest R3. That is, multiple regions of interest R0 may include a third region of interest R3. The third region of interest R3 is the region containing the third feature point in the pattern image D1.
[0029] Of the multiple regions of interest R0, one is the first region of interest R1. Of the multiple regions of interest R0, one other than the first region of interest R1 is the second region of interest R2. Of the multiple regions of interest R0, one other than the first region of interest R1 and the second region of interest R2 is the third region of interest R3.
[0030] The first region of interest R1, the second region of interest R2, and the third region of interest R3 are any region among the multiple regions of interest R0. Therefore, the first region of interest R1, the second region of interest R2, and the third region of interest R3 are not limited to the regions located in the positions shown in Figure 6. The first region of interest R1 may be a region located upstream of the second region of interest R2 in the transport direction Y1. The first region of interest R1 may be a region located downstream of the second region of interest R2 in the transport direction Y1. The first region of interest R1 may be a region located at a different position from the second region of interest R2 in the width direction X1. The first region of interest R1 may be a region located upstream of the third region of interest R3 in the transport direction Y1. The first region of interest R1 may be a region located downstream of the third region of interest R3 in the transport direction Y1. The first region of interest R1 may be a region located at a different position from the third region of interest R3 in the width direction X1. The second region of interest R2 may be located upstream of the third region of interest R3 in the transport direction Y1. The second region of interest R2 may be located downstream of the third region of interest R3 in the transport direction Y1. The second region of interest R2 may be located at a different position from the third region of interest R3 in the width direction X1.
[0031] As shown in Figure 7, the template image T0 is an image containing the region of interest R0. That is, the template image T0 is an image containing the feature points in the pattern image D1. The template image T0 is an image extracted from the pattern image D1. The template image T0 is extracted from the pattern image D1 for each region of interest R0. The first template image T1 is an image containing the first region of interest R1. The second template image T2 is an image containing the second region of interest R2. The third template image T3 is an image containing the third region of interest R3. The template image T0 may be extracted from the pattern image D1 by the printing device 11. The template image T0 may be extracted from the pattern image D1 by an external device. The template image T0 is used for template matching with the captured image D2.
[0032] As shown in Figure 1, the printing device 11 includes a control unit 16. The control unit 16 is configured to execute processing according to a program stored in the storage unit 15. The control unit 16 includes a processor such as a CPU or GPU. The control unit 16 may also include hardware circuits such as an ASIC. In this way, the control unit 16, together with the storage unit 15, realizes a computer. Therefore, the printing device 11 includes a computer. It can also be said that this computer controls the printing device 11.
[0033] The control unit 16 controls various components of the printing apparatus 11. For example, the control unit 16 controls the printing unit 12, the transport unit 13, the imaging unit 14, etc. As a result, the control unit 16 may acquire the pattern image D1, the captured image D2, the printed image D3, the mapping data D4, the template image T0, etc. The control unit 16 may acquire the captured image D2 from the imaging unit 14. The control unit 16 may acquire the mapping data D4 by setting multiple regions of interest R0 in the pattern image D1. The control unit 16 may acquire the template image T0 from the pattern image D1. The control unit 16 may communicate with an external device. The control unit 16 may acquire the pattern image D1, the captured image D2, the printed image D3, the mapping data D4, the template image T0, etc. from an external device.
[0034] The control unit 16 is configured to correct the printed image D3. More specifically, the control unit 16 is configured to correct the printed image D3 to match the distortion of the medium 99. By correcting the printed image D3, the control unit 16 prints the printed image D3 to match the pattern P1. The control unit 16 performs template matching on the captured image D2 in order to understand the distortion of the medium 99. More specifically, the control unit 16 matches the captured image D2 with a template image T0. The control unit 16 performs template matching on the captured image D2 for each template image T0. The control unit 16 matches the captured image D2 with a first template image T1. The control unit 16 matches the captured image D2 with a second template image T2. The control unit 16 matches the captured image D2 with a third template image T3.
[0035] As shown in Figure 8, the control unit 16 extracts the corresponding region S0 by matching the template image T0 with the captured image D2. The corresponding region S0 is the region in the captured image D2 that the template image T0 matches. The corresponding region S0 is the region corresponding to the region of interest R0 contained in the template image T0. That is, the corresponding region S0 is the region containing feature points that correspond to the feature points contained in the region of interest R0.
[0036] The control unit 16 extracts multiple corresponding regions S0 by performing template matching on the captured image D2. The control unit 16 may also extract a first corresponding region S1 by matching the captured image D2 with a first template image T1. The first corresponding region S1 is the region corresponding to the first region of interest R1. The first corresponding region S1 is the region containing the feature points corresponding to the first feature point. The control unit 16 may also extract a second corresponding region S2 by matching the captured image D2 with a second template image T2. The second corresponding region S2 is the region corresponding to the second region of interest R2. The second corresponding region S2 is the region containing the feature points corresponding to the second feature point. The control unit 16 may also extract a third corresponding region S3 by matching the captured image D2 with a third template image T3. The third corresponding region S3 is the region corresponding to the third region of interest R3. The third corresponding region S3 is the region containing the feature points corresponding to the third feature point. Thus, the multiple corresponding regions S0 may include a first corresponding region S1, a second corresponding region S2, a third corresponding region S3, and so on. The control unit 16 determines the position of the pattern P1 in the captured image D2 by extracting the multiple corresponding regions S0. As a result, the control unit 16 determines the distortion of the medium 99.
[0037] The first corresponding region S1 may be located upstream of the second corresponding region S2 in the transport direction Y1. The first corresponding region S1 may be located downstream of the second corresponding region S2 in the transport direction Y1. The first corresponding region S1 may be located at a different position from the second corresponding region S2 in the width direction X1. The first corresponding region S1 may be located upstream of the third corresponding region S3 in the transport direction Y1. The first corresponding region S1 may be located downstream of the third corresponding region S3 in the transport direction Y1. The first corresponding region S1 may be located at a different position from the third corresponding region S3 in the width direction X1. The second corresponding region S2 may be located upstream of the third corresponding region S3 in the transport direction Y1. The second corresponding region S2 may be located downstream of the third corresponding region S3 in the transport direction Y1. The second corresponding region S2 may be located at a different position from the third corresponding region S3 in the width direction X1. The positional relationship between the first corresponding region S1, the second corresponding region S2, and the third corresponding region S3 is determined by the positional relationship between the first region of interest R1, the second region of interest R2, and the third region of interest R3.
[0038] In the printing apparatus 11, tension may be applied to the media 99 during transport to improve print quality. As a result, distortion may occur in the media 99 during printing in the printing apparatus 11. Furthermore, distortion may occur in the media 99 depending on the orientation of the media 99 during printing and the storage conditions of the media 99. If the distortion of the media 99 is large, the accuracy of template matching may decrease. In other words, the pattern P1 that appears in the captured image D2 may be distorted, which may reduce the accuracy of matching with the template image T0. In this case, the printing apparatus 11 may not be able to correctly grasp the position of the pattern P1, and therefore may not be able to correct the printed image D3 accurately.
[0039] <Printing method> Next, a printing method that suppresses the decrease in template matching accuracy will be described. In short, the printing device 11 reduces the risk of a decrease in template matching accuracy by correcting the template image T0 to match the distortion of the medium 99.
[0040] As shown in Figure 9, if distortion occurs in the medium 99, matching the template image T0 to the captured image D2 may result in a discrepancy between the position coordinates of the region of interest R0 indicated by the mapping data D4 and the position coordinates of the corresponding region S0 in the captured image D2. More specifically, a deviation V0 may occur between the position coordinates of the region of interest R0 and the position coordinates of the corresponding region S0. This deviation V0 represents the distortion of the medium 99. If there is no distortion in the medium 99, the position coordinates of the region of interest R0 and the position coordinates of the corresponding region S0 will coincide.
[0041] The printing device 11 calculates the deviation V0 by matching the captured image D2 with a template image T0. More specifically, the printing device 11 calculates the deviation V0 for each corresponding region S0 by performing template matching on the captured image D2 for each template image T0. The printing device 11 may also calculate the first deviation V1 by matching the captured image D2 with a first template image T1. The first deviation V1 is the shift of the first corresponding region S1 with respect to the first region of interest R1. The printing device 11 may also calculate the second deviation V2 by matching the captured image D2 with a second template image T2. The second deviation V2 is the shift of the second corresponding region S2 with respect to the second region of interest R2. The printing device 11 may also calculate the third deviation V3 by matching the captured image D2 with a third template image T3. The third deviation V3 is the shift of the third corresponding region S3 with respect to the third region of interest R3.
[0042] The printing device 11 corrects the template image T0 based on one or more deviations V0. More specifically, the printing device 11 corrects one of the multiple template images T0 based on the deviation V0 between the region of interest R0 contained in the other template images T0 and the corresponding region S0. For example, the printing device 11 corrects the template image T0 to be corrected based on the deviation V0 in the region of interest R0 located around the region of interest R0 contained in that template image T0.
[0043] Let's consider the case where the printing device 11 extracts N corresponding regions S0 by template matching. N is a natural number greater than or equal to 2. In this case, the printing device 11 corrects the template image T0 corresponding to the Mth corresponding region S0 out of the N corresponding regions S0 based on a deviation V0 caused by one or more of the other corresponding regions S0 excluding the Mth corresponding region S0. M is a natural number greater than or equal to 1 and less than or equal to N. That is, the printing device 11 corrects the template image T0 based on a deviation V0 caused by the other corresponding regions S0 excluding the corresponding region S0 that is to be corrected.
[0044] The printing device 11 may correct the template image T0 based on a deviation V0 caused by another corresponding region S0 located downstream in the transport direction Y1 from the corresponding region S0 of the template image T0 to be corrected. The printing device 11 may correct the template image T0 based on a deviation V0 caused by another corresponding region S0 located at a different position in the width direction X1 from the corresponding region S0 of the template image T0 to be corrected. The printing device 11 may correct the template image T0 based on a deviation V0 caused by another corresponding region S0 located upstream in the transport direction Y1 from the corresponding region S0 of the template image T0 to be corrected. The printing device 11 may correct the template image T0 based on a deviation V0 in a region of interest R0 that is small in distance from the region of interest R0 that the template image T0 to be corrected contains. In this case, the template image T0 is corrected with high accuracy.
[0045] The printing device 11 may correct the second template image T2 based on a deviation V0 other than the second deviation V2 among a plurality of deviations V0. The printing device 11 may correct the second template image T2 based on the first deviation V1. The printing device 11 may correct the second template image T2 based on the first deviation V1 and the third deviation V3. If the distance between the second region of interest R2 and the first region of interest R1 is small, the second template image T2 is corrected with good accuracy. If the distance between the second region of interest R2 and the third region of interest R3 is small, the second template image T2 is corrected with good accuracy. The printing device 11 may correct the first template image T1 based on the second deviation V2, the third deviation V3, etc. The printing device 11 may correct the third template image T3 based on the first deviation V1, the second deviation V2, etc.
[0046] As shown in Figure 10, the printing device 11 corrects the template image T0 based on one or more deviations V0. In Figure 10, the dashed line shows the template image T0 before correction. In Figure 10, the solid line shows the template image T0' after correction. The printing device 11 performs a projection transformation on the template image T0 based on one or more deviations V0, for example. That is, the printing device 11 corrects the template image T0 by moving the vertices of the template image T0. In one example, the printing device 11 corrects the second template image T2 based on a first deviation V1 and a third deviation V3.
[0047] The printing device 11 may determine the correspondence between the vertices of the template image T0 and the deviations V0 using a predetermined algorithm. The printing device 11 may assign a one-to-one correspondence between each of the four corners of the template image T0 and the deviations V0. The printing device 11 may assign multiple deviations V0 to one of the four corners of the template image T0.
[0048] The printing device 11 obtains a template image T0' that reflects the distortion of the medium 99 by correcting the template image T0. It can also be said that the printing device 11 updates the template image T0 to template image T0'. The printing device 11 may update all template images T0 to template image T0', or it may update some of the template images T0 to template image T0'. In one example, the printing device 11 obtains a second template image T2' by correcting the second template image T2. The printing device 11 may obtain a first template image T1' by correcting the first template image T1. The printing device 11 may obtain a third template image T3' by correcting the third template image T3. The printing device 11 may correct all of the multiple template images T0. The printing device 11 may correct some of the multiple template images T0.
[0049] As shown in Figures 11 and 12, the printing device 11 may correct the template image T0 based on three or more deviations V0. For example, the printing device 11 may correct the template image T0 based on deviations V0A, V0B, V0C, and V0D from among the multiple deviations V0. In one example, the printing device 11 corrects the template image T0 by moving each of the four corners of the template image T0 based on deviations V0A, V0B, V0C, and V0D.
[0050] As shown in Figure 13, the printing device 11 extracts the corresponding region S0' by matching the template image T0' to the captured image D2. The corresponding region S0' is the region in the captured image D2 that the corrected template image T0' matches. The corresponding region S0' is the region corresponding to the region of interest R0 contained in the template image T0'. It can also be said that the printing device 11 updates the corresponding region S0 to the corresponding region S0'. The printing device 11 may update all of the corresponding regions S0 to the corresponding region S0', or it may update some of the corresponding regions S0 to the corresponding region S0'. The deviation of the corresponding region S0' with respect to the region of interest R0 is the deviation V0'. The corrected template image T0' has improved matching accuracy with respect to the region of interest R0 compared to the template image T0 before correction. Therefore, the deviation V0' accurately represents the distortion of the medium 99 compared to the deviation V0. Based on the deviation V0', the printing device 11 can accurately determine the position of the pattern P1. Therefore, the printing apparatus 11 can accurately determine the distortion of the medium 99 based on the deviation V0'.
[0051] The printing device 11 may extract a first corresponding region S1' by matching the corrected first template image T1' with the captured image D2. The printing device 11 may calculate a first deviation V1', which is the deviation of the first corresponding region S1' with respect to the first region of interest R1. The printing device 11 may extract a second corresponding region S2' by matching the corrected second template image T2' with the captured image D2. The printing device 11 may calculate a second deviation V2', which is the deviation of the second corresponding region S2' with respect to the second region of interest R2. The printing device 11 may extract a third corresponding region S3' by matching the corrected third template image T3' with the captured image D2. The printing device 11 may calculate a third deviation V3', which is the deviation of the third corresponding region S3' with respect to the third region of interest R3.
[0052] The positional relationship between the first corresponding region S1', the second corresponding region S2', and the third corresponding region S3' is not significantly different from the positional relationship between the first corresponding region S1, the second corresponding region S2, and the third corresponding region S3. Therefore, the positional relationship between the first corresponding region S1' and the second corresponding region S2' is not significantly different from the positional relationship between the first corresponding region S1 and the second corresponding region S2. The positional relationship between the first corresponding region S1' and the third corresponding region S3' is not significantly different from the positional relationship between the first corresponding region S1 and the third corresponding region S3. The positional relationship between the second corresponding region S2' and the third corresponding region S3' is not significantly different from the positional relationship between the second corresponding region S2 and the third corresponding region S3. In addition, the positional relationship between the first corresponding region S1 and the second corresponding region S2', and the positional relationship between the second corresponding region S2 and the first corresponding region S1', are not significantly different from the positional relationship between the first corresponding region S1 and the second corresponding region S2. The positional relationship between the first corresponding region S1 and the third corresponding region S3', and the positional relationship between the third corresponding region S3 and the first corresponding region S1', does not differ significantly from the positional relationship between the first corresponding region S1 and the third corresponding region S3. The positional relationship between the second corresponding region S2 and the third corresponding region S3', and the positional relationship between the third corresponding region S3 and the second corresponding region S2', does not differ significantly from the positional relationship between the second corresponding region S2 and the third corresponding region S3. For example, the second corresponding region S2' may be a region located upstream of the first corresponding region S1 in the transport direction Y1. The second corresponding region S2' may be a region located downstream of the first corresponding region S1 in the transport direction Y1. The second corresponding region S2' may be a region located at a different position from the first corresponding region S1 in the width direction X1. The second corresponding region S2' may be a region located upstream of the third corresponding region S3 in the transport direction Y1. The second corresponding region S2' may be a region located downstream of the third corresponding region S3 in the transport direction Y1. The second corresponding region S2' may be a region located at a different position from the third corresponding region S3 in the width direction X1.
[0053] The printing device 11 corrects the printed image D3 based on the calculated deviation V0'. In one example, the printing device 11 corrects the printed image D3 based on the second deviation V2'. The printing device 11 may also correct the printed image D3 based on the first deviation V1'. The printing device 11 may also correct the printed image D3 based on the third deviation V3'. The printing device 11 corrects the printed image D3, for example, by affine transformation.
[0054] The printing device 11 may correct the printed image D3 based on multiple deviations V0'. The more deviations V0' used to correct the printed image D3, the more accurately the printed image D3 will be corrected. In addition to deviations V0', the printing device 11 may also correct the printed image D3 based on deviation V0. For example, in areas where the distortion of the medium 99 is estimated to be relatively small, the printing device 11 may determine that the deviation V0 from the template image T0 before correction accurately represents the distortion of the medium 99. The printing device 11 may use such deviations V0 to correct the printed image D3. The printing device 11 prints the corrected printed image D3 onto the medium 99. As a result, the printed image D3 is printed onto the medium 99 in accordance with the pattern P1.
[0055] Next, an example of the printing process will be described. The printing process is a process performed by a computer. The printing process may be performed by the computer installed in the printing device 11, or by an external computer connected to the printing device 11. In one example, the printing process is performed by the control unit 16. The printing process is performed, for example, by the control unit 16 operating according to a program stored in the storage unit 15. The printing process starts when the control unit 16 receives a print command from the user.
[0056] As shown in Figure 14, in step S11, the control unit 16 acquires the captured image D2 and the template image T0. The control unit 16 acquires the captured image D2 and the template image T0 from the storage unit 15. The control unit 16 may acquire multiple template images T0. In one example, the control unit 16 acquires the first template image T1 and the second template image T2. The control unit 16 may also acquire the third template image T3.
[0057] In step S12, the control unit 16 performs template matching on the captured image D2. Specifically, the control unit 16 matches the captured image D2 with a template image T0. The control unit 16 may successively match multiple template images T0 to the captured image D2. For example, the control unit 16 matches the captured image D2 with a first template image T1. The control unit 16 may match the captured image D2 with a second template image T2. The control unit 16 may match the captured image D2 with a third template image T3.
[0058] In step S13, the control unit 16 extracts corresponding regions S0 from the captured image D2. Specifically, the control unit 16 extracts corresponding regions S0 from the captured image D2 that correspond to the region of interest R0 contained in the template image T0. At this time, the control unit 16 extracts the same number of corresponding regions S0 as the template image T0 used for template matching. In one example, the control unit 16 extracts the first corresponding region S1. The control unit 16 may also extract the second corresponding region S2. The control unit 16 may also extract the third corresponding region S3.
[0059] In step S14, the control unit 16 calculates the deviation V0 between the region of interest R0 and the corresponding region S0. More specifically, the control unit 16 calculates the deviation V0 between the position coordinates of the region of interest R0 and the position coordinates of the corresponding region S0. At this time, the control unit 16 calculates a number of deviations V0 equal to the number of extracted corresponding regions S0. In one example, the control unit 16 calculates the first deviation V1. The control unit 16 may also calculate the second deviation V2. The control unit 16 may also calculate the third deviation V3.
[0060] In step S15, the control unit 16 corrects the template image T0 based on the deviation V0. The control unit 16 obtains a template image T0' by correcting the template image T0 based on one or more deviations V0. At this time, the control unit 16 may obtain multiple template images T0' by correcting multiple template images T0. In one example, the control unit 16 corrects the second template image T2 based on the first deviation V1. The control unit 16 may correct the second template image T2 based on the first deviation V1 and the third deviation V3. The control unit 16 obtains a second template image T2' by correcting the second template image T2. The control unit 16 may obtain a first template image T1' by correcting the first template image T1. The control unit 16 may obtain a third template image T3' by correcting the third template image T3.
[0061] The control unit 16 may accept a specification of the deviation V0 to be used to correct the template image T0 when correcting the template image T0. For example, in step S15, the control unit 16 may accept whether or not to use a third deviation V3 when correcting the second template image T2. If the use of the third deviation V3 is accepted, the control unit 16 may correct the second template image T2 based on the first deviation V1 and the third deviation V3. If the use of the third deviation V3 is not accepted, the control unit 16 may correct the second template image T2 based on the first deviation V1. By not using the third deviation V3, the computational load on the control unit 16 is reduced compared to when the third deviation V3 is used.
[0062] In step S16, the control unit 16 performs template matching on the captured image D2. Specifically, the control unit 16 matches the captured image D2 with a corrected template image T0'. The control unit 16 may successively match multiple template images T0' to the captured image D2. For example, the control unit 16 matches the captured image D2 with a second template image T2'. The control unit 16 may also match the captured image D2 with a first template image T1'. The control unit 16 may also match the captured image D2 with a third template image T3'.
[0063] In step S17, the control unit 16 extracts corresponding regions S0' from the captured image D2. Specifically, the control unit 16 extracts corresponding regions S0' from the captured image D2 that correspond to the region of interest R0 contained in the template image T0'. At this time, the control unit 16 extracts the same number of corresponding regions S0' as the template image T0' used for template matching. In one example, the control unit 16 extracts the second corresponding region S2'. The control unit 16 may also extract the first corresponding region S1'. The control unit 16 may also extract the third corresponding region S3'.
[0064] In step S18, the control unit 16 calculates the deviation V0' between the region of interest R0 and the corresponding region S0'. More specifically, the control unit 16 calculates the deviation V0' between the position coordinates of the region of interest R0 and the position coordinates of the corresponding region S0'. At this time, the control unit 16 calculates a number of deviations V0' equal to the number of extracted corresponding regions S0'. In one example, the control unit 16 calculates the second deviation V2'. The control unit 16 may also calculate the first deviation V1'. The control unit 16 may also calculate the third deviation V3'.
[0065] In step S19, the control unit 16 corrects the printed image D3 based on the deviation V0'. In one example, the control unit 16 corrects the printed image D3 based on the second deviation V2'. The control unit 16 may also correct the printed image D3 based on the first deviation V1' and the second deviation V2'. The control unit 16 may also correct the printed image D3 based on the second deviation V2' and the third deviation V3'. The control unit 16 may also correct the printed image D3 based on the first deviation V1', the second deviation V2', and the third deviation V3'. In addition to the deviation V0', the control unit 16 may also correct the printed image D3 based on the deviation V0. In this case, the computational load on the printing device 11 is reduced compared to the case where the printed image D3 is corrected based on multiple deviations V0'.
[0066] In step S20, the control unit 16 causes the printing unit 12 to print the corrected print image D3. As a result, the print image D3 is printed on the medium 99 in accordance with the pattern P1. In step S21, the control unit 16 determines whether printing is complete. More specifically, the control unit 16 determines whether printing is complete across the entire area of the medium 99. For example, the control unit 16 determines whether printing is complete based on the print job. If printing is complete, the control unit 16 terminates the printing process. If printing is not complete, the control unit 16 returns to step S11. The control unit 16 prints the print image D3 onto the medium 99 one after another in accordance with the pattern P1 by repeating steps S11 to S20.
[0067] <Effects and Effects of the Examples> Next, the operation and effects of the above embodiment will be described. (1) The printing method includes the computer correcting the second template image T2 based on the first deviation V1. The printing method includes the computer extracting the second corresponding region S2' by matching the corrected second template image T2' with the captured image D2. The printing method includes the computer calculating the second deviation V2'. The printing method includes the computer correcting the printed image D3 based on the second deviation V2'. The printing method includes the computer printing the corrected printed image D3 with the printing device 11. According to the above method, the matching accuracy of the second template image T2' with the captured image D2 is improved. As a result, the printed image D3 is corrected with high accuracy.
[0068] (2) In the captured image D2, the first corresponding region S1 is the region located downstream of the second corresponding region S2' in the transport direction Y1. According to the above method, the extraction accuracy of the second corresponding region S2' is improved by the first deviation V1.
[0069] (3) The printing method includes the computer correcting the second template image T2 based on the first deviation V1 and the third deviation V3. According to the above method, the extraction accuracy of the second corresponding region S2' is improved by the first deviation V1 and the third deviation V3.
[0070] (4) The printing method includes accepting whether the computer will use the third deviation V3 to correct the second template image T2. The printing method includes correcting the second template image T2 based on the first deviation V1 and the third deviation V3 if the computer accepts the use of the third deviation V3. The printing method includes correcting the second template image T2 based on the first deviation V1 if the computer does not accept the use of the third deviation V3. According to the above method, the computational load on the computer is reduced by not using the third deviation V3.
[0071] (5) In the captured image D2, the second corresponding region S2' is a region located at a different position from the first corresponding region S1 in the width direction X1. According to the above method, the extraction accuracy of the second corresponding region S2' is improved by the first deviation V1.
[0072] <Example of changes> The above embodiment can be implemented with the following modifications. The above embodiment and the following modifications can be combined with each other to the extent that they do not contradict each other technically.
[0073] The printing device 11 may set a region of interest R0 in the captured image D2. The printing device 11 may extract a template image T0 from the captured image D2. The printing device 11 may match the template image T0 with the pattern image D1. The printing device 11 may extract a corresponding region S0 from the pattern image D1. In these cases as well, the same effects as in the above embodiment can be obtained.
[0074] The printing device 11 may be controlled by a computer in an external device separate from the printing device 11. The external device may acquire the captured image D2. The external device may match the captured image D2 with a template image T0. The external device may extract the corresponding region S0 from the captured image D2. The external device may calculate the deviation V0 between the region of interest R0 and the corresponding region S0. The external device may correct the template image T0 based on the deviation V0. The external device may acquire the corrected template image T0'. The external device may correct the captured image D2 with the template image T0'. The external device may extract the corresponding region S0' from the captured image D2. The external device may calculate the deviation V0' between the region of interest R0 and the corresponding region S0'. The external device may correct the printed image D3 based on the deviation V0'. The external device may provide the corrected printed image D3 to the printing device 11.
[0075] The liquid discharged by the printing unit 12 is not limited to ink; for example, it may be a liquid body in which particles of a functional material are dispersed or mixed in a liquid. For example, the printing unit 12 may discharge a liquid body containing, in the form of dispersion or dissolution, materials such as electrode materials or pixel materials used in the manufacture of liquid crystal displays, electroluminescent displays, and surface-emitting displays.
[0076] <Technical philosophy> The technical concepts and their effects that can be understood from the embodiments and modifications described above are described below.
[0077] (A) A printing method comprising a computer controlling a printing device for printing on a medium, the computer acquiring a photographic image of a medium having a pattern, acquiring a first template image including a first region of interest set in a pattern image showing the pattern, acquiring a second template image including a second region of interest set in the pattern image, extracting a first corresponding region corresponding to the first region of interest by matching the first template image to the photographic image, calculating a first deviation which is the deviation between the position coordinates of the first region of interest in the pattern image and the position coordinates of the first corresponding region in the photographic image, correcting the second template image based on the first deviation, extracting a second corresponding region corresponding to the second region of interest by matching the corrected second template image to the photographic image, calculating a second deviation which is the deviation between the position coordinates of the second region of interest in the pattern image and the position coordinates of the second corresponding region in the photographic image, correcting a printable image showing an image to be printed on the medium based on the second deviation, and causing the printing device to print the corrected printable image. According to the method described above, the accuracy of matching the second template image to the captured image is improved. As a result, the printed image is corrected with greater precision.
[0078] (B) In the above printing method, the first corresponding region in the captured image may be a region located downstream of the second corresponding region in the transport direction in which the medium is transported. According to the above method, the extraction accuracy of the second corresponding region is improved by the first deviation.
[0079] (C) The above printing method may include the following steps: the computer acquires a third template image including a third region of interest set in the pattern image; matches the third template image with the captured image to extract a third corresponding region that corresponds to the third region of interest and is located at a different position from the first corresponding region in a width direction different from the transport direction in which the medium is transported; calculates a third deviation, which is the deviation between the position coordinates of the third region of interest in the pattern image and the position coordinates of the third corresponding region in the captured image; and corrects the second template image based on the first and third deviations. According to the above method, the extraction accuracy of the second corresponding region is improved by the first and third deviations.
[0080] (D) The above printing method may include the computer receiving a request to use the third deviation to correct the second template image, correcting the second template image based on the first and third deviations if the use of the third deviation is accepted, and correcting the second template image based on the first deviation if the use of the third deviation is not accepted. According to the above method, the computational load on the computer is reduced by not using the third deviation.
[0081] (E) In the above printing method, the second corresponding region in the captured image may be a region located at a different position from the first corresponding region in the width direction of the medium. According to the above method, the extraction accuracy of the second corresponding region is improved by the first deviation.
[0082] (F) The printing apparatus comprises a printing unit for printing an image on a medium and a control unit, wherein the control unit is configured to perform the following actions: acquire a captured image of a medium having a pattern; acquire a first template image including a first region of interest set in a pattern image showing the pattern; acquire a second template image including a second region of interest set in the pattern image; extract a first corresponding region corresponding to the first region of interest by matching the first template image to the captured image; calculate a first deviation, which is the deviation between the position coordinates of the first region of interest in the pattern image and the position coordinates of the first corresponding region in the captured image; correct the second template image based on the first deviation; extract a second corresponding region corresponding to the second region of interest by matching the corrected second template image to the captured image; calculate a second deviation, which is the deviation between the position coordinates of the second region of interest in the pattern image and the position coordinates of the second corresponding region in the captured image; correct a print image showing an image to be printed on the medium based on the second deviation; and cause the printing unit to print the corrected print image. According to the above configuration, the same effect as the printing method described above can be obtained.
[0083] (G) The program causes a computer that controls a printing device for printing on a medium to perform the following actions: acquire a captured image of a medium having a pattern; acquire a first template image including a first region of interest set in a pattern image showing the pattern; acquire a second template image including a second region of interest set in the pattern image; extract a first corresponding region corresponding to the first region of interest by matching the first template image to the captured image; calculate a first deviation, which is the deviation between the position coordinates of the first region of interest in the pattern image and the position coordinates of the first corresponding region in the captured image; correct the second template image based on the first deviation; extract a second corresponding region corresponding to the second region of interest by matching the corrected second template image to the captured image; calculate a second deviation, which is the deviation between the position coordinates of the second region of interest in the pattern image and the position coordinates of the second corresponding region in the captured image; correct a print image showing the image to be printed on the medium based on the second deviation; and print the corrected print image on the printing device. The above program provides the same effect as the printing method described above. [Explanation of symbols]
[0084] 11...Printing device, 12...Printing unit, 13...Transport unit, 14...Photography unit, 15...Storage unit, 16...Control unit, 99...Media, D1...Pattern image, D2...Photographed image, D3...Printed image, D4...Mapping data, P1...Pattern, R0...Region of interest, R1...First region of interest, R2...Second region of interest, R3...Third region of interest, S0...Corresponding region, S0'...Corresponding region, S1...First corresponding region, S1'...First corresponding region, S2...Second corresponding region, S2'...Second corresponding region, S3...Third corresponding region, S3'...Third corresponding region, T0...Ten Plate image, T0'... template image, T1... first template image, T1'... first template image, T2... second template image, T2'... second template image, T3... third template image, T3'... third template image, V0... deviation, V0'... deviation, V0A... deviation, V0B... deviation, V0C... deviation, V0D... deviation, V1... first deviation, V1'... first deviation, V2... second deviation, V2'... second deviation, V3... third deviation, V3'... third deviation, X1... width direction, Y1... transport direction.
Claims
1. A printing method in which a computer controls a printing device that prints onto a medium, The aforementioned computer, Acquiring a photograph of a medium having a pattern, To obtain a first template image that includes a first region of interest set in the pattern image showing the aforementioned pattern, To obtain a second template image that includes a second region of interest set in the aforementioned pattern image, By matching the first template image with the captured image, the first corresponding region corresponding to the first region of interest is extracted. The first deviation is calculated, which is the difference between the position coordinates of the first region of interest in the pattern image and the position coordinates of the first corresponding region in the captured image. Correcting the second template image based on the first deviation, By matching the corrected second template image with the aforementioned captured image, a second corresponding region corresponding to the second region of interest is extracted. The second deviation is calculated, which is the difference between the position coordinates of the second region of interest in the pattern image and the position coordinates of the second corresponding region in the captured image. Correcting the printed image that shows the image to be printed on the medium based on the second deviation, A printing method characterized by comprising printing the corrected print image using the printing device.
2. The printing method according to claim 1, characterized in that, in the captured image, the first corresponding region is a region located downstream of the second corresponding region in the transport direction in which the medium is transported.
3. The aforementioned computer, To obtain a third template image that includes a third region of interest set in the aforementioned pattern image, By matching the captured image with the third template image, a third corresponding region corresponding to the third region of interest is extracted, which is located at a different position from the first corresponding region in a width direction different from the transport direction in which the medium is transported. The third deviation is calculated, which is the difference between the position coordinates of the third region of interest in the pattern image and the position coordinates of the third corresponding region in the captured image. The printing method according to claim 1 or 2, characterized by comprising correcting the second template image based on the first deviation and the third deviation.
4. The aforementioned computer, The system accepts whether or not to use the third deviation for correction of the second template image, When the use of the third deviation is accepted, the second template image is corrected based on the first and third deviations, The printing method according to claim 3, further comprising correcting the second template image based on the first deviation if the use of the third deviation is not accepted.
5. The printing method according to claim 1, characterized in that, in the captured image, the second corresponding region is a region located at a different position from the first corresponding region in the width direction of the medium.
6. The printing section prints images onto the medium, It comprises a control unit and, The control unit, Acquiring a photograph of a medium having a pattern, To obtain a first template image that includes a first region of interest set in the pattern image showing the aforementioned pattern, To obtain a second template image that includes a second region of interest set in the aforementioned pattern image, By matching the first template image with the captured image, the first corresponding region corresponding to the first region of interest is extracted. The first deviation is calculated, which is the difference between the position coordinates of the first region of interest in the pattern image and the position coordinates of the first corresponding region in the captured image. Correcting the second template image based on the first deviation, By matching the corrected second template image with the aforementioned captured image, a second corresponding region corresponding to the second region of interest is extracted. The second deviation is calculated, which is the difference between the position coordinates of the second region of interest in the pattern image and the position coordinates of the second corresponding region in the captured image. Correcting the printed image that shows the image to be printed on the medium based on the second deviation, A printing apparatus characterized by being configured to print the corrected print image onto the printing unit.
7. A computer that controls the printing device that prints onto the medium, Acquiring a photograph of a medium having a pattern, To obtain a first template image that includes a first region of interest set in the pattern image showing the aforementioned pattern, To obtain a second template image that includes a second region of interest set in the aforementioned pattern image, By matching the first template image with the captured image, the first corresponding region corresponding to the first region of interest is extracted. The first deviation is calculated, which is the difference between the position coordinates of the first region of interest in the pattern image and the position coordinates of the first corresponding region in the captured image. Correcting the second template image based on the first deviation, By matching the corrected second template image with the aforementioned captured image, a second corresponding region corresponding to the second region of interest is extracted. The second deviation is calculated, which is the difference between the position coordinates of the second region of interest in the pattern image and the position coordinates of the second corresponding region in the captured image. Correcting the printed image that shows the image to be printed on the medium based on the second deviation, A program characterized by causing the corrected print image to be printed by the printing device.
Citation Information
Patent Citations
Printer and printing method
JP2021084360A