Image processing device, image processing method, and computer readable medium

By distinguishing the printing area and surrounding areas in the image processing device, and using different inspection settings and synthesis processing methods, the detection accuracy problem caused by printing position error is solved, and high-precision detection and quality assurance of the printed product is achieved.

CN113311676BActive Publication Date: 2024-12-31CANON KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110203882.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-03-31
Filing Date
2021-02-23
Publication Date
2024-12-31
Estimated Expiration
2041-02-23

AI Technical Summary

Technical Problem

When the existing automatic inspection system detects defects in print products, it is difficult to accurately detect defects around the media due to printing position errors, affecting the quality of the print products.

Method used

By distinguishing the printing area and the surrounding area in the image processing device, different inspection settings and synthesis processing methods are used to perform alignment and defect detection, ensuring that defects around the media can be accurately detected when printing position errors occur.

Benefits of technology

High-precision inspection of printed products is achieved, ensuring the stability of printed product quality and accuracy, and reducing the time and cost of manual visual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113311676B_ABST
    Figure CN113311676B_ABST
Patent Text Reader

Abstract

The present invention provides an image processing device, an image processing method and a computer readable medium. An acquisition unit acquires a first image and a second image, the first image being used as a read image of a printed inspection target medium and the second image being used as a read image of a reference medium representing a target printing result. An inspection unit inspects defects on the inspection target medium based on the first image and the second image by performing inspection under different inspection settings between a printed area and a peripheral area of ​​the inspection target medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image processing device, an image processing method and a computer-readable medium, and in particular to a technology for detecting defects on printed products. Background Art

[0002] Printed products output from a printing device may sometimes have stains due to the attachment of color materials to undesired portions, or may have color loss due to failure to attach a sufficient amount of color materials to portions where images should be formed. It is necessary to ensure the quality of printed products by checking whether such printing defects exist. Visual inspection by an inspector requires a long time and high costs, so an inspection system that automatically performs inspections has recently been proposed. This inspection system can detect whether a printing defect exists on an inspection target based on the difference between a reference image serving as image data representing a defect-free printed product and a target image serving as image data of a printed product serving as an inspection target.

[0003] Generally, the positional relationship between the medium and the pattern printed on the medium changes slightly each time printing due to changes in the printing position accompanied by errors in the medium conveying position in the printing device, changes in the medium size accompanied by errors in the cutting position, etc. When the printed product is automatically checked, alignment is required so that the patterns of the reference image and the target image match each other. For example, Japanese Patent Publication No. 2015-065647 discloses a device for checking a printed product by comparing a read image of the printed product with a main image. In Japanese Patent Publication No. 2015-065647, the main image is obtained by aligning the read image of the preprinted paper before printing and each image in the print image to be printed on the preprinted paper with the read image of the printed product based on a reference point such as an edge point, and then synthesizing them. Summary of the invention

[0004] According to one embodiment of the present invention, an image processing device includes: an obtaining unit, which is configured to obtain a first image and a second image, wherein the first image is used as a read image of a printed inspection target medium, and the second image is used as a read image of a reference medium representing a target printing result; and an inspection unit, which is configured to inspect defects on an inspection target medium based on the first image and the second image by inspecting with different inspection settings between a printing area and a peripheral area of ​​the inspection target medium.

[0005] According to another embodiment of the present invention, an image processing device includes: an obtaining unit, which is configured to obtain a first image serving as a read image of a medium on which printing is performed and a second image different from the first image; and a synthesizing unit, which is configured to synthesize the first image and the second image by performing a synthesis process with different synthesis settings between a printing area and a peripheral area of ​​the medium.

[0006] According to another embodiment of the present invention, an image processing method includes: obtaining a first image serving as a read image of a target inspection medium on which printing has been performed and a second image serving as a read image of a reference medium representing a target printing result; and inspecting defects on the target inspection medium based on the first image and the second image by inspecting with different inspection settings between a printed area and a peripheral area of ​​the target inspection medium.

[0007] According to another embodiment of the present invention, an image processing method includes: obtaining a first image serving as a read image of a medium on which printing is performed and a second image different from the first image; and synthesizing the first image and the second image by performing synthesis processing with different synthesis settings between a print area and a peripheral area of ​​the medium.

[0008] Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings). BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 is a diagram showing the arrangement of a printing system;

[0010] Figure 2 is a block diagram showing the functional arrangement of an image processing apparatus;

[0011] Figure 3 is a flowchart showing the sequence of an image processing method;

[0012] Figure 4A and Figure 4B is a diagram illustrating a pattern region 305 and a peripheral region 306;

[0013] FIG. 5A to FIG. 5C is a diagram for explaining an overview of alignment processing;

[0014] Figure 6 is a block diagram showing the functional arrangement of an image processing apparatus;

[0015] Figure 7 is a flowchart showing the sequence of an image processing method;

[0016] FIG. 8A to FIG. 8C is a diagram for explaining an overview of alignment processing;

[0017] 9A to 9C is a diagram for explaining the overall transformed image;

[0018] Fig. 10A and Fig. 10B is a diagram for explaining defect detection at the periphery of a printing medium;

[0019] Fig.11is a flowchart showing the sequence of processing for generating a peripheral area of ​​a reference image;

[0020] Fig.12 is a flowchart showing the sequence of inspection processing for the surrounding area; and

[0021] Fig.13 is a flowchart showing the sequence of the inspection process including the inspection of the pre-print area. DETAILED DESCRIPTION

[0022] Hereinafter, the embodiments will be described in detail with reference to the accompanying drawings. Please note that the following embodiments are not intended to limit the scope of the invention claimed for protection, and do not limit the invention requiring all feature combinations described in the embodiments. Two or more of the multiple features described in the embodiments can be appropriately combined. In addition, the same reference numerals are given to the same or similar configurations, and their redundant description is omitted.

[0023] In Japanese Patent Laid-Open No. 2015-065647, a master image based on print image data for printing is compared with a read image of a print product. In order to ensure the quality of an actual print product, it is desirable to use a read image of a defect-free print product as a reference image. However, when the positional relationship between a medium and a pattern printed on the medium changes, as described above, if alignment is performed so that the print patterns in the target image and the reference image match each other, the position of the periphery of the medium may change, thereby increasing the difference near the periphery of the medium. As a result, an inaccurate inspection result may be obtained at the periphery of the medium.

[0024] The embodiment of the present invention enables appropriate inspection of printed products even when a printing position error occurs.

[0025] [First embodiment]

[0026] The image processing apparatus according to the first embodiment checks whether there is a defect on the inspection target medium on which printing is performed. In this embodiment, an area where printing is performed (an area where a color material is fixed and a pattern is formed; referred to as a pattern area for short) and an area at the periphery of the medium where printing is not performed (referred to as a peripheral area for short) are determined in the inspection target medium, and an inspection process corresponding to each area is selected. According to the embodiment, even when a printing position error occurs, defects at the periphery of the medium can be detected more accurately.

[0027] (Layout of printing system)

[0028] Figure 11 is a diagram showing the arrangement of an entire printing system that includes an image processing apparatus 100 serving as an image processing apparatus according to a first embodiment and performs output and inspection of printed products. The printing system according to the first embodiment includes the image processing apparatus 100 and a printing apparatus 190. The printing system according to the first embodiment may further include a print server 180.

[0029] The print server 180 generates a print job including a document to be printed, and inputs the print job to the printing device 190. The printing device 190 forms an image on a print medium based on the print job input from the print server 180. The printing device 190 includes a sheet feeding unit 191, and a user can supply a print sheet to the sheet feeding unit 191 in advance. When the print job is input, the printing device 190 forms an image on one or both surfaces of the print medium supplied to the sheet feeding unit 191 while conveying the print medium along a conveying path 192. Then, the printing device 190 sends the print medium to the image processing device 100.

[0030] The image processing apparatus 100 inspects defects on a printed print medium (inspection target medium). The inspection target medium is obtained by forming an image on the print medium by the printing device 190, and is transported through a transport path 192 inside the printing device 190. The image processing apparatus 100 may incorporate a CPU 101, a RAM 102, and a RAM 103. The image processing apparatus 100 may include an image reading device 105, a printing device interface (I / F) 106, a universal interface (I / F), a user interface (UI) panel 108, and a main bus 109. In addition, the image processing apparatus 100 may have a transport path 110 for print media connected to the transport path 192 of the printing device 190. The image processing apparatus 100 may include an output tray 111 to which the inspection target medium determined to be accepted by the inspection is output, and an output tray 112 to which the inspection target medium determined to be rejected by the inspection is output. Figure 1 In the example of FIG. 1 , output trays 111 and 112 are connected to the CPU 101 via the main bus 109. The output tray 111 or 112 is set as a conveyance destination of the inspection target medium according to the inspection result of the inspection target medium.

[0031] The image processing apparatus according to each embodiment to be described later can be realized by a computer including a processor and a memory. For example, the image processing apparatus described later can be realized by executing a program stored in a memory such as RAM 102 or ROM 103 by a processor such as CPU 101. Figure 2 , Figure 6The functions of each unit shown in the figure are as shown in the figure. A processor such as the CPU 101 can also control each module in the image processing apparatus 100 as necessary. Note that the image processing apparatus according to the embodiment of the present invention may be constituted by a plurality of processing apparatuses connected via a network, for example.

