Image processing device, image processing method, and program
The image processing device addresses printing position deviations by detecting white paper areas and correcting images, resulting in enhanced inspection accuracy of printed matter.
Patent Information
- Application Number
- JP2020207878
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-15
- Publication Date
- 2025-04-21
- Estimated Expiration
- 2040-12-15
AI Technical Summary
Printing position deviations cause instability in detecting white paper and correcting brightness and color, leading to decreased inspection accuracy of printed matter.
An image processing device that acquires reference and target images, detects white paper areas based on printing positional deviation, corrects the target image to match the reference image's color, and inspects for defects using the corrected images.
Ensures accurate detection of white paper even with printing positional deviations, thereby improving the inspection accuracy of printed matter.
Smart Images

Figure 0007665326000001 
Figure 0007665326000002 
Figure 0007665326000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a technique for detecting defects in printed matter. [Background technology]
[0002] Prints output by a printing device can have stains caused by coloring material adhering to unintended locations, or color loss caused by the necessary coloring material not adhering to locations where an image is to be formed, etc. Therefore, there is a need to inspect for the presence or absence of these printing defects.
[0003] In an inspection system that performs automatic inspection, the presence or absence of print defects in an inspection target is detected based on the difference between a reference image, which is image data showing a defect-free print, and a target image, which is scanned image data of the print target to be inspected. Here, the paper white of the reference image is compared with the paper white of the target image as a pre-processing step, and brightness and color are corrected in advance, thereby improving the accuracy of defect detection. Patent Document 1 describes a method of detecting paper white from the margins of a print medium by detecting white for one scanning line with a white area detection circuit. Patent Document 2 describes a method of detecting paper white from the margins of a print medium by dividing a scanned image of the print medium into predetermined regions and counting the number of black dots in each region. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent No. 6455016 [Patent Document 2] JP 2005-324351 A Summary of the Invention [Problem to be solved by the invention]
[0005] Generally, the positional relationship between the medium and the image printed on the medium may vary slightly from print to print. This variation is due to a change in the print position caused by a misalignment during medium transport within the printing device, or a change in the size of the medium caused by a misalignment in the cutting position when cutting to a specified size after printing on continuous media. This variation (hereafter referred to as print position misalignment) causes the margin area of the medium to vary, so the paper white cannot be detected stably, and the brightness and color of the paper white area cannot be appropriately corrected, resulting in a decrease in inspection accuracy.
[0006] In the method described in Patent Document 1, if the image to be processed contains a printing defect and the scanned image of the printed material contains a backing area that is an area other than the medium, one scanning line will not necessarily be white, so there is a possibility that the paper white cannot be detected.
[0007] Furthermore, in the method described in Patent Document 2, the margin area changes depending on the divided area, so if a printing position shift occurs, it is not possible to reference the paper white at the same coordinates between the reference image and the target image, which may reduce the accuracy of defect detection.
[0008] In a method for determining whether or not there is a print defect based on the difference between a reference image and a target image, the accuracy of defect detection is improved by referencing the same coordinates between the reference image and the target image as the position coordinates for detecting paper white in order to reduce the effects of shading unevenness in the scanned image.
[0009] An object of the present invention is to appropriately detect paper whiteness even when printing position misalignment occurs, and to improve the inspection accuracy of printed matter. [Means for solving the problem]
[0010] The image processing device according to the present invention includes: an acquisition means for acquiring a reference image that is a reference for inspection and a target image obtained by reading a printed matter; a detection unit for detecting a paper white area based on the amount of print position deviation of the target image; The above Detected paper white Based on the area, The reference image and the target image The above paper whiteThe apparatus is characterized by having a correction means for correcting the target image so that the colors of the areas match, and an inspection means for inspecting the printed matter based on the reference image and the corrected target image. Effect of the Invention
[0011] Even when printing position misalignment occurs, the paper white of the medium can be appropriately detected, thereby improving the inspection accuracy of the printed matter. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a diagram showing the configuration of a printing system. [Diagram 2] FIG. 1 is a block diagram showing a configuration of an image processing device. [Diagram 3] 1 is a flowchart of an image processing method. [Figure 4] FIG. 4 is a diagram showing an area of an image acquired by an image reading unit. [Diagram 5] 4 is a flowchart of an image correction process. [Figure 6] 11 is a flowchart of a process for acquiring print position deviation information. [Figure 7] 11 is a flowchart of a process of an image correction unit 205 in the second embodiment. [Figure 8] 11 is a flowchart of a process of an image correction unit 205 in the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] The present embodiment will be described in detail below with reference to the accompanying drawings. Note that the following embodiment does not limit the invention according to the claims. Although multiple features are described in this embodiment, not all of these multiple features are necessarily essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same reference numbers are used for the same or similar configurations, and duplicated explanations are omitted. Also, each process (step) in the flow chart is indicated by a reference number beginning with S.
[0014] The image processing device according to this embodiment inspects the presence or absence of defects in a medium to be inspected (hereinafter also referred to as a print result) on which printing has been performed. Here, image data representing a printout without defects is called a reference image, and scanned image data of the print result to be inspected is called a target image. As a pre-processing step for the inspection, in order to match the brightness of the reference image and the target image, a paper white detection range (hereinafter also referred to as a paper white area) is determined based on the amount of print position deviation, and the detected paper white value is used to correct the target image.
[0015] According to this embodiment, even when a printing position shift occurs, defects can be detected more accurately. EXAMPLES
[0016] (Printing system configuration) 1 is a diagram showing the overall configuration of a printing system that outputs and inspects printed matter, including an image processing device 100 according to a first embodiment. The printing system according to the first embodiment includes the image processing device 100 and a printing device 190. The printing system according to the first embodiment may further include a printing server 180. In this embodiment, the image processing device 100 and the printing device 190 are described as separate entities, but the image processing device 100 may be provided in the printing device 190.
[0017] The printing server 180 generates a print job including an original to be printed, and submits the print job to the printing device 190. The printing device 190 forms an image on a print medium based on the print job submitted from the printing server 180. The printing device 190 has a paper feed unit 191, and a user can supply print paper to the paper feed unit 191 in advance. When a print job is submitted, the printing device 190 forms an image on one or both sides of the print medium while transporting the print medium supplied to the paper feed unit 191 along a transport path 192, and sends it to the image processing device 100.
[0018] The image processing device 100 inspects a print medium (medium to be inspected) on which printing has been performed for defects. The medium to be inspected 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 device 100 may have a CPU 101, a RAM 102, and a ROM 103 inside. The image processing device 100 may also have an image reading device 105, a printing device interface (I / F) 106, a general-purpose interface (I / F) 107, a user interface (UI) panel 108, and a main bus 109. The image processing device 100 may also have a transport path 110 for the print medium connected to the transport path 192 of the printing device 190. The image processing device 100 may also have an output tray 111 to which the medium to be inspected that has been determined to pass the inspection is output, and an output tray 112 to which the medium to be inspected that has been determined to fail the inspection is output. 1, the output tray 111 and the output tray 112 are connected to the CPU 101 via the main bus 109. The destination of the medium to be inspected is set to either the output tray 111 or the output tray 112 depending on the inspection result of the medium to be inspected.
[0019] The image processing device according to each embodiment described below can be realized by a computer including a processor and a memory. For example, a processor such as CPU 101 executes a program stored in a memory such as RAM 102 or ROM 103 to realize the functions of each unit. The processor such as CPU 101 can also control each module in the image processing device 100 as necessary. Note that the image processing device according to one embodiment of the present invention may be composed of a plurality of processing devices connected via a network, for example.
[0020] The CPU 101 is a processor that controls each unit in the image processing device 100. The RAM 102 temporarily holds applications executed by the CPU 101, data used in image processing, etc. The ROM 103 stores a group of programs executed by the CPU 101.
[0021] The image reading device 105 scans and reads one or both sides of the print medium sent from the printing device 190 on the conveying path 110, and acquires the image data. The conveying path 110 becomes the background when the image reading device 105 reads the image of the print medium, so the conveying path 110 can be configured to have a color (e.g., black) that is easily distinguishable 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 through 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 status. The UI panel 108 can output information to the user. The UI panel 108 may be a display device such as a liquid crystal display, and can function as a user interface for the image processing device 100. The UI panel 108 can, for example, inform the user of the current status or settings of the image processing device 100. The UI panel 108 may also include an input device such as a touch panel or buttons, so that instructions from a user can be received. A main bus 109 is a transmission path that connects the modules of the image processing device 100 together.
[0022] While the print medium output from the printer 190 is being transported along the transport path 110, the image processing device 100 performs an inspection process to check for defects in the print medium based on image data of the print medium acquired by the image reading device 105. If the print medium is determined to pass the inspection process, it is transported to an output tray 111. If the print medium is determined to fail the inspection process, it is transported to an output tray 112. With this operation, only print media determined to have no defects is output onto the output tray 111.
[0023] (Configuration of image processing device) FIG. 2 is a block diagram showing a configuration of the image processing device 100 according to this embodiment.
[0024] The image acquisition unit 201 acquires a first image, which is a scanned image of the inspection target medium on which printing has been performed, and a second image, which is a scanned image of the reference medium showing the target print result. The image acquisition unit 201 acquires image data obtained by the image reading device 105 reading the print medium on the conveying path 110. The image reading device 105 reads the print medium at least two different times and generates image data for each print medium. Hereinafter, an image obtained by the image reading device 105 reading the reference medium at the first time point is referred to as a reference image 301, and an image obtained by reading the inspection target medium at the second time point or later is referred to as a target image 302. The print position deviation information acquisition unit 202 acquires information about the print position deviation described above. The background area acquisition unit 203 acquires the size of the background area when cutting out the image from the reference image 301 and the target image 302 based on the print position deviation information. A paper-white detection range determination unit 204 determines the range in which to detect paper-white using the print position shift value acquired by the print position shift information acquisition unit 202 and the background region value acquired by the background region acquisition unit 203. An image correction unit 205 calculates an image correction coefficient based on the paper-white pixel value determined by the paper-white detection range determination unit 204, and corrects the target image 302. A registration unit 206 performs registration between the reference image 301 and the target image 302. An inspection unit 207 calculates a difference image indicating the difference value between the reference image 301 and the target image 302, and inspects for the presence or absence of defects.
[0025] (Processing performed by the image processing device) FIG. 3 is a flowchart showing the flow of processing performed by the image processing device 100.
[0026] In S11, the image acquisition unit 201 acquires a reference image 301 obtained by the image reading device 105 reading a reference medium on the conveying path 110, and stores the reference image 301 in the RAM 102. The reference image 301 is used in subsequent processing for inspection of each target image.
[0027] In S12, the image acquisition unit 201 acquires the target image 302 obtained by the image reading device 105 reading the inspection target medium on the conveying path 110, and stores it in the RAM 102. In the following S13 to S16, the target image 302 acquired in S12 is inspected. Note that the image reading device 105 generates the reference image 301 by reading the reference medium, and generates the target image 302 by reading the inspection target medium, but it is also applicable to a case where an image acquired using another device is used. For example, the reference image 301 or the target image 302 acquired by a device other than the image reading device 105 may be stored in an auxiliary storage device (not shown) and may be acquired from there. In this case, the image acquisition unit 201 can acquire the reference image 301 or the target image 302 from the auxiliary storage device in S11 and S12.
[0028] FIG. 4A is a diagram showing an example of a target image 302. The target image 302 includes a background area 303, which is an area of the image read by the image reading device 105 where the print medium is not shown, and a print medium area 304 where the print medium is shown. In the example of FIG. 4, the image reading device 105 reads the target image 302 so that the transport path 110 is reflected as a background around the print medium area in order to obtain an image of the entire print medium. In this embodiment, the transport path 110 is black, so the background area 303 is also shown in black. Like the target image 302, the reference image 301 also includes a print medium area where the print medium is shown and a background area where the print medium is not shown. In addition, the image acquisition unit 201 detects a margin area 305 and a picture area 306 from the area of the print medium area 304 in the target image 302. The print medium area 304 can be extracted as follows. First, the target image 302 is binarized, and the pixels that are the boundaries between white and black pixels are tracked to linearly approximate the four sides that indicate the contour of the print medium, and four straight lines that indicate the contour of the print medium area 304 are estimated. Next, the intersections of the estimated four straight lines are calculated. These intersections correspond to the vertices 307a to 307d of the print medium area 304 shown in FIG. 4A. Note that the method of extracting the print medium area 304 is not limited to the above method, and other methods may be used. Next, the image acquisition unit 201 detects the margin area 305 and the picture area 306 from the print medium area 304 of the target image 302. The image acquisition unit 201 can extract an area within a predetermined distance from the contour of the print medium area 304 as the margin area 305, and extract the other area as the picture area 306. The predetermined distance that defines the margin area 305 is determined in advance by a predetermined margin size. The image acquisition unit 201 performs the same process on the reference image 301, and can similarly extract the print medium area 304, the margin area 305, and the picture area 306 of the reference image 301.
[0029] In S13, the alignment unit 206 calculates the amount of positional displacement between images in the picture region 305 of the reference image 301 and the target image 302 based on the luminance of the picture region 305 observed in the reference image 301 and the target image 302, respectively, to perform alignment. For example, the alignment is performed by first setting a reference point for alignment that represents the characteristics of the images using SIFT, SURF, or the like. Next, geometric transformation parameters for alignment are calculated based on the coordinates of the set reference points of the reference image 301 and the target image 302. In this embodiment, affine transformation coefficients are calculated as the geometric transformation parameters, and the reference image 301 and the target image 302 are aligned using the calculated coefficients.
[0030] In S14, the image correction unit 205 determines a range to be used for paper white correction from the reference image 301 and the target image 302, and corrects the target image 302 so that the paper white color matches. The operation of the image correction unit 205 in S14 will be described later.
[0031] In S15, inspection unit 207 inspects the inspection target medium for defects based on reference image 301 and target image 302 corrected in S14. For example, inspection unit 207 calculates the difference between reference image 301 and corrected target image 302 in a state aligned by alignment unit 206, and can determine and detect pixels for which the calculated difference is greater than a predetermined threshold as defective pixels.
[0032] In S16, the inspection unit 207 determines whether or not the inspection process has been executed for all the target images 302. If all the inspection processes have been executed, the process ends, and if not, the process returns to S12.
[0033] As described above, if the inspection unit 207 detects a defective pixel in S15, the medium to be inspected is determined to be a failure. At this time, the CPU 101 provided in the image processing device 100 controls the medium to be inspected to be transported to the output tray 112. On the other hand, if the inspection unit 207 does not detect a defective pixel, the medium to be inspected is determined to be a pass. At this time, the CPU 101 provided in the image processing device 100 controls the medium to be inspected to be transported to the output tray 111.
[0034] (Operation of image correction unit 205) FIG. 5 is a flowchart relating to image correction performed by the image correction unit 205 as pre-processing for inspection, in which the colors of the reference image 301 and the target image 302 are matched based on the paper white.
[0035] In S141, the print position misalignment information acquisition unit 202 acquires the amount of print position misalignment. The method for acquiring the amount of print position misalignment will be described later. Note that the amount of print position misalignment acquired in this embodiment is expressed in the number of pixels (pix value), but it may also be acquired in mm values representing length. When acquiring in mm values, the processing resolution of the image at the time of inspection is acquired separately, and the mm value is converted to the number of pixels based on the processing resolution.
[0036] In S142, the background area acquisition unit 203 acquires the amount of conveyance deviation (hereinafter also referred to as the conveyance deviation amount) predicted in advance based on the characteristics of the printing device 190 and the paper feed unit 191. The reason for acquiring this conveyance deviation amount is that, when performing an inspection, an inspection target area is cut out, but if only the print medium area 304 is cut out, it becomes impossible to inspect the edge including the margin area 305 when a conveyance deviation occurs. In other words, the area is cut out in a form that includes a certain amount of the background area outside the print medium area 304. Therefore, the amount of print position deviation acquired here is different from the amount of print position deviation acquired in S141, and is the maximum amount of conveyance deviation predicted in advance based on the characteristics of the printing device 190 and the paper feed unit 191. This value is stored in advance in the RAM 102 and acquired.
[0037] Based on the maximum value acquired above, the background region acquisition unit 203 performs cutting out in a form including the background region as shown in FIG. 4B. In this embodiment, this maximum value is 1 mm (12 pix when the inspection resolution is 300 dpi). In this embodiment, this maximum value is stored in advance, but the step of S141 may be applied to multiple sheets of printing media, and the maximum value of the multiple print position deviation amounts obtained as a result may be stored in the RAM 102.
[0038] In S143, the paper-white detection range determination unit 204 determines the coordinate position for detecting the paper-white pixel value based on the amount of print position misalignment acquired in S141 and the background area acquired in S142. The paper-white area is detected as an area surrounded by the four points of coordinate positions (x1, y1), (x2, y2), (x3, y3), and (x4, y4), and the coordinate position is calculated by the following formula.
[0039] In this embodiment, the inspection resolution is 300 dpi, the background area is 1 mm (12 pix when the inspection resolution is 300 dpi), the margin from the paper edge is 0.2 mm (2 pix when the inspection resolution is 300 dpi), and the ratio is 90%. The width (vertical / horizontal) of the margin area 305 is 3 mm (36 pix when the inspection resolution is 300 dpi), and the detection height h is calculated based on the margin from the paper edge and the amount of print position misalignment. Note that the background area, paper edge margin, ratio, and margin width described in this embodiment are merely examples, and other values may be used. Since the area of paper white that can be detected from the margin area 305 changes depending on the amount of print position misalignment, in this embodiment the paper white detection range is determined by the following formula. <Formula for calculating the paper white coordinate position> x1 = background area + margin from edge of paper y1 = background area + margin from edge of paper x2 = background area + margin from edge of paper + (image size width x ratio) y2 = background area + margin from edge of paper x3 = background area + margin from edge of paper y3 = background area + margin from the edge of the paper + detection height h x4 = background area + margin from edge of paper + (image size width x ratio) y4 = background area + margin from the edge of the paper + detection height h Here, detection height h=width of margin area−margin from edge of paper×2−amount of print position deviation.
[0040] In S144, the alignment unit 206 aligns the reference image 301 and the target image 302 based on the coordinates of the four corners of the paper. Unlike the alignment based on the feature points of the picture area described in S13, the affine transformation coefficients are calculated based on the coordinates of the four corners of the paper (307a to 307d in FIG. 4A) and aligned using the coordinates of the four corners of the paper by applying these to the target image 302. By referencing an image aligned using the four corners of the paper instead of the feature points as an image to refer to for the paper-white detection range, it is possible to calculate a stable paper-white pixel value that is as unaffected as possible by changes in the amount of print position deviation.
[0041] In S145, the image correction unit 205 calculates a correction coefficient using the coordinate positions for detecting the paper white determined in S143, and the reference image 301 and target image 302 aligned in S144. In this embodiment, the average value of the pixel values of the paper white area surrounded by the coordinate positions of the four points is calculated, and the correction coefficient is calculated from the ratio of the calculated pixel values. The correction coefficient A is calculated from the ratio between the average value of the pixel values of the G channel of the reference image 301 (BG) and the average value of the pixel values of the G channel of the target image 302 (CB). Correction coefficient A=BG / CB In this embodiment, the average value of pixel values is used, but other statistical values such as the mode or median may be used. In this embodiment, the pixel values of the G channel are used to calculate the correction coefficient for brightness, but the pixel values of the R and B channels may be used to calculate the correction coefficient for color. In addition, the correction coefficients for brightness and color may be calculated after conversion to other color spaces such as XYZ and Lab, instead of the RGB color space.
[0042] In S146, the image correction unit 205 corrects the brightness of the target image 302. A corrected image H(x, y) that matches the paper white color of the reference image 301 is generated by multiplying each pixel value I(x, y) of the target image by the correction coefficient calculated in S145. H(x,y)=I(x,y)*A (Operation of the print position deviation information acquisition unit 202) FIG. 6 is a flowchart relating to a process S141 for acquiring print position deviation information in the print position deviation information acquisition unit 202. In FIG.
[0043] In S1411, the print position deviation information acquisition unit 202 acquires a reference point to be referenced for calculating the amount of print position deviation from the target image 302. The reference point has predetermined coordinates, and the amount of print position deviation is estimated from the amount of variation due to coordinate conversion using the following image and alignment parameters for the four corners of the paper. In this embodiment, four coordinates 5 mm inward from the four corners of the paper (60 pix when the inspection resolution is 300 dpi) are used as the coordinates of the reference points, but the coordinate positions and number of the reference points are not limited to these, and for example, the coordinates of one point in the center of the image may be used.
[0044] In S1412, the print position deviation information acquisition unit 202 acquires the position alignment parameter AP_f when the reference image 301 and the target image 302 are aligned using the feature points of the respective picture areas. In this embodiment, the affine transformation parameter is acquired as the position alignment parameter.
[0045] In S1413, the print position deviation information acquisition unit 202 acquires the position alignment parameters AP_c when the reference image 301 and the target image 302 are aligned at the reference points at the four corners of the paper. In this embodiment, affine transformation parameters are acquired as the position alignment parameters.
[0046] In S1414, the print position deviation information acquisition unit 202 calculates the amount of print position deviation using the following formula based on the data acquired in S1411 to S1413. Print position deviation amount = (xfi-xci,yfi-yci) (xfi,yfi)=AP_f(xi,yi), (xci,yci)=AP_c(xi,yi) Here, (xi, yi) are i reference points. (xfi, yfi) are points transformed using affine transformation parameters AP_f calculated from feature points, and (xci, yci) are points transformed using affine transformation parameters AP_c calculated from the four corners of the paper. The print position deviation amount is the average value of the i differences (xfi-xci, yfi-yci). From this print position deviation amount, it is possible to obtain the print position deviation amount including the position deviation of feature points during printing and the transport deviation after printing.
[0047] In this embodiment, the average value of the i differences is used as the amount of print position deviation, but other statistical values such as the maximum value or most frequent value of the i differences may also be used.
[0048] As described above, according to the method of Example 1, the paper white detection range is determined based on the amount of print position misalignment as a preprocessing step of the inspection process, and the paper white value in the detection range is used to correct the image to be inspected, making it possible to accurately detect defects even when print position misalignment occurs. EXAMPLES
[0049] In the first embodiment, a method was used in which the range of paper white was detected from the top of the margin area as the coordinate position for detecting the paper white. In the second embodiment, a method for extracting the paper white from the amount and direction of print position misalignment without limiting the top of the margin area to the coordinates will be described. For example, in the first embodiment, if the print position misalignment direction is upward, the top of the margin area will be narrower than the bottom, and the range in which the paper white can be detected will be narrower, which may make it impossible to extract a stable paper white pixel value.
[0050] In the second embodiment, when the direction of the print position misalignment is upward, a method is described that can extract a stable paper white pixel value regardless of the direction of the print position misalignment, such as by referring to the lower part where the margin area can be stably detected, or by detecting from the left and right margin areas.
[0051] The following will newly explain the operation of the image correction unit 205, which is different from the first embodiment.
[0052] (Operation of image correction unit 205) FIG. 7 is a flowchart of the process in the image correction unit 205.
[0053] In S1441, the print position deviation information acquisition unit 202 acquires the amount and direction of the print position deviation using the method described in S141.
[0054] In S1442, the background region acquisition unit 203 acquires the background region using the method described in S142.
[0055] In S1443, the paper-white detection range determination unit 204 initializes the range for detecting paper-white using the method described in S143. In the second embodiment, the margin area can be set not only at the top but also at the bottom and left and right parts. The formula for calculating the coordinate position of the paper-white when setting at the bottom and left and right parts is shown below. <Formula for calculating the coordinate position of the paper white (bottom margin)> x1 = background area + margin from edge of paper y1 = Image size vertical - background area - margin from edge of paper - detection height h x2 = background area + margin from edge of paper + (image size width x ratio) y2 = Image size vertical - background area - margin from edge of paper - detection height h x3 = background area + margin from edge of paper y3 = image size vertical - background area - margin from edge of paper x4 = background area + margin from edge of paper + (image size width x ratio) y4 = Image size vertical - background area - margin from edge of paper Here, detection height h=width of margin area−margin from edge of paper×2−amount of print position deviation. <Calculation formula for the paper white coordinate position (left margin)> x1 = background area + margin from edge of paper y1 = background area + margin from edge of paper x2 = background area + margin from edge of paper + detection width w y2 = background area + margin from edge of paper x3 = background area + margin from edge of paper y3 = background area + margin from edge of paper + (image size height x ratio) x4 = background area + margin from edge of paper + detection width w y4 = background area + margin from edge of paper + (image size height x ratio) Here, detection width w=width of margin area−margin from edge of paper×2−amount of print position deviation. <Calculation formula for the paper white coordinate position (right margin)> x1 = image size horizontal - background area - margin from edge of paper - detection width w y1 = background area + margin from edge of paper x2 = image size horizontal - background area - margin from edge of paper y2 = background area + margin from edge of paper x3 = image size horizontal - background area - margin from edge of paper - detection width w y3 = background area + margin from edge of paper + (image size height x ratio) x4 = image size horizontal - background area - margin from edge of paper y4 = background area + margin from edge of paper + (image size height x ratio) Here, detection width w=width of margin area−margin from edge of paper×2−amount of print position deviation.
[0056] In S1444, the paper white detection range determination unit 204 compares the detection range set in S1443 with the direction of the print position deviation acquired in S1441, and determines whether the positions of the detection ranges match. If they match, proceed to processing in S1446. If they do not match, proceed to processing in S1445. Note that the determination of whether they match is made by referring to the vertical vector of the vector representing the direction of the print position deviation, and determining whether the direction of the print position deviation is the same upward direction as the margin set in S1443.
[0057] In this embodiment, the initial position of the paper-white detection range is above the margin, but if it is below, it is determined whether the direction of the print position deviation is downward. Also, if the initial position of the paper-white detection range is set to the left or right side of the margin, the horizontal vector representing the direction of the print position deviation is referenced to determine whether the initial value and the direction of the print position deviation are the same.
[0058] In S1445, the paper-white detection range determination unit 204 changes the paper-white detection range depending on the direction of the print position misalignment. In this embodiment, the paper-white detection range is set to the upper part as the initial value, and if the print position misalignment direction is upward, the upper margin area becomes narrow, so the paper-white detection range is changed to the lower side (opposite side) on the print medium where a wider area can be obtained. Also, by referring to a vector representing the direction of the print position misalignment, if the print position misalignment in the left-right direction is smaller than in the up-down direction, paper white may be detected from the left-right margin areas, or paper white may be detected from the margin area in the direction in which the print position misalignment is smallest.
[0059] In S1446, the registration unit 206 performs registration of the target image using the method described in S144.
[0060] In S1447, the image correction unit 205 calculates a correction coefficient based on the data in S1445 and S1446 using the method described in S145.
[0061] In S1448, the image correction unit 205 corrects the brightness of the target image 302 using the method described in S146.
[0062] As described above, according to the method of the second embodiment, the paper white detection range is determined based on the amount and direction of print position misalignment, and the paper white value in the detection range is used to correct the image to be inspected, making it possible to detect defects more accurately even when print position misalignment occurs. EXAMPLES
[0063] In the first and second embodiments, the paper white is extracted from one location in the margin area based on the print position shift as the coordinate position for detecting the paper white. In the third embodiment, a method is described in which candidate areas for detecting the paper white are set in multiple locations in the margin area, the similarity between the candidate areas and the reference image is calculated, and the paper white value of the location with the highest similarity is used to correct the image.
[0064] In order to extract a stable paper-white pixel value regardless of the amount and direction of print position misalignment, a plurality of paper-white candidate areas are referenced in the third embodiment. The following describes a new operation of the image correction unit 205, which is different from the first embodiment.
[0065] [Operation of image correction unit 205] FIG. 8 is a flowchart of the process in the image correction unit 205.
[0066] In S2441, the print position deviation information acquisition unit 202 acquires the amount and direction of the print position deviation using the method described in S141.
[0067] In S 2442 , the image acquisition unit 201 acquires the reference image 301 .
[0068] In S2443, the image acquisition unit 201 acquires the target image 302.
[0069] In S2444, the registration unit 206 performs registration of the target image 302 using the method described in S144.
[0070] In S2445, the paper-white detection range determination unit 204 sets multiple candidate areas for the area in which paper-white is detected. In this embodiment, the margin area is divided into thirds on each of the top, bottom, left, and right, and an area centered on the center position of the third area is set as the candidate area. The initial values for the length and width of the candidate area are half the values of the divided areas, and the detection height is determined based on the amount of print position deviation when the vertical position deviation is large, and the detection width is determined when the horizontal position deviation is large, based on the amount of print position deviation as described in S143 of the first embodiment.
[0071] In this embodiment, the margin area is divided into three parts for each of the top, bottom, left and right, but it may be divided into a different number of parts. Also, although candidate areas are set for each of the top, bottom, left and right of the margin area, areas in directions where the print position deviation is large may be excluded as candidate areas. For example, if the print position deviation is large in the upward direction, it is possible not to set candidate areas at the top of the margin area.
[0072] In S2446, the paper-white detection range determination unit 204 refers to the pixel values of the images acquired in S2442 and S2443 for the candidate area set in S2445 and calculates the similarity. In this embodiment, the variance of pixel values in the candidate area is used as the similarity, the variance values of pixel values in the candidate areas of the reference image 301 and the target image 302 are calculated, and an area where the variance value is equal to or less than a predetermined threshold is regarded as a paper-white area and a correction coefficient is calculated.
[0073] When a picture area is included in the paper-white candidate area due to a printing position shift, the variance of pixel values within the candidate area becomes large, so if the calculated variance exceeds the pixel values of the paper-white noise fluctuation, a process is performed to remove that area from the paper-white candidate area. Note that the RMS error or color difference of pixel values within the candidate area between the reference image 301 and the target image 302 may be used as the similarity. For example, the color difference of multiple candidate areas may be calculated, and a location in the candidate area where the color difference is greater than a predetermined threshold compared to other areas may be determined to be a picture area included in the paper-white candidate area and the difference is large, and that area may be removed from the paper-white candidate area.
[0074] In S2447, the paper-white detection range determination unit 204 determines whether the similarity has been calculated for all regions, and if so, proceeds to processing in S2448, and if not, proceeds to processing in S2446.
[0075] In S2448, the image correction unit 205 calculates a correction coefficient using the paper white of the area with the highest similarity. As described in S2446, when variance is used as the similarity, the area with the smallest difference in variance value between the reference image 301 and the target image 302 is adopted, and when RMS error or color difference is used, the area with the smallest difference is also adopted. Note that a threshold value may be set for the similarity, and the average value or the most frequent value of pixel values may be calculated not only from the area with the highest similarity, but also from multiple areas that satisfy the threshold setting, and the correction coefficient may be calculated based on the calculation result.
[0076] In S2449, the image correction unit 205 corrects the brightness of the target image 302 using the method described in S146.
[0077] As described above, according to the method of the third embodiment, by setting multiple paper-white candidate areas based on the amount and direction of print position misalignment and correcting the image to be inspected using an appropriate paper-white value from the set areas, it is possible to accurately detect defects even when print position misalignment occurs.
[0078] (Other Examples) There is no particular limitation on the configuration of the image acquisition unit 201 and the image reading device 105. For example, there is no limitation on the type of image acquired by the image acquisition unit 201, and the image may be an RGB color image, a grayscale image, or a black and white image.
[0079] In the first and second embodiments, the image reading device 105 first reads the reference medium and then reads the medium to be inspected, but the order in which the image reading device generates the reference image and the target image is not particularly limited. In each embodiment, the image acquisition unit 201 may acquire the reference image, the target image, or the read image from an auxiliary storage device (not shown). As the reference image and the target image, any image can be used that allows a difference between the reference image and the target image to be calculated in order to inspect the target image. As the read image, any image can be used that allows a reference image to be created for inspection of the target image.
[0080] In the first, second, and third embodiments, the images referenced when calculating the paper white correction coefficient are aligned based on the coordinates of the four corners of the paper of the reference image 301 and the target image 302, but an image aligned using feature points of the picture part may be used. In that case, however, the direction of the print position shift will be the opposite direction on the image to the direction described in the embodiments, so the direction of the paper white detection range may be changed. For example, if the print position shift of the target image 302 occurs in the upward direction relative to the reference image 301, when the picture part is aligned to match the reference image 301, the coordinate position of the picture part of the target image 302 is corrected downward, so the bottom of the margin area becomes narrower. In this way, the size of the margin area varies depending on the alignment method, so the paper white detection range may be determined according to the alignment method.
[0081] The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-mentioned embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. It can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.
[0082] The invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. [Explanation of symbols]
[0083] 202 Print position deviation information acquisition unit 203 Background area acquisition unit 204 Paper white detection range determination unit 205 Image Correction Unit 206 Alignment section 207 Inspection Department
Claims
1. an acquisition means for acquiring a reference image that is a reference for inspection and a target image obtained by reading a printed matter; a detection unit for detecting a paper white area based on the amount of print position deviation of the target image; a correction means for correcting the target image based on the detected paper white area so that the colors of the paper white area in the reference image and the target image match; an inspection means for inspecting the printed matter based on the reference image and the corrected target image; 13. An image processing device comprising:
2. The image processing apparatus according to claim 1 , wherein the reference image and the target image are aligned based on the coordinates of four corners of the respective printing media.
3. 3. The image processing device according to claim 1, wherein the paper white area is calculated using feature points in the reference image and the target image, and the coordinates of the four corners of the printing medium of each of the reference image and the target image.
4. 4. The image processing apparatus according to claim 3, wherein the paper white area is determined based on a difference between a positional deviation based on the feature points and a positional deviation based on the coordinates of the four corners.
5. 5. The image processing apparatus according to claim 1, wherein, when a direction of the print position deviation of the target image is a predetermined direction, a detection range of the paper white area is changed.
6. 6. The image processing apparatus according to claim 1, wherein the paper-white area is determined based on a similarity between a plurality of candidate areas.
7. 7. The image processing apparatus according to claim 6, wherein the similarity is a value based on a difference value of variance of pixel values of the plurality of regions in each of the reference image and the target image.
8. 7. The image processing apparatus according to claim 6, wherein the similarity is a value based on a difference between pixel values of the plurality of regions in each of the reference image and the target image.
9. A program for causing a computer to function as each of the means of the image processing device according to any one of claims 1 to 8.
10. an acquisition step of acquiring a reference image that is a reference for inspection and an object image obtained by reading a printed matter; A detection step of detecting a paper white area based on the amount of print position deviation of the target image; a correction step of correcting the target image based on the detected paper white area so that a color of the paper white area in the reference image and the target image matches; an inspection step of inspecting the printed matter based on the reference image and the corrected target image; 13. An image processing method comprising:
Citation Information
Patent Citations
DC current limiter
JP1989055016A
Printer
JP2005324351A
Printed matter inspection method and printed matter inspection system
JP2008008841A
Image forming apparatus
JP2010085860A
Image inspection device, image inspection method and image inspection program
JP2015046703A