[0032] The CPU 101 is a processor that controls each unit in the image processing apparatus 100. The RAM 102 temporarily holds an application executed by the CPU 101, data used for image processing, and the like. The ROM 103 stores a program executed by the CPU 101.

[0033] The image reading device 105 reads one or both surfaces of the print medium sent from the printing device 190 on the conveying path 110, and obtains them as image data. Since the conveying path 110 is used as a background when the image reading device 105 reads the image on the print medium, the conveying path can be configured to have a color (e.g., black) that is easily distinguished from the print medium on the image. The printing device I / F 106 is connected to the printing device 190, and the image processing device 100 can communicate with the printing device 190 via the printing device I / F 106. For example, the printing device 190 and the image processing device 100 can be synchronized via the printing device I / F 106 to notify each other of their operating conditions. The UI panel 108 can output information to the user. The UI panel 108 can be a display device such as a liquid crystal display, and can be used as a user interface of the image processing device 100. The UI panel 108 can notify the user of, for example, the current status or settings of the image processing device 100. The UI panel 108 can include an input device such as a touch panel or a button, and can accept instructions from the user. The main bus 109 is a transmission path that connects the modules of the image processing apparatus 100 .

[0034] While the print medium output from the printing device 190 is transported along the transport path 110, the image processing apparatus 100 performs an inspection process based on the image data of the print medium obtained by the image reading device 105 to inspect whether there is a defect on the print medium. If the print medium is determined to be accepted as a result of the inspection process, it is transported to the output tray 111. If the print medium is determined to be rejected as a result of the inspection process, it is transported to the output tray 112. Through this operation, only the print medium determined to be free of defects is output to the output tray 111.

[0035] (Functional Arrangement of Image Processing Apparatus)

[0036] Figure 2 1 is a block diagram showing the functional arrangement of the image processing apparatus 100 according to the present embodiment. Each rectangular frame represents a functional module that performs each process according to the present embodiment, and each arrow indicates a data flow. Figure 2 The arrangement in FIG. 1 is merely an example, and the image processing apparatus 100 according to the present embodiment is not limited to Figure 2 The image processing device shown in .

[0037] The image acquisition unit 201 acquires a first image serving as a read image of the inspection target medium on which printing is performed and a second image serving as a read image of the reference medium representing the target printing result. In the present embodiment, the image acquisition unit 201 acquires image data obtained by reading the printing medium on the conveying path 110 by the image reading device 105. The image reading device 105 reads the printing medium at least at two different times and generates respective image data of the printing medium. The image obtained by reading the reference medium at the first time by the image reading device 105 will be referred to as the reference image 301, and the image obtained by reading the inspection target medium at the second or subsequent time will be referred to as the target image 302.

[0038] The region determination unit 202 determines the pattern region 305 and the peripheral region 306 of each of the reference image 301 and the target image 302 obtained by the image acquisition unit 201. The region determination unit 202 can determine the region to which each pixel of the image data belongs. In this embodiment, the region determination unit 202 divides the target image 302 into the pattern region 305 and the peripheral region 306. The region determination unit 202 can also divide the reference image 301 into the pattern region 305 and the peripheral region 306.

[0039] The process selection unit 203 sets the inspection performed by the inspection processing unit 205 according to the type of the area determined by the area determination unit 202. In the present embodiment, the process selection unit 203 selects the inspection process for each of the pattern area 305 and the peripheral area 306.

[0040] The alignment unit 204 aligns the reference image 301 and the target image 302. The alignment unit 204 may align the images according to the brightness of the images. For example, the alignment unit 204 may align the reference image 301 and the target image 302 based on the objects in the images. More specifically, the alignment unit 204 may calculate geometric correction parameters so that when geometric correction is performed on one image, the object in one image is close to the object in the other image.

[0041] According to the present embodiment, the alignment unit 204 aligns the pattern area 305 of the target image 302 with the reference image 301. For example, the alignment unit 204 may calculate the position displacement amount between the target image 302 and the image in the pattern area 305 of the reference image 301 based on the brightness of the pattern area 305 observed from each image in the target image 302 and the reference image 301. The position displacement amount calculated in the present embodiment may include a translation amount, a rotation amount, and a scaling amount.

[0042] The inspection processing unit 205 inspects defects on the inspection target medium based on the reference image 301 and the target image 302. In the present embodiment, the inspection processing unit 205 performs the inspection with different inspection settings between the print area and the peripheral area of ​​the inspection target medium. The processing selection unit 203 performs the inspection setting. In the present embodiment, as for the print area of ​​the inspection target medium (i.e., the pattern area 305 of the target image 302), the inspection processing unit 205 determines the defect based on the comparison between the target image 302 and the reference image 301. For example, the inspection processing unit 205 may calculate the difference between the reference image 301 and the target image 302, and perform the inspection in a state where the alignment unit 204 aligns them. The inspection processing unit 205 may determine that a portion where there is a large difference between the reference image 301 and the target image 302 is a defective portion. As for the peripheral area of ​​the inspection target medium (i.e., the peripheral area 306 of the target image 302), the inspection processing unit 205 determines the defect with a different inspection setting from the print area. The detailed method will be described later.

[0043] (Processing performed by image processing device)

[0044] Processing performed by the image processing apparatus 100 having the above-described arrangement according to the present embodiment will be described below. Figure 3 : is a flowchart showing the sequence of processing performed by the image processing apparatus 100 .

[0045] In step S1010, the image obtaining unit 201 obtains the reference image 301 obtained by the image reading device 105 reading the reference medium on the transport path 110 in the above-described manner, and stores it in the RAM 102. The reference image 301 is used for subsequent processing to check each target image 302.

[0046] In step S1020, the image obtaining unit 201 obtains the target image 302 obtained by the image reading device 105 reading the inspection target medium on the transport path 110 in the above manner, and stores it in the RAM 102. In subsequent steps S1030 to S1070, the target image 302 obtained in step S1020 is inspected.

[0047] In step S1010, the image reading device 105 may generate a reference image 301 by reading a reference medium. In step S1020, the image reading device 105 may generate a target image 302 by reading an inspection target medium. The present embodiment is also applicable to a case where a reference image 301 or a target image 302 obtained by another device is used. For example, a reference image 301 or a target image 302 obtained by a device different from the image reading device 105 may be stored in an auxiliary storage device (not shown). In this case, the image obtaining unit 201 may obtain the reference image 301 or the target image 302 from the auxiliary storage device in step S1010 or S1020.

[0048] Figure 4A 302 is a diagram showing an example of a target image 302. The target image 302 includes a print medium area 304 in which a print medium is captured and a background area 303 in which a print medium is not captured. Figure 4A In the example of FIG. 3 , in order to obtain an image of the entire print medium, the image reading device 105 reads the target image 302, thereby capturing the transport path 110 as a background around the print medium area 304. In this embodiment, the transport path 110 is black, so the background area 303 becomes black. Similar to the target image 302, the reference image 301 includes a print medium area where the print medium is captured and a background area where the print medium is not captured.

[0049] In step S1030, the region determination unit 202 detects the pattern region 305 and the peripheral region 306 in the target image 302 by performing region determination on the target image 302. In this example, the region determination unit 202 first extracts the print medium region 304 from the target image 302. The region determination unit 202 can extract the print medium region 304 in the following manner. First, the region determination unit 202 binarizes the target image 302, tracks pixels serving as boundaries between white pixels and black pixels, and linearly approximates four sides representing the outline of the print medium. As a result, four straight lines representing the outline of the print medium region 304 are estimated. Then, the region determination unit 202 calculates the intersection of the four straight lines. The intersection corresponds to Figure 4A Vertices 308a to 308d of the print medium area 304 shown in FIG. Needless to say, the method of extracting the print medium area 304 is not limited to the above method, and another method may also be used.

[0050] Thereafter, the area determination unit 202 detects the pattern area 305 and the peripheral area 306 from the print medium area 304 of the target image 302. In the present embodiment, the area determination unit 202 determines to which of the pattern area and the peripheral area 306 each pixel constituting the print medium area 304 belongs. Figure 4BThe target image 302, the print medium area 304, and the pattern area 305 (in Figure 4B ) and the peripheral area 306 (shown as an area with white and pattern in Figure 4B The relationship between the shadows in Figure 4B In the example shown in FIG. 3 , the interior of the print medium area 304 belongs to the pattern area 305 or the peripheral area 306 .

[0051] In this embodiment, the area determination unit 202 may determine an area within a predetermined distance from the outline of the medium on the reference image 301 or the target image 302 as the peripheral area 306. For example, the area determination unit 202 may extract an area within a predetermined distance from the outline of the print medium area 304 as the peripheral area 306, and extract the remaining area as the pattern area 305. The predetermined distance defining the peripheral area 306 may be referred to as a peripheral margin, and the peripheral margin is pre-set by the user before processing.

[0052] The method of detecting the peripheral area 306 is not limited to the above method. For example, the area determination unit 202 may detect a mark applied to the medium on the reference image 301 or the target image 302, and determine the peripheral area 306 based on the coordinates of the mark. More specifically, when a registration mark such as a register mark is printed on the print medium, the area determination unit 202 may set the peripheral margin based on the coordinates of the registration mark. The peripheral margin may be set based on the margin amount or the printing position error amount when the printing device 190 prints on the medium on the reference image 301 or the target image 302. For example, the area determination unit 202 may obtain information indicating the average value of the margin size and the printing error amount when printing from the printing device 190, and set the sum of the average values ​​of the margin size and the printing error amount as the peripheral margin. In addition, the area determination unit 202 may determine a plain area of ​​the print medium area 304 as the peripheral area 306, and determine the remaining area as the pattern area 305.

[0053] In the present embodiment, the region determination unit 202 calculates characteristic information (in this example, average luminance) about the peripheral region 306 detected from the reference image 301. This characteristic information is used in step S1060, and the details thereof will be described later.

[0054] By performing similar processing on the reference image 301, the region determination unit 202 can extract the print medium region 304 of the reference image 301. In addition, the region determination unit 202 can extract the pattern region 305 and the peripheral region 306 of the reference image 301. Note that the image acquisition unit 201 can extract the print medium region 304, the pattern region 305, and the peripheral region 306 of the reference image 301 in step S1010.

[0055] In step S1040, the process selection unit 203 selects the details of the detection process to be performed on the pattern area 305 in step S1060, and the details of the inspection process to be performed on the peripheral area 306 in step S1070. In step S1060, defect determination is performed on the pattern area 305 with the settings selected by the process selection unit 203. In step S1070, defect determination is performed on the peripheral area 306 with the settings selected by the process selection unit 203. The details of the inspection process selected by the process selection unit 203 can be set in advance by the user before the process. In the present embodiment, for the pattern area 305, the process selection unit 203 selects the defect determination process based on the comparison between the reference image 301 and the target image 302, and for the peripheral area 306, the process selection unit 203 selects the defect determination process based on the comparison between the target image 302 and the feature information.

[0056] In step S1050, the alignment unit 204 aligns the reference image 301 and the target image 302. In the present embodiment, the defect determination process based on the comparison between the reference image 301 and the target image 302 is performed only on the pattern area 305. Therefore, the alignment unit 204 aligns the reference image 301 and the target image 302 based on the pattern area 305.

[0057] Reference will be made to the diagram showing an overview of the alignment process. FIG. 5A to FIG. 5C An example of processing performed by the alignment unit 204 will be described below. Figure 5A A pattern area 305 and reference points 307 a to 307 c in the reference image 301 are shown. Figure 5B The pattern area 305 and reference points 307a to 307c in the target image 302 are shown. The reference point 307 is a point indicating the same part of the same object in the pattern area 305 of the reference image 301 and the target image 302, also known as a feature point. In this embodiment, three reference points 307a to 307c are set for alignment. Figure 5A and Figure 5B , the same reference numerals denote corresponding reference points. For example, although the coordinates in the respective images are different, reference point 307a of reference image 301 and reference point 307a of target image 302 indicate the same portion of the pattern. This also applies to reference points 307b and 307c.

[0058] In the present embodiment, the positions of the reference points 307a to 307c for the pattern to be printed by the printing device 190 are pre-set. Note that the user can manually set the reference points 307a to 307c while viewing the pattern. The reference points 307a to 307c can be automatically set using image feature quantities such as SIFT or SURF. The alignment unit 204 can detect the set reference points 307a to 307c by performing image analysis on the reference image 301 and the pattern area 305 of the target image 302. In the present embodiment, printing is performed on the inspection target medium according to the preset printing data, so the approximate occurrence position of the reference point can be predicted. The alignment unit 204 can detect the reference points 307a to 307c by setting a window of a predetermined size (e.g., 32×32 pixels) near the predicted position of the reference points 307a to 307c, and perform template matching. As another method, the alignment unit 204 can detect the reference points 307a to 307c using a process of detecting the above-mentioned image feature quantities such as SIFT or SURF.

[0059] The alignment unit 204 detects the reference points 307a to 307c to obtain the coordinates of the respective reference points 307a to 307c of each image in the reference image 301 and the target image 302. The coordinates of the reference points 307a, 307b, and 307c in the reference image 301 are defined as (x1a, y1a), (x1b, y1b), and (x1c, y1c), respectively. The coordinates of the reference points 307a, 307b, and 307c in the target image 302 are defined as (x2a, y2a), (x2b, y2b), and (x2c, y2c), respectively.

[0060] Then, the alignment unit 204 aligns the reference image 301 and the target image 302 based on the positions of the corresponding reference points 307a to 307c detected from the reference image 301 and the target image 302. For example, when applying a geometric transformation to the reference image 301, the alignment unit 204 may calculate the geometric transformation for alignment so that the positions of the reference points 307a to 307c in the reference image 301 and the target image 302 match each other. In this embodiment, the alignment unit 204 calculates the transformation X from the reference image 301 to the pattern area 305 of the target image 302 according to equation (1):

[0061] AX=B (1)

[0062] in,

[0063]

[0064]

[0065]

[0066] In equation (1), X is an affine transformation and represents a displacement amount obtained by combining translation, rotation, scaling, and shearing from reference image 301 to target image 302. Transformation X can be calculated by multiplying the right side of B in equation (1) by the inverse matrix of A.

[0067] Then, the alignment unit 204 generates a transformed image 309 by applying the calculated transformation X to each pixel constituting the print medium area 304 in the reference image 301. Figure 5C As shown, the pattern in the pattern area 305 of the generated transformed image 309 is aligned with the target image 302. That is, the positions of the reference points 307a to 307c in the transformed image 309 and the target image 302 match each other. In this way, the alignment unit 204 can align the reference image 301 and the target image 302.

[0068] In step S1060, the inspection processing unit 205 performs the inspection processing selected by the processing selection unit 203 in step S1040 on the peripheral area 306. As described above, in the present embodiment, the inspection processing unit 205 performs the defect determination processing on the peripheral area 306 based on the comparison between the target image 302 and the feature information. More specifically, the inspection processing unit 205 can detect defects in the peripheral area 306 of the inspection target medium by comparing the image information at each position of the peripheral area 306 of the target image 302 with the feature information having a predetermined value.

[0069] The image information at each position of the peripheral area 306 of the target image 302 may be the luminance of each pixel. Feature information having a predetermined value (hereinafter referred to as a feature value) may be feature information about the peripheral area 306. The feature information may be, for example, a representative luminance of a pixel belonging to the peripheral area 306. The representative luminance is a luminance representing the peripheral area 306. For example, when the print medium is white paper, the representative luminance may be a typical luminance of white paper read by the image acquisition unit 201.

[0070] In the present embodiment, the inspection processing unit 205 uses the feature information about the peripheral area 306 of the reference image 301 obtained by the image obtaining unit 201 as a feature value. In the present embodiment, the inspection processing unit 205 uses the average luminance of the peripheral area 306 detected from the reference image 301 in step S1030 as a feature value. Then, for each pixel of the peripheral area 306 of the target image 302, the inspection processing unit 205 calculates the difference between the pixel value and the feature value. The inspection processing unit 205 can determine that a pixel having a calculated difference greater than a threshold value is a defective pixel.

[0071] Note that the inspection processing unit 205 may use a preset value as a feature value instead of the representative luminance of the peripheral area 306 detected from the reference image 301. For example, the feature value may be set in advance according to the type of printing medium. This setting may omit the process of detecting the peripheral area 306 of the reference image 301 by the area determination unit 202. Even when a printing position error occurs, the printed product can be properly inspected.

[0072] In step S1070, the inspection processing unit 205 performs the inspection processing selected by the processing selection unit 203 in step S1040 on the pattern area 305. As described above, in the present embodiment, the inspection processing unit 205 performs the defect determination processing for the pattern area 305 based on the comparison between the reference image 301 and the target image 302. More specifically, the inspection processing unit 205 detects defects in the pattern area 305 of the inspection target medium by comparing the target image 302 and the reference image 301 aligned based on the objects in the images. As described above, in step S1050, the alignment unit 204 generates the transformed image 309 by the alignment processing of the reference image 301 and the target image 302. For each pixel of the pattern area 305 in the target image 302, the inspection processing unit 205 calculates the difference between the target image 302 and the transformed image 309. The inspection processing unit 205 can determine that a pixel having a calculated difference greater than a threshold value is a defective pixel.

[0073] When the inspection processing unit 205 detects a defective pixel in step S1060 or step S1070, it is determined that the inspection target medium is rejected. At this time, the CPU 101 of the image processing apparatus 100 controls to transfer the inspection target medium to the output tray 112. When the inspection processing unit 205 does not detect a defective pixel, it is determined that the inspection target medium is accepted. At this time, the CPU 101 of the image processing apparatus 100 controls to transfer the inspection target medium to the output tray 111.

[0074] In step S1080, the inspection processing unit 205 determines whether to transfer the next inspection target medium to the image processing apparatus 100. If the printing device 190 further prints on the printing medium and the inspection target medium is transferred to the image processing apparatus 100, the process returns to step S1020 to continue. Figure 3 If printing and checking are completed, then Figure 3 The processing in is completed.

[0075] In the above example, the alignment unit 204 aligns the reference image 301 and the target image 302 in step S1050 by transforming the reference image 301 using the transformation X. Alternatively, the alignment unit 204 may align the target image 302 relative to the reference image 301 by transforming the target image 302. For example, a transformed image may be generated by transforming the target image 302 using a different transformation Y. The transformation Y may be given by equation (2):

[0076] BY=A... (2)

[0077] In equation (2), matrix A and matrix B are the same as in equation (1). In the transformed image, the pattern in pattern region 305 is aligned with reference image 301. In this case, inspection processing unit 205 may calculate the difference between reference image 301 and the transformed image in step S1070.

[0078] According to the first embodiment, for each of the pattern area and the peripheral area on the inspection target medium, the inspection process corresponding to the area is performed. With this arrangement, even when a print position error occurs, defects at the periphery of the medium can be detected more accurately.

[0079] (Modification of the first embodiment)

[0080] In the first embodiment, for the pattern area 305, a defect determination process based on the comparison between the reference image 301 and the target image 302 is used, and for the peripheral area 306, a defect determination process based on the comparison between the target image 302 and the feature information is used. However, the combination of the inspection setting for the defect determination of the pattern area 305 and the inspection setting for the defect determination of the peripheral area 306 is not limited thereto. For example, even for the peripheral area 306, the process selection unit 203 may select the defect determination process based on the comparison between the reference image 301 and the target image 302. In this case, the process selection unit 203 may set the value that is different between the inspection of the pattern area 305 and the inspection of the peripheral area 306 as the threshold value for the defect determination performed by the inspection processing unit 205. For example, by comparing the difference between the transformed image 309 and the target image 302 in the pattern area 305 with the first threshold value, the inspection processing unit 205 can detect a defect in the pattern area 305 of the inspection target medium. In contrast, the inspection processing unit 205 can detect defects in the peripheral area 306 of the inspection target medium by comparing the difference between the transformed image 309 and the target image 302 in the peripheral area 306 with a second threshold value different from the first threshold value. Even with this arrangement, inspection can be performed with different inspection settings between the pattern area 305 and the peripheral area 306.

[0081] The processing selection unit 203 detects defects in the pattern area 305 of the inspection target medium, but it may omit detection of defects in the peripheral area 306 of the inspection target medium. For example, the inspection method may be set to not perform defect determination on the peripheral area 306 based on an input or setting from a user. Even with this arrangement, inspection may be performed with different inspection settings between the pattern area 305 and the peripheral area 306. Furthermore, the processing selection unit 203 may set the inspection method so as to perform defect determination using the same method between the pattern area 305 and the peripheral area 306 based on an input or setting from a user.

[0082] [Second embodiment]

[0083] In the second embodiment, similar to the first embodiment, the presence or absence of defects on the inspection target medium is checked using inspection processing corresponding to each of the pattern area and the peripheral area. In the second embodiment, in particular, for the peripheral area of ​​the inspection target medium, defects are also determined based on the comparison between the reference image and the target image. In the second embodiment, alignment processing corresponding to each of the pattern area and the peripheral area is performed, so that defects are determined with different inspection settings between the pattern area and the peripheral area. The functional arrangement of the image processing device 100 according to the second embodiment is the same as that of the first embodiment. Figure 2 The functional arrangement of the image processing apparatus 100 according to the first embodiment shown is similar, and differences from the first embodiment will be described below.

[0084] The process selection unit 203 selects inspection settings for the pattern region 305 and the peripheral region 306. In the second embodiment, the process selection unit 203 selects details of alignment processing for inspecting the pattern region 305 and details of alignment processing for inspecting the peripheral region 306.

[0085] The alignment unit 204 aligns the reference image 301 and the target image 302 by the first method for inspecting the pattern area 305. In the second embodiment, similarly to the first embodiment, the alignment unit 204 aligns the reference image 301 and the target image 302 based on the pattern area 305 to inspect the pattern area 305. The inspection processing unit 205 compares the aligned reference image 301 and the target image 302 to detect a defect in the pattern area 305 of the inspection target medium. The alignment unit 204 aligns the reference image 301 and the target image 302 by the second method for inspecting the peripheral area 306. In the second embodiment, the alignment unit 204 aligns the reference image 301 and the target image 302 based on the peripheral positions of the inspection target medium and the reference medium to inspect the peripheral area 306. The inspection processing unit 205 compares the aligned reference image 301 and the target image 302 to detect a defect in the peripheral area 306 of the inspection target medium. Details of this process will be described below.

[0086] Will refer to Figure 3 The flowchart of describes the processing performed by the image processing apparatus 100 according to the second embodiment. The processing in step S1010 to step S1030 is similar to the processing in the first embodiment. In step S1040, as described above, the processing selection unit 203 selects the details of the alignment processing for the pattern area 305 and the details of the alignment processing for the peripheral area 306 performed in step S1050. In the second embodiment, similar to the first embodiment, for the pattern area 305, the alignment processing using the affine transformation based on the reference points 307a to 307c is selected. For the peripheral area 306, the alignment processing using the affine transformation based on the positions of the four vertices of the print medium is selected.

[0087] Similar to the first embodiment, in step S1050, the reference image 301 and the target image 302 are aligned based on the pattern area 305. That is, the alignment unit 204 may calculate the transformation X based on the reference points 307a to 307c of the reference image 301, and generate the transformed image 309 by applying the transformation X to the reference image 301. In step S1050, the alignment unit 204 aligns the reference image 301 and the target image 302 based on the peripheral area 306.

[0088] FIG. 8A to FIG. 8C This is a diagram for explaining the outline of the alignment processing based on the peripheral area 306. Fig. 8A and Figure 8B The relationship between the vertices 308a to 308d of the reference image 301, the target image 302, the pattern area 305, the peripheral area 306, and the print medium area 304 is shown. The alignment unit 204 aligns the reference image 301 and the target image 302 based on the coordinates of the vertices 308a to 308d of the respective print medium areas 304 in the reference image 301 and the target image 302 that have been detected in step S1030. For example, when a geometric transformation is applied to the reference image 301, the alignment unit 204 may calculate the geometric transformation for alignment so that the positions of the vertices 308a to 308d in the reference image 301 and the target image 302 match each other. In this embodiment, the alignment unit 204 may calculate the transformation X' of the peripheral area 306 from the reference image 301 to the target image 306 according to equation (3):

[0089] A'X'=B'...(3)

[0090] in,

[0091]

[0092]

[0093]

[0094] Since A′ and B′ in equation (3) are not square matrices, the alignment unit 204 calculates the Moore-Penrose pseudo-inverse matrix with respect to the matrix A′, and can calculate X′.

[0095] The alignment unit 204 generates a surrounding transformed image 310 by applying the calculated transformation X′ to each pixel of the print medium area 304 of the reference image 301 . Figure 8C A state in which the target image 302 is aligned with the surrounding transformed image 310 obtained by transforming the reference image 301 using the transformation X' through the alignment process is shown. At this stage, the positions of the vertices 308a to 308d of the print medium area 304 and the positions of the surrounding area 306 in the surrounding transformed image 310 and the target image 302 match each other. In contrast, the positions of the surrounding transformed image 310 and the pattern area 305 in the target image 302 may not match each other.

[0096] Finally, the alignment unit 204 generates an overall transformed image 311 by synthesizing the peripheral transformed image 310 and the transformed image 309 . 9A to 9C 31 is a diagram for explaining the overall transformed image 311. The alignment unit 204 generates the overall transformed image 311 by combining an image corresponding to the pattern region 305 of the target image 302 in the transformed image 309 and an image corresponding to the position of the peripheral region 306 of the target image 302 in the peripheral transformed image 310. Since the pattern region 305 and the peripheral region 306 of the target image 302 do not overlap each other, the alignment unit 204 can generate a unique overall transformed image 311. The generated overall transformed image 311 corresponds to the result of aligning the overall reference image 301 with the target image 302.

[0097] In the present embodiment, the processing in step S1060 and step S1070 can be performed simultaneously. That is, for each pixel of the target image 302, the inspection processing unit 205 can calculate the difference between the target image 302 and the overall transformed image 311. The inspection processing unit 205 can determine that a pixel having a calculated difference greater than a threshold value is a defective pixel. The processing in step S1080 is similar to the processing in the first embodiment. In this way, the processing according to the second embodiment can be performed.

[0098] Note that it is not necessary to generate the entire transformed image 311 in step S1050. For example, different transformed images may be used to detect defects for the pattern area 305 and the peripheral area 306. In this case, in step S1060, the inspection processing unit 205 may calculate the difference between the peripheral transformed image 310 and the target image 302 for each pixel in the peripheral area 306, and compare the difference with a threshold. In step S1070, the inspection processing unit 205 may calculate the difference between the transformed image 309 and the target image 302 for each pixel in the pattern area 305, and compare the difference with a threshold.

[0099] According to the second embodiment, for each of the pattern area and the peripheral area on the inspection target medium, an inspection process using different alignment processes corresponding to the area is performed. With this arrangement, even when a print position error occurs, defects at the periphery of the medium can be detected more accurately. In particular, in the second embodiment, even when image comparison is performed in the peripheral area, defects near the periphery of the medium can be detected more accurately.

[0100] [Third embodiment]

[0101] In the first and second embodiments, defects in a target image are detected by comparing the target image with a reference image at least in a pattern area. Even in conventional techniques, defects in a target image are detected by comparing the target image with a reference image. In the first embodiment, a reference image is obtained by reading a reference medium. In the third embodiment, a reference image is generated based on a reading result of a reference medium. For example, in the third embodiment, a reference image can be generated based on a read image obtained by reading each reference medium. This arrangement increases the S / N ratio of the reference image, and high accuracy of defect inspection is expected.

[0102] If a print position error occurs on each reference medium, it is necessary to align it before synthesizing the read image. If alignment is performed even in this case so that the patterns match each other, similar to the first and second embodiments, the mismatch at the periphery of the medium increases, and an incorrect reference image may be generated. Therefore, in the third embodiment, the pattern area and the peripheral area on the reference medium are determined, and a plurality of read images are synthesized into a reference image through synthesis processing corresponding to each area. The reference image thus generated can be used to increase the accuracy of the inspection according to the first and second embodiments. The reference image generated according to the third embodiment can also be used in an inspection according to conventional technology.

[0103] Figure 6 1 is a block diagram showing the functional arrangement of the image processing apparatus 100 according to the third embodiment. Figure 2 The functional arrangement of the image processing apparatus 100 according to the first embodiment shown is similar, and differences from the first embodiment will be described.

[0104] The image acquisition unit 201 obtains a first image of a read image of a reference medium representing a target printing result and a second image different from the first image. In the present embodiment, an image obtained by reading a reference medium at a first time by the image reading device 105 will be referred to as a first read image, and an image obtained by reading another reference medium at a second or subsequent time will be referred to as a second read image. The image acquisition unit 201 is similar to the image acquisition unit in the first embodiment except that the first read image and the second read image are obtained instead of the reference image 301 and the target image 302. The image acquisition unit 201 can obtain a plurality of second read images by reading respective reference images. The second read images can be sequentially synthesized to the first read image. Sometimes the first read image to which the first read image or one or more second read images are synthesized is referred to as a processed image.

[0105] The area determination unit 202 , the process selection unit 203 , and the alignment unit 204 are similar to those in the first embodiment, except that they process the processed image and the second read image instead of the reference image 301 and the target image 302 .

[0106] The synthesis processing unit 206 synthesizes the first read image and the second read image. In order to detect defects on the inspection target medium on which printing is performed, the synthesis processing unit 206 can generate a reference image to be compared with the read image of the inspection target medium. The synthesis processing unit 206 performs synthesis processing with different synthesis settings between the pattern area 305 and the peripheral area 306 of the medium. In this embodiment, the synthesis processing unit 206 can generate a reference image by repeating the synthesis processing of the second read image to the processed image. An image obtained by synthesizing one second read image to the processed image is called a synthesized image.

[0107] In the present embodiment, the synthesis processing unit 206 generates an image in the pattern area 305 of the synthesized image by synthesizing the processed image with the second read image. The synthesis processing unit 206 generates the image in the pattern area 305 of the synthesized image by synthesizing the processed image with the second read image according to the alignment of the alignment unit 204. In the present embodiment, the synthesis processing unit 206 generates the image in the pattern area 305 of the synthesized image by synthesizing the processed image aligned based on the object in the image with the second read image.

[0108] The synthesis processing unit 206 generates information for inspecting the peripheral area 306 on the inspection target medium with a synthesis setting different from the synthesis setting of the pattern area 305. The synthesis processing unit 206 synthesizes the feature information of the image in the peripheral area 306 of the medium among the processed image and the second read image. In the first embodiment, such feature information can be used to inspect the peripheral area on the inspection target medium (target image 302). In the third embodiment, the synthesis processing unit 206 sets the pixel value in the peripheral area 306 of the synthesized image with the feature value obtained by synthesizing the feature value of the peripheral area 306 of the processed image with the feature value of the peripheral area 306 of the second read image. The obtained synthesized image can be used as a reference image in the first and second embodiments, and the obtained synthesized image includes the pattern area 305 synthesized with the aligned processed image and the second read image and the peripheral area 306 with a predetermined pixel value.

[0109] Processing performed by the image processing apparatus 100 having the above-described arrangement according to the present embodiment will be described below. Figure 7 is a flowchart showing the sequence of processing performed by the image processing apparatus 100. Figure 7 In the illustrated process, a plurality of second read images are sequentially synthesized to the first read image.

[0110] In step S1010, the image acquisition unit 201 acquires a first read image similarly to the first embodiment except that the first read image is acquired instead of the reference image 301. The acquired first read image is used as a processing image. In step S1020, the image acquisition unit acquires a second read image similarly to the first embodiment except that one of the second read images is acquired instead of the target image 302.

[0111] In step S1030, similarly to the first embodiment, the region determination unit 202 detects the pattern region 305 and the peripheral region 306 in the processed image by performing region determination on the processed image. Similarly, the region determination unit 202 detects the pattern region 305 and the peripheral region 306 in the second read image by performing region determination on the second read image. In addition, the region determination unit 202 calculates the feature value of the peripheral region 306 of the second read image. This feature value is used in step S1100. Only in the first loop, the region determination unit 202 replaces the pixel values ​​of all pixels belonging to the peripheral region 306 of the first read image (=processed image) with the feature value of the peripheral region 306. As for the feature value, the feature value of the peripheral region 306 in this example is the average luminance of the pixels belonging to the peripheral region 306, which will be described later.

[0112] In step S1040, the process selection unit 203 selects the details of the synthesis process to be performed on the pattern area 305 in step S1100, and the details of the synthesis process to be performed on the peripheral area 306 in step S1110. In the present embodiment, the synthesis process based on the average of the processed image and the second read image is selected for the pattern area 305, and the synthesis process based on the feature value is selected for the peripheral area 306. The detailed process selection method is similar to that in the first embodiment.

[0113] In step S1050, the alignment unit 204 aligns the processed image and the second read image. In the third embodiment, similar to the first embodiment, the processed image and the second read image are aligned based on the pattern area 305. For example, the alignment unit 204 can calculate the transformation X from the processed image to the pattern area 305 of the second read image based on the reference point. Then, similar to the first embodiment, the alignment unit 204 generates a transformed image by applying the calculated transformation X to each pixel constituting the print medium area 304 in the processed image. As a result, the alignment unit 204 can align the processed image and the second read image.

[0114] In step S1100, the inspection processing unit 205 performs the synthesis processing selected by the processing selection unit 203 in step S1040 for the peripheral area 306. As described above, in the present embodiment, the synthesis processing unit 206 performs the synthesis processing based on the feature value for the peripheral area 306. The feature information in the present embodiment is the representative luminance of the pixels belonging to the peripheral area 306. The meaning of the feature value can be similar to that in the first embodiment. In this example, the average luminance of the pixels belonging to the peripheral area 306 is used as the feature value.

[0115] For example, the synthesis processing unit 206 performs synthesis processing using the feature value of each pixel of the peripheral area 306 in the second read image. More specifically, the synthesis processing unit 206 calculates the average value of the feature value in the second read image (in this example, the average luminance of the peripheral area 306) and the feature value in the processed image for each pixel of the peripheral area 306.

[0116] As an example of the processing of the synthesis processing unit 206, first, the synthesis processing unit 206 can replace the pixel values ​​of all pixels belonging to the peripheral area 306 of the second read image with the feature value of the peripheral area 306. In this example, the feature value is the average luminance of all pixels belonging to the peripheral area 306 of the second read image. The synthesis processing unit 206 can calculate the average value according to equation (4):

[0117] I3(x,y)=(N×I1(x,y)+N×I2(x,y)) / (N+1)...(4)

[0118] Where x and y are indices of pixels in the peripheral area 306, I1(x, y), I2(x, y) and I3(x, y) are pixel values ​​in the processed image, the second read image and the synthesized image, respectively, and N is the number of second read images to be synthesized. In the case of processing the third second read image, N=3.

[0119] As described above, in step S1030, the pixel value of the peripheral area 306 in the first read image is replaced by the average brightness of the peripheral area 306 of the first read image. In step S1100, the pixel value of the peripheral area 306 in the second read image is replaced by the average brightness of the peripheral area 306 of the second read image. Therefore, all pixels (x, y) belonging to the peripheral area 306 of the first read image and the second read image have the same value. As a result, according to equation (4), all pixels of the peripheral area 306 have the same value even in the composite image obtained from the first read image (=processed image) and the second read image. The composite image thus obtained is used as the processed image in the next processing cycle, so that all pixels of the peripheral area 306 of the composite image have the same value even in the subsequent processing cycle. The value of I3 (x, y) obtained from equation (4) is the average value (I1 (x, y)) of the processed image and the average value (I2 (x, y)) of the second read image weighted by the number of composited read images. In other words, the value of I3 (x, y) is the average luminance of the peripheral area 306 of the first read image and the second read image processed so far.

[0120] In step S1110, the synthesis processing unit 206 performs the synthesis processing selected by the processing selection unit 203 in step S1040 on the pattern area 305. As described above, in the present embodiment, the synthesis processing unit 206 performs the synthesis processing based on the average of the processed image and the second read image on the pattern area 305. For example, the synthesis processing unit 206 can synthesize the second read image with the transformed image obtained from the processed image by the alignment processing in step S1050 for each pixel of the pattern area 305 in the second read image. More specifically, the synthesis processing unit 206 can calculate the pixel value of each pixel (x, y) of the pattern area 305 of the synthesized image using the above formula (4) (in this case, I1(x, y) is the pixel value of the transformed image). In steps S1100 and S1110, a synthesized image including the pattern area 305 and the surrounding area 306 is generated.

[0121] In step S1120, the synthesis processing unit 206 determines whether there is a read image of a reference medium that has not been synthesized. When synthesizing the read image of the next reference medium, the image acquisition unit 201 replaces the processed image with the synthesized image. Thereafter, the process returns to step S1020 to synthesize the processed image with the second read image of the new reference medium. In steps S1100 and S1110 in the next processing cycle, the N value used in equation (4) increases by 1.

[0122] If the synthesis processing unit 206 determines in step S1120 that the read images of all reference media have been synthesized, the generated synthesized image is output to an auxiliary storage device (not shown), and Figure 7 The processing in ends. As described above, the output composite image can be used as the reference image 301 in the first embodiment and the second embodiment. By using the composite image generated in this way as the reference image 301, high accuracy of the inspection processing in the first embodiment and the second embodiment is expected.

[0123] In the above example, while repeating steps S1020 to S1120, the synthesis processing unit 206 generates a synthetic image by sequentially calculating the average value according to formula (4). However, the synthetic image generation method is not limited to this. For example, in step S1020, as the reading results of multiple reference media, the image acquisition unit 201 can obtain multiple second read images. In steps S1100 and S1110, the synthesis processing unit 206 can synthesize all the first read images and the second read images. For example, the synthesis processing unit 206 can use formula (5) instead of formula (4) to calculate the average value:

[0124] I3(x,y)=(I1(x,y)+I 21 (x,y)+I 22 (x,y)+...+I 2N-1 (x,y)) / N...(5)

[0125] Where N is the total number of read images, I1(x,y) is the pixel value of the first read image, and I 21 (x,y) to I 2N-1 (x, y) is the pixel value of each second read image. Even in this case, the pixel value of the peripheral area 306 of the composite image is the average value of the feature values ​​of the peripheral area 306 in the first read image and the second read image. The pixel value of the pattern area 305 of the composite image is the average pixel value of each pixel after the first read image and the second read image are aligned based on the pattern of the pattern area 305.

[0126] The synthesis processing unit 206 may use the median of the pixels of the first read image and the second read image as the pixel value of the synthesized image. In this case, the synthesis processing unit 206 may use equation (6) instead of equation (5) to calculate the pixel value of the synthesized image:

[0127] I3(x,y)=median(I1(x,y),I 21 (x,y),I 22 (x,y),...,I 2N-1 (x,y))...(6)

[0128] Where median is the function that calculates the median.

[0129] In the present embodiment, the pixel value of the peripheral area 306 in the read image is replaced by the average brightness of the peripheral area 306. Then, the read image is synthesized according to equation (4) or the like to generate a synthesized image in which the peripheral area 306 has a predetermined pixel value. However, the synthesis processing unit 206 may generate feature information about the peripheral area 306 of the reference image by another method. For example, the synthesis processing unit 206 may calculate the average brightness of the peripheral area 306 of the first read image and the second read image, and output it as feature information about the peripheral area 306 of the reference image. The feature information may be used as feature information about the peripheral area 306 having a predetermined value, which is compared with the image information at each position of the peripheral area 306 of the target image 302 in the first embodiment. In this case, the synthesis processing unit 206 may output a reference image generated by synthesizing the processed image aligned based on the object in the pattern area 305 and the second read image, and feature information about the peripheral area 306 of the reference image. As another example, the synthesis processing unit 206 may generate a reference image by synthesizing a processed image aligned based on an object in the pattern area 305 and the second read image, and replacing pixel values ​​of the peripheral area 306 of the obtained image with feature information.

[0130] According to the third embodiment, a reference image is obtained by determining a pattern area and a peripheral area of ​​a reference medium and synthesizing read images of a plurality of reference media using a synthesis process corresponding to each area. With this arrangement, a more appropriate inspection reference image can be generated even when a print position error occurs.

[0131] [Fourth embodiment]

[0132] Also in the fourth embodiment, the pattern area and the peripheral area of ​​the reference medium are determined, and a plurality of read images are synthesized into a reference image by synthesis processing corresponding to each area. In particular, in the fourth embodiment, by performing alignment processing corresponding to each of the pattern area and the peripheral area, synthesis processing of the reference image is performed with different synthesis settings between the pattern area and the peripheral area. The functional arrangement of the image processing apparatus 100 according to the fourth embodiment is similar to that of the present invention. Figure 6 The functional arrangement of the image processing apparatus 100 according to the third embodiment shown is similar, and the differences from the third embodiment will be described below.

[0133] The process selection unit 203 selects the details of the synthesis process for the pattern area 305 and the peripheral area 306. In the fourth embodiment, similarly to the second embodiment, as the details of the alignment process performed for the synthesis process of the pattern area 305, the process selection unit 203 selects the alignment process based on the reference points in the pattern area 305. Also similarly to the second embodiment, as the details of the alignment process performed for the synthesis process of the peripheral area 306, the process selection unit 203 selects the alignment process based on the positions of the four vertices of the print medium in the peripheral area 306. The details of the alignment process performed by the alignment unit 204 are similar to those in the second embodiment.

[0134] Even in the fourth embodiment, the synthesis processing unit 206 generates a synthetic image. Similar to the third embodiment, the pattern area 305 of the synthetic image is a synthetic image of the processed image and the second read image aligned based on the object in the image. The peripheral area 306 of the synthetic image is a synthetic image of the processed image and the second read image aligned based on the peripheral position of the medium. The synthetic image thus obtained can also be used as a reference image in the first and second embodiments.

[0135] Will refer to Figure 7 The flowchart of describes the processing performed by the image processing apparatus 100 having the above arrangement according to the embodiment. The processing in step S1010 to step S1030 is similar to that in the third embodiment. The processing in step S1040 is similar to that in the third embodiment except that the processing selection unit 203 selects the details of the synthesis processing in the above manner.

[0136] In step S1050, the alignment unit 204 performs the same processing as in the second embodiment except that the processed image and the second read image are aligned. Through the processing in step S1050, a transformation X' from the processed image to the peripheral area 306 of the second read image, and a transformation X from the processed image to the pattern area 305 of the second read image are obtained. The overall transformed image obtained by the processing in step S1050 has a peripheral transformed image obtained by transforming the processed image using the transformation X' in an area corresponding to the position of the peripheral area 306 of the second read image. In addition, the overall transformed image has a transformed image obtained by transforming the processed image using the transformation X in an area corresponding to the position of the pattern area 305 of the second read image.

[0137] In step S1100, the synthesis processing unit 206 generates a synthesized image by synthesizing the overall transformed image obtained in step S1050 and the second read image. In this embodiment, the synthesis processing unit 206 can calculate each pixel of the print medium area 304 (i.e., both the pattern area 305 and the peripheral area 306) of the second read image according to equation (4). In this case, I1(x, y) represents the pixel value of the overall transformed image. In this way, a synthesized image having the pixel value I3(x, y) calculated according to equation (4) can be generated. The processing in step S1120 is similar to that in the third embodiment.

[0138] According to the fourth embodiment, even when a print position error occurs, a more appropriate inspection reference image can be generated. In particular, in the fourth embodiment, even if image synthesis processing is performed in the peripheral area, defects near the periphery of the medium can be detected more accurately.

[0139] [Fifth embodiment]

[0140] In the second embodiment, when the peripheral area 306 is checked, alignment processing based on the positions of the four vertices of the print medium in the peripheral area 306 is performed as an alignment method. In the fifth embodiment, when the pixel values ​​of the target image and the reference image are compared, as shown in FIG. Fig. 10B As shown, the pixels within the predetermined search range are compared, and the details will be described later. Therefore, the peripheral area 306 can be inspected using an image within the inspection range of an area having a predetermined number of pixels around the print medium area 304 cut out from the reference image and the target image.

[0141] This arrangement can improve the defect detection accuracy when there are wrinkles or deformations at the periphery of the print medium. Fig. 10AAs shown in the enlarged view of , the reference image 2011 obtained by synthesizing the read images of the plurality of reference media may have a dark portion generated by synthesizing the paper white and the black background in the periphery of the image. In addition, the black background portion may be captured in the periphery corresponding to the paper white portion of the print medium area 304 in the target image 2020. According to the embodiment, when a black region or a dark region is generated in the peripheral region of the reference image or the target image, detection of the region as a defect may be suppressed.

[0142] First, the method of generating a reference image by synthesizing the read images of a plurality of reference media in this embodiment will be described. According to the following method, a reference image can be generated to include a background area in the periphery. However, for the inspection of the inspection target medium, it is not necessary to use the reference image generated as follows.

[0143] The processing in the fifth embodiment is different from the processing in the fourth embodiment in the processing of synthesizing the peripheral areas of a plurality of reference images. Fig.11 The following processing can be used in combination with the processing such as the alignment and synthesis processing of the pattern area in the fourth embodiment. Figure 7 Steps S1030 to S1110 in the above embodiment perform synthesis processing of the pattern area 305, and at the same time, Fig.11 Steps S1180 to S1210 in FIG. 3 synthesize the peripheral area 306 and the margin area to generate a synthesized image.

[0144] In step S1170, the image acquisition unit 201 obtains the second read image as in step S1020 of the fourth embodiment. In step S1180, in addition to the peripheral area 306, the area determination unit 202 also extracts a page margin area. The page margin area is an area of ​​a predetermined pixel width set on the upper, lower, left, and right sides around the peripheral area 306 (or the print medium area 304). Although the pixel width is not particularly limited, the predetermined pixel width is set to 20 pixels in the following description. Similar to the above-mentioned peripheral margin, the predetermined pixel width can be set based on the margin amount or the print position error amount generated when the printing device 190 prints. For example, the page margin area can be extracted to include a black area of ​​the background. If the error of the printing position of the printing device relative to the print medium is about 10 pixels, the width of the page margin area can be set to about 10 pixels. A mechanism for setting the predetermined pixel width by the user can be separately provided.

[0145] In step S1190, as in step S1050 of the fourth embodiment, the alignment unit 204 aligns the processed image and the second read image based on the peripheral area 306. That is, the alignment unit 204 may perform alignment processing based on the positions of the four vertices of the print medium in the peripheral area 306. Similar to the fourth embodiment, the alignment unit 204 may transform the processed image to align the processed image with the second read image.

[0146] In step S1200, the alignment unit 204 obtains an area corresponding to the peripheral area 306 and the margin area from the transformed processed image obtained in step S1190. Fig. 10B Like the reference image 2030 in , the obtained image includes black pixels corresponding to the background area surrounding the print medium area 304.

[0147] In step S1210, the synthesis processing unit 206 synthesizes the second read image and the transformed processed image obtained in step S1190 in the peripheral area 306 and the margin area. In this way, the synthesis processing unit 206 can generate the peripheral area 306 and the margin area of ​​the synthesized image, which is used as a synthesized image of the processed image and the second read image aligned based on the peripheral position of the medium. For both the peripheral area 306 and the margin area, the synthesis processing unit 206 can generate a synthesized image by sequentially calculating the average value according to equation (4) as in the fourth embodiment. In the fifth embodiment, the synthesis processing unit 206 can calculate the difference in pixel values ​​between the images, and if the difference exceeds a predetermined threshold, the pixel value of the image with a smaller pixel value is adopted without averaging to maintain the contrast between the margin area and the paper white of the image periphery. Instead of calculating the difference in pixel values, the synthesis processing unit 206 can adopt another method, for example, when the pixel value of the second read image is less than a predetermined threshold, the pixel value is replaced with a predetermined pixel value representing a black area.

[0148] As described above, similar to the fourth embodiment, the synthesis processing unit 206 can generate the pattern area 305 and the margin area of ​​the synthesized image, which is used as a synthesized image of the processed image and the second read image aligned based on the pattern area 305. Therefore, a synthesized image including the pattern area 305, the peripheral area 306, and the margin area can be generated.

[0149] The processing in step S1220 is similar to that in the fourth embodiment. After the synthesis of the read images of all the reference media is completed, the generated synthetic image is output to the auxiliary storage device (not shown), and the processing is completed. Through this processing, a reference image is obtained in which the read image of the reference medium includes the surrounding background area.

[0150] Next, we will refer to Fig.12 The flowchart of illustrates the processing in the fifth embodiment, in which the inspection target medium is inspected by comparing the target image with the reference image including the surrounding background area. In step S1230, the image acquisition unit 201 obtains the reference image including the surrounding background area. The reference image may be a composite image generated by synthesizing the read images of a plurality of reference media according to the above method. In step S1240, the image acquisition unit 201 obtains the target image as in step S1020 of the second embodiment.

[0151] In step S1250, the inspection processing unit 205 extracts the pattern area 305, the peripheral area 306, and the margin area from the target image. The method of extracting the pattern area 305 and the peripheral area 306 is similar to that in the second embodiment. The method of extracting the margin area has been described above. The inspection processing unit 205 can generate an image with a margin area set around the periphery of the print medium area 304.

[0152] In step S1260, similarly to the second embodiment, the inspection processing unit 205 aligns the reference image obtained in step S1230 with the processed image obtained in step S1250. For example, the inspection processing unit 205 may transform the reference image into an overall transformed image by performing alignment for the pattern area 305 and alignment for the peripheral area 306. As for the margin area and the peripheral area 306, the inspection processing unit 205 may perform alignment based on the positions of the four vertices of the print medium.

[0153] In step S1270, the inspection processing unit 205 determines a search range for comparing pixel values ​​of the reference image and the target image. In the present embodiment, a margin area around the print medium area 304 is also extracted, and detection errors in the peripheral area can be suppressed by comparing pixel values ​​within a predetermined range. The size of the search range is not particularly limited, and may be 20 pixels, which is equal to the width of the margin area in the following description. Alternatively, similar to the width of the margin area, when the printing device 190 performs printing, the size of the search range may be determined based on the margin amount or the print position error amount.

[0154] In step S1280, the inspection processing unit 205 calculates the difference between each value of the target image and the reference image in the surrounding area 306. Fig. 10BAs shown, the inspection processing unit 205 may calculate the difference between the pixel value of the pixel of interest of the reference image 2040 and the pixel value of each pixel of the reference image 2030 within the search range corresponding to the pixel of interest. The search range may be an area whose vertical and horizontal distances from the pixel corresponding to the pixel of interest in the reference image are equal to or shorter than the number of pixels determined in step S1270. In this embodiment, the inspection processing unit 205 may calculate the difference of each pixel by scanning the reference image in the vertical and horizontal directions by the number of pixels corresponding to the search range, and adopt the minimum difference as the difference for defect determination.

[0155] In step S1290, the inspection processing unit 205 determines whether the calculation of the difference values ​​for all pixels of the target image has been completed. If the calculation has not been completed, the process returns to step S1280 to calculate the difference value of another pixel. If the calculation is completed, similar to the second embodiment, the inspection processing unit 205 determines whether the pixel of the peripheral area 306 of the target image is a defective pixel based on the difference value. Then, the inspection process ends.

[0156] In a fifth embodiment, a check image having a margin area around a print medium area is used. When comparing the pixel values ​​of the surrounding area, the minimum value among the difference values ​​of the pixels within a predetermined range is adopted as the difference value for defect determination. For example, even when a pixel of interest of a target image represents paper white and a corresponding pixel of a reference image represents background, if a pixel of the same color as the pixel of interest (a pixel representing paper white) exists near the corresponding pixel of the reference image, the pixel is not determined as a defect. Even when a pixel of interest of a target image represents background and a corresponding pixel of a reference image represents paper white, if a pixel of the same color as the pixel of interest (a pixel representing the background) exists near the corresponding pixel of the reference image, the pixel is not determined as a defect. With this arrangement, defects near the periphery of the medium can be detected more accurately while suppressing detection errors.

[0157] [Sixth embodiment]

[0158] In the above-described embodiment, each area in the pattern area and the peripheral area is inspected and aligned. However, it is possible to inspect or align with an inspection setting or an alignment setting for three or more areas. In the sixth embodiment, a method will be described in which a pre-printed area is newly added to the inspection target area, and an image on a print medium is divided into three areas and processed. The pre-printed area is an area of ​​an image that is pre-printed on a print medium before actual printing is performed by a printing device. Note that the pre-printed area may exist at the center of the print medium.

[0159] The following will refer to Fig.13The flowchart of FIG. 1 illustrates the alignment processing and inspection processing of the pre-print area in the sixth embodiment which is different from the second embodiment. The alignment processing and inspection processing of the pattern area and the peripheral area in the sixth embodiment are similar to those in the second embodiment, and the description thereof will not be repeated.

[0160] In step S1300, the image obtaining unit 201 obtains a reference image serving as a read image of a reference medium representing a target printing result, as in step S1010 of the second embodiment. In step S1310, the image obtaining unit 201 obtains a target image serving as a read image of a printed inspection target medium, as in step S1020 of the second embodiment.

[0161] In step S1320, the region determination unit 202 performs region determination on the target image. In the present embodiment, the region determination unit 202 extracts a pattern region, a peripheral region, and a pre-printed region from the target image. The region determination unit 202 may extract the pattern region, the peripheral region, and the pre-printed region by referring to a region map image. The region map image is used to distinguish the pre-printed region and may be created in advance by the user. The region map image is an image having the same vertical and horizontal width as the processed image and storing different pixel values ​​for each region. For example, a pixel of the pattern region may have a pixel value (R, G, B) = (255, 255, 255), a pixel of the peripheral region may have a pixel value (R, G, B) = (0, 0, 0), and a pre-printed region may have a pixel value (R, G, B) = (128, 128, 128). Needless to say, the pixel values ​​of the pixels of each region are not limited to this value. In this case, the area determination unit 202 can extract the print medium area from the target image similarly to the second embodiment, and extract the pattern area, the peripheral area, and the pre-print area from the print medium area based on the area map image. Instead of using the area map image, similar to the second embodiment, the area determination unit 202 can perform area determination based on feature information of the image.

[0162] In step S1330, the processing selection unit 203 selects an inspection setting for each area. In the present embodiment, the inspection is performed with inspection settings for inspecting a pre-printed area on the target medium and inspecting a printed area and a peripheral area of ​​the target medium. For example, similar to the second embodiment, the processing selection unit 203 may select alignment based on the pattern area (i.e., the object in the image) for the pattern area, and alignment based on the peripheral position of the medium for the peripheral area. As for the pre-printed area, the processing selection unit 203 may select alignment based on the peripheral position of the medium.

[0163] In step S1340, similar to the second embodiment, the alignment unit 204 performs alignment processing with the check setting for the peripheral area. In step S1350, similar to the second embodiment, the alignment unit 204 performs alignment with the check setting for the pattern area.

[0164] In step S1360, the alignment unit 204 performs alignment with the check setting for the pre-printed area. In this embodiment, as in step S1350, alignment based on the peripheral position of the reference medium is performed even for the pre-printed area. When the error of the pre-printed position on the reference medium is smaller than the alignment error based on the feature point of the pre-printed pattern, the above setting can be used to improve the alignment accuracy. When the error of the pre-printed position on the reference medium is larger than the alignment error based on the feature point of the pre-printed pattern, alignment based on the pre-printed area can be used.

[0165] In step S1370 , as in step S1050 of the second embodiment, the alignment unit 204 generates an overall transformed image by combining the results of the alignment processing on the pattern area, the peripheral area, and the pre-print area of ​​the reference image 301 .

[0166] In step S1380, the inspection processing unit 205 inspects defects on the inspection target medium by comparing the target image and the overall transformed image as in steps S1060 and S1070 of the second embodiment. In this embodiment, defect detection in the pre-printed area uses a reference image aligned based on the peripheral position of the medium.

[0167] In step S1390, the inspection processing unit 205 determines whether the inspection for all target images has ended. If the inspection has not ended, the process returns to step S1310. If the inspection has ended, the inspection process ends.

[0168] According to the sixth embodiment, the pre-printed area can be inspected even under the inspection setting of the pre-printed area. For example, in the inspection process of the pre-printed area, a reference image based on the peripheral position alignment of the medium can be used to accurately detect defects in the pre-printed area. The inspection accuracy can be improved not only by using different inspection settings between the pattern area and the peripheral area, but also by using different inspection settings between the first area of ​​the image (the pattern area) and the second area of ​​the image (the pre-printed area). For the pre-printed area, an inspection setting different from the inspection setting of the pattern area and the peripheral area can be used.

[0169] By using a similar method, the read image of the reference medium can also be synthesized in a synthesis setting of the pattern area, the peripheral area and the pre-printed area. For example, by performing the synthesis process according to the fourth embodiment on the pattern area and the peripheral area, and aligning the pre-printed area in the above manner and then performing the synthesis process, a synthetic image for inspection can be generated. For example, an average-based synthesis process can be selected for the pre-printed area as well as the pattern area.

[0170] Other embodiments

[0171] There is no particular limitation on the arrangement of the image acquisition unit 201 and the image reading device 105. For example, the type of the image acquired by the image acquisition unit 201 is not limited, and the image may be an RGB color image, a grayscale image, or a monochrome image.

[0172] Although in the first and second embodiments, the image reading device 105 first reads the reference medium and then reads the inspection target medium, the image reading device has no particular restrictions on the order in which the reference image and the target image are generated. In each embodiment, the image acquisition unit 201 can obtain the reference image, the target image, or the read image from an auxiliary storage device (not shown). The reference image and the target image can be any image that allows the difference between the reference image and the target image to be calculated to check the target image. The read image can be any image that allows the reference image to be created to check the target image.

[0173] Other embodiments

[0174] The (multiple) embodiments of the present invention may also be implemented as follows: a computer of a system or device, the system or device reads and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be more fully referred to as a "non-transitory computer-readable storage medium") to perform the functions of one or more of the above (multiple) embodiments, and / or the system or device includes one or more circuits (e.g., application-specific integrated circuits (ASICs)) for performing the functions of one or more of the above (multiple) embodiments; and a method executed by a computer of the system or device, for example, reading and executing computer executable instructions from a storage medium to perform one or more of the above (multiple) embodiments, and / or controlling the one or more circuits to perform one or more of the above (multiple) embodiments. The computer may include one or more processors (e.g., a central processing unit (CPU), a microprocessing unit (MPU)), and may include a network of separate computers or separate processors to read and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or a storage medium. For example, the storage medium may include one or more of the following: a hard disk, a random access memory (RAM), a read-only memory (ROM), a memory of a distributed computing system, an optical disk (e.g., a compact disk (CD), a digital versatile disk (DVD), or a Blu-ray disk (BD) TM ), flash memory devices, memory cards, etc.

[0175] The embodiments of the present invention may also be implemented by providing software (program) for performing the functions of the above-described embodiments to a system or device via a network or various storage media, and a computer or a central processing unit (CPU) or a microprocessing unit (MPU) of the system or device reads and executes the program.

[0176] While the present invention has been described with respect to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments.The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims

1. An image processing device, comprising: an obtaining unit configured to obtain a first image serving as a read image of an inspection target medium on which printing is performed and a second image serving as a read image of a reference medium representing a target printing result; a determination unit configured to determine whether the area in the inspection target medium is a printing area or a peripheral area; an alignment unit configured to perform a first alignment for aligning a print area determined in the first image and a print area determined in the second image based on objects in the first image and the second image, and a second alignment for aligning a peripheral area determined in the first image and a peripheral area determined in the second image based on vertices of the inspection target medium and vertices of the reference medium; as well as An inspection unit configured to detect defects in the determined printing area and the determined peripheral area, wherein the inspection unit is further configured to detect defects in the determined printing area in the inspection target medium by comparing the first image and the second image aligned by the first alignment, and to detect defects in the determined peripheral area in the inspection target medium by comparing the first image and the second image aligned by the second alignment.

2. The image processing device according to claim 1, wherein: The inspection unit is also configured to detect defects in a printed area of ​​the inspection target medium by comparing a difference between a first image and a second image in the printed area with a first threshold, and to detect defects in a peripheral area of ​​the inspection target medium by comparing a difference between the first image and the second image in the peripheral area with a second threshold, the second threshold being different from the first threshold.

3. The image processing device according to claim 1, wherein: The determining unit is further configured to determine an area within a predetermined distance from an outline of the medium in the first image or the second image as the peripheral area.

4. The image processing device according to claim 3, wherein: In a case where the printing device prints on the medium in the first image or the second image, the predetermined distance is determined based on one of a margin amount and a printing position error amount.

5. The image processing device according to claim 1, wherein: The determination unit is further configured to detect a mark of the medium added to the first image or the second image, and determine the peripheral area based on coordinates of the mark.

6. The image processing device according to any one of claims 1 to 5, wherein: The inspection target medium has an area that is pre-printed, and The inspection unit is further configured to perform inspections with respective inspection settings on the pre-printed area, the printed area, and the peripheral area of ​​the inspection target medium.

7. The image processing device according to claim 6, wherein: The inspection unit is also configured to detect defects in a printed area of ​​an inspection target medium by comparing a first image and a second image aligned based on objects in the images, and to detect defects in a peripheral area of ​​the inspection target medium and a pre-printed area on the inspection target medium by comparing the first image and the second image aligned based on a peripheral position of the inspection target medium.

8. An image processing method, comprising: obtaining a first image and a second image, the first image serving as a read image of the inspection target medium on which printing is performed and the second image serving as a read image of the reference medium representing a target printing result; Determining whether the area in the inspection target medium is a printing area or a peripheral area; performing a first alignment, the first alignment aligning a print area determined in the first image with a print area determined in the second image based on objects in the first image and the second image; performing a second alignment, the second alignment aligning the peripheral area determined in the first image and the peripheral area determined in the second image based on the vertices of the inspection target medium and the vertices of the reference medium; as well as Detecting defects in the determined printing area and the determined surrounding area includes: detecting a defect in a printing area determined in the inspection target medium by comparing a first image and a second image aligned by the first alignment; as well as By comparing the first image and the second image aligned by the second alignment, a defect in a peripheral area determined in the inspection target medium is detected. 9 . A computer-readable medium storing a program which, when executed by a computer, causes the computer to perform the image processing method according to claim 8 .