Image processing device, its control method, and program
The image processing apparatus corrects control points near the edges to enhance alignment accuracy, addressing misalignment issues and reducing false defect detection during non-rigid image inspection.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- CANON KK
- Filing Date
- 2022-05-30
- Publication Date
- 2026-06-17
Smart Images

Figure 0007875030000001 
Figure 0007875030000002 
Figure 0007875030000003
Abstract
Description
Technical Field
[0001] The present invention relates to an image processing apparatus, a control method thereof, and a program.
Background Art
[0002] In recent years, inspection systems that automatically perform inspections have been proposed. In an inspection system that automatically performs inspections, a method is adopted in which an image of a printed matter is read by a scanner, and the presence or absence of a printing defect is inspected by comparing the image data with a correct image (reference image). When inspecting an image by comparing such images, the alignment of the images greatly affects the inspection accuracy. Therefore, in such image inspections, it is important to perform good alignment accuracy between the images.
[0003] As a general alignment method, a method of extracting feature points of an image and performing alignment by rigid body alignment such as projective transformation is known. For example, in Patent Document 1, feature points of a printed image are extracted at the front end and the rear end in the conveyance direction of the printed matter, and alignment is performed by rigid body transformation. However, in such alignment by rigid body transformation, local misalignment due to conveyance unevenness or paper elongation cannot be adjusted.
[0004] On the other hand, as a more accurate alignment method, a method of non-rigid alignment such as free-form deformation (FFD) is known. By using such a non-rigid alignment method, it is possible to perform alignment including local magnification and misalignment, in addition to image deviation and rotation. Therefore, compared with alignment by rigid body transformation, more accurate alignment is possible.
[0005] In free-form alignment, control points that control the shape of an image are arranged in a grid on the image, and the image is deformed by moving each control point. Then, in order to determine the arrangement of control points necessary to deform the image data to be inspected so that it aligns with the position of the reference image, the error in the image is calculated, and the positions of the control points are sequentially updated in a direction that minimizes that error. [Prior art documents] [Patent Documents]
[0006] [Patent Document 1] Japanese Patent Publication No. 2020-118497 [Overview of the project] [Problems that the invention aims to solve]
[0007] It is generally known that alignment accuracy decreases near the edges of the paper, and this is thought to be due to a misalignment of the print position relative to the paper in the printing device, rather than being caused by the print data itself. When the print position is misaligned in this way, alignment accuracy decreases, especially near the edges of the paper, which can lead to these areas being mistakenly detected as printing defects.
[0008] The object of the present invention is to solve at least one of the problems of the prior art described above.
[0009] The object of the present invention is to provide a technology that can suppress false detection near the edges of a recording medium even if a misalignment of the print position occurs when inspecting an image by non-rigid alignment. [Means for solving the problem]
[0010] To achieve the above objective, an image processing apparatus according to one aspect of the present invention has the following configuration. That is, An image processing apparatus for inspecting an image formed on a recording medium by a printing device, An acquisition means for reading an image of the object to be inspected formed on the recording medium and acquiring the image of the object to be inspected, A first alignment means for aligning the image to be inspected with respect to a reference image by non-rigid alignment, the first alignment means corrects the position of control points near the edge of the recording medium among the control points placed on the image to be inspected, and performs alignment using the control points at the corrected positions, The system includes an inspection means for inspecting whether or not there are defects in the image to be inspected, based on the image to be inspected and a reference image that have been aligned by the first alignment means, The position of the control points near the end is corrected based on the spacing between the control points adjacent to the end. [Effects of the Invention]
[0011] According to the present invention, when inspecting an image by non-rigid alignment, it is possible to suppress false detection near the edges of the recording medium even if a misalignment of the print position occurs.
[0012] Other features and advantages of the present invention will become apparent from the following description with reference to the accompanying drawings. In the accompanying drawings, the same or similar components are given the same reference numeral. [Brief explanation of the drawing]
[0013] The attached drawings are included in the specification and constitute part thereof, illustrating embodiments of the present invention and are used together with the description to explain the principles of the present invention. [Figure 1] A diagram showing the configuration of a printing system that performs output and inspection of printed materials, including an image processing device (inspection processing device) according to Embodiment 1 of the present invention. [Figure 2] A functional block diagram showing the functions of the image processing apparatus according to Embodiment 1. [Figure 3] A flowchart illustrating the processing procedure for the inspection process performed by the image processing device according to this embodiment 1. [Figure 4] A flowchart illustrating the inspection process for S305 in Figure 3. [Figure 5] A diagram showing an example of a filter for emphasizing printing defects. [Figure 6] A flowchart for explaining the alignment process executed by the alignment processing unit 203 according to Embodiment 1 in S401 of FIG. 4. [Figure 7] A diagram showing an example of the alignment process according to Embodiment 1. [Figure 8] A flowchart for explaining the process of correcting control points near the edge of the paper in S606 of FIG. 6. [Figure 9] A schematic diagram showing an example of a reference image and an inspection target image. [Figure 10] A diagram for explaining a specific example of the correction of control points in S606 of FIG. 6. [Figure 11] A flowchart for explaining the process of obtaining a differential image (S402) according to Embodiment 1. [Figure 12] A schematic diagram for explaining the state of the process of obtaining a differential image according to Embodiment 1. [Figure 13] A diagram showing an example of a UI screen on which an image processing apparatus according to Embodiment 1 displays a detection result on a UI panel. [Figure 14] A flowchart for explaining the alignment process executed by the alignment processing unit according to Embodiment 2 in S401 of FIG. 4. [Figure 15] A diagram showing an example of the arrangement of control points according to Embodiment 2.
Mode for Carrying Out the Invention
[0014] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the invention according to the claims. Although a plurality of features are described in the embodiments, not all of these plurality of features are essential for the invention, and the plurality of features may be arbitrarily combined. Further, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and redundant descriptions are omitted.
[0015] [Embodiment 1] Figure 1 shows the configuration of a printing system that performs output and inspection of printed materials, including an image processing device (inspection processing device) 100 according to Embodiment 1 of the present invention.
[0016] The printing system according to Embodiment 1 includes at least an image processing device 100 for performing inspection processing, a printing server 180, and a printing device 190. The printing server 180 has the function of generating a print job for printing and submitting the print job to the printing device 190. Multiple external devices (not shown) may be connected to the printing server 180 via a network for communication, and the printing server 180 may receive requests to generate print jobs and print data from these external devices. The printing server 180 can also perform RIP processing for acquiring a reference image. Specifically, in the RIP processing for acquiring a reference image, for example, a resolution of 600 dpi is converted to 300 dpi to generate image data. On the other hand, in the RIP processing for generating print data, 600 dpi image data is generated without reducing the resolution.
[0017] The printing device 190 forms an image on a recording medium (paper (sheet)) based on a print job fed from the printing server 180. The printing device 190 can be equipped with offset printing, electrophotography, inkjet, or other methods. Embodiment 1 describes an electrophotographic printing device, but there is no intention to limit the present invention. The printing device 190 has a paper feed unit 191, and the user sets the paper in the paper feed unit 191 in advance. When a print job is fed into the printing device 190, it transports the paper set in the paper feed unit 191 along the transport path 192, forms an image on its surface or both sides, and transports it to the image processing device 100.
[0018] The image processing device 100 performs an inspection process to check for image defects in the sheet (also referred to as paper, recording medium, etc.), i.e., the printed material, which has been transported through the transport path 192 after the printing device 190 has formed an image. In other words, the image processing device 100 functions as an inspection processing device. Here, the overall process of checking for the presence or absence of image defects is referred to as the inspection process, and the process of detecting multiple types of image defects included in the inspection process is referred to as the defect detection process (or simply the detection process).
[0019] The image processing device 100 includes a CPU 101, RAM 102, ROM 103, main memory 104, and an image reading device 105. The image processing device 100 also includes an interface (I / F) 106 with the printing device 190, a general-purpose interface (I / F) 107, a user interface (UI) panel (operation panel) 108, and a main bus 109. Furthermore, the image processing device 100 includes a transport path 110 for printed materials connected to the transport path 192 of the printing device 190, an output tray 111 for ejecting printed materials that have passed inspection, and an output tray 112 for ejecting printed materials that have been found to be defective and have failed inspection. Note that the classification of printed materials may be more detailed than just two categories: pass or fail in image inspection.
[0020] The CPU 101 is a processor that controls the entire image processing device 100. The RAM 102 functions as the main memory and work area of the CPU 101. The ROM 103 stores programs and various data executed by the CPU 101. The main memory 104 stores applications executed by the CPU 101 and data used for image processing. The image reading device (scanner) 105 can read one or both sides of a printed material sent from the printing device 190 on the transport path 110 and acquire it as image data. Specifically, the image reading device 105 reads one or both sides of the transported printed material using one or more reading sensors provided near the transport path 110. The reading sensors may be provided only on one side, or they may be provided on both the front and back sides of the transported printed material in order to read both sides simultaneously. If the sensor is provided on only one side, after reading one side, the front and back of the printed material being transported using a double-sided transport path (not shown) in the transport path 110 may be reversed, and the reading sensor may be allowed to read the other side again.
[0021] The printing device interface 106 is connected to the printing device 190, allowing for synchronization of the printing device 190's processing timing and communication of each other's operating status. The general-purpose interface 107 is a serial bus interface such as USB or IEEE1394, allowing the user to retrieve data such as logs or import data into the image processing device 100. The UI panel 108 has a display (display unit) with touch panel functionality and functions as the user interface for the image processing device 100, displaying the current status and settings to the user. The system can accept user instructions by having the user operate the buttons displayed on this touch panel. The main bus 109 connects various parts of the image processing device 100. Instructions from the CPU 101 via the main bus 109 can operate various parts of the image processing device 100 and the printing system. For example, it can synchronize the movement of the transport path 110 or switch whether to transport printed materials to the pass output tray 111 or the fail output tray 112 depending on the inspection results. In addition to the CPU, it may also be equipped with a GPU.
[0022] The image processing device 100 according to Embodiment 1 transports printed materials received from the printing device 190 along the transport path 110, and performs the inspection process described below based on the image data of the printed materials read by the image reading device 105. If the printed materials are determined to pass the inspection as a result of this inspection process, they are transported to the pass output tray 111; otherwise, they are transported to the fail output tray 112. In this way, only printed materials whose print quality has been confirmed can be collected in the output tray 111 as printed deliverables for delivery.
[0023] Figure 2 is a functional block diagram illustrating the functions of the image processing device 100 according to Embodiment 1. Each function shown in this block diagram is realized by the CPU 101 loading the program stored in the ROM 103 into the RAM 102 and executing it.
[0024] Figure 3 is a flowchart illustrating the processing procedure of the inspection process performed by the image processing device 100 according to this embodiment 1. The process described below is realized, for example, by the CPU 101 loading the program stored in ROM 103 into RAM 102 and executing it. In the following, the step number of each process is indicated by a number following S. The processing procedure of the inspection process, which is the overall process of checking for the presence or absence of image defects, will be described below with reference to Figures 2 and 3. Note that in the explanation of Figure 3, the CPU 101 will be described as functioning as the functional unit shown in Figure 2.
[0025] First, in S301, the inspection process selection unit 202 and the processing parameter setting unit 204 select multiple defect detection processes to be performed based on user input, and set the parameters for each of the selected defect detection processes. Of course, it is also possible to select only one defect detection process.
[0026] At this time, the inspection process selection unit 202 accepts the user's selection from a plurality of defect detection processes via a selection screen (not shown) displayed on the UI panel 108. On this selection screen, for example, the type of defect can be selected, and a defect detection process for detecting the selected defect is selected. The types of defects may include any type of defect, such as point-shaped defects and line-shaped (streak) defects as described in Embodiment 1, as well as image irregularities and surface shape results. If the user does not select a type of defect, a default defect detection process may be selected.
[0027] The processing parameter setting unit 204 then registers the parameters for performing the defect detection process selected by the inspection process selection unit 202. These parameters include filters according to the type of defect and thresholds for determining whether or not something is a defect. Of these parameters, the thresholds are set based on the difference values sent from the printing device 190. Detailed information regarding the parameter setting process will be described later.
[0028] Next, in S302, the image acquisition unit 201 acquires a reference image (reference image data) from the RAM 102 or main memory 104. However, it is assumed that this reference image is already stored in the RAM 102 or main memory 104.
[0029] There are two ways to create a reference image here. The first is to generate a reference image by executing a print job to produce a printed document and then scanning that document with the image reader 105. At this time, a print job to register the reference image is submitted from the print server 180 to the print device 190 to execute the printing of the reference image. When printing is executed, the image processing device 100 detects the transport of the paper on which the reference image has been printed and scans the paper with the image reader 105. The scanned image data is then saved as the reference image in the RAM 102 or main memory 104 of the image processing device 100.
[0030] Another method involves using RIP-processed image data, which is generated by analyzing a print job, as the reference image, rather than using scanned images. Embodiment 1 describes an example where RIP-processed image data is used as the reference image.
[0031] Next, in S303, the image acquisition unit 201 acquires image data of the object to be inspected (inspection target image) by having the image reading device 105 read the printed material to be inspected that has been transported from the printing device 190. Alternatively, the image data of the object to be inspected may be acquired from scanned image data that has been previously read by the image reading device 105 and stored in the main memory 104.
[0032] Next, proceeding to S304, the inspection process selection unit 202 sets the defect detection process to be executed as the initial value from among the multiple defect detection processes stored in RAM 102. This initial value indicates the defect detection process to be performed first, and if there is no particular priority order for the execution of the defect detection processes, any order is acceptable, such as the order in which they were selected.
[0033] Next, proceeding to S305, the alignment processing unit 203 and the image inspection unit 205 perform defect detection processing by aligning the image to be inspected with the reference image. Details of this process will be described later with reference to Figure 4.
[0034] Then, proceeding to S306, the image inspection unit 205 determines whether or not it has completed the defect detection process for all selected inspection types. If all defect detection processes have been completed, it proceeds to S308; otherwise, it proceeds to S307. In S307, the inspection process selection unit 202 changes the type of inspection process to be executed next to an unprocessed one and returns the process to S305. In this way, the process from S305 to S307 is repeated in S306 until all defect detection processes are completed. In this way, when all defect detection processes for all selected inspection types are completed in S306, the process proceeds to S308, where the inspection result output unit 206 generates the inspection results and displays them on the UI panel 108, ending this process. Details of this display process will be described later with reference to Figure 13.
[0035] Next, referring to Figure 4, the processing procedure for the defect detection process executed in S305 by the alignment processing unit 203 and the image inspection unit 205 according to Embodiment 1 will be described. The processing described below is realized, for example, by the CPU 101 loading the program stored in ROM 103 into RAM 102 and executing it. In the following, the step number of each process is indicated by a number following S.
[0036] Figure 4 is a flowchart illustrating the inspection process of S305 in Figure 3. In Figure 4, the explanation is also given using an example where the CPU 101 functions as the functional unit shown in Figure 2.
[0037] First, in S401, the alignment processing unit 203 aligns the reference image with the image to be inspected. Details of this will be described later with reference to Figures 6 and 7. Next, in S402, the image inspection unit 205 acquires a difference image between the reference image and the image to be inspected. Here, a difference image is generated by comparing the reference image and the image to be inspected pixel by pixel and acquiring the difference value of the pixel value (for example, the density value for each RGB) for each pixel. Next, in S403, the image inspection unit 205 performs a filter process on the difference image acquired in S402 to emphasize a specific shape.
[0038] Figure 5 shows an example of a filter used to highlight printing defects.
[0039] For example, Figure 5(A) shows a filter for emphasizing point-like defects, and Figure 5(B) shows a filter for emphasizing linear defects. These filters are changed depending on the type of defect detection process selected in S304. For example, if point-like defect detection is selected as the type of defect detection process, the process is executed using the filter shown in Figure 5(A). Also, if linear defect detection is selected as the type of defect detection process, the process is executed using the filter shown in Figure 5(B).
[0040] Next, proceeding to S404, the image inspection unit 205 performs a binarization process on the enhanced difference image, such that if the difference value is above a threshold, it becomes "1", and if it is below the threshold, it becomes "0". Next, proceeding to S405, the image inspection unit 205 determines whether there are any pixels in the binarized image that have exceeded the threshold and become "1". If there are, proceed to S406; otherwise, it is determined that there are no defects and this process ends. In S406, the image inspection unit 205 determines that there are defects, stores the type of defect detection process that detected the defect and the coordinates of the defect in association, and then ends this process. Note that the flowchart in Figure 4 is shown in the subroutine of S305 and shows the flow of one defect detection process. Therefore, each time the subroutine of S305 is called, the selected type of defect detection process is executed, and the filter process (S403) corresponding to the selected type is executed.
[0041] In Embodiment 1, the defect detection process was described using examples of a process for detecting point-like defects and a process for detecting linear defects, but the present invention is not limited to these. In other words, the present invention is applicable to any process that can detect defects desired by the user, and does not limit the type of defect detection process.
[0042] Next, the processing parameters (detection parameters) set by the processing parameter setting unit 204 in S301 of Figure 3 will be explained. As mentioned above, in Embodiment 1, filtering (S403) and binarization (S404) are performed on the acquired difference image. In this case, for example, if the shape of the filter shown in Figure 5(A) is made smaller, as a result, smaller point-like defects are emphasized and become easier to detect. Also, if the threshold for binarization is made smaller, even smaller differences will exceed the threshold in the binarization process and become "1", and will be detected as defects. In other words, even defects with smaller contrast can be detected. Parameters such as the size of the filter and the threshold for detection are set as processing parameters in S301.
[0043] Next, the alignment process will be explained. Embodiment 1 performs two types of alignment. The first is alignment using information within the image. Details of this process will be described later. The second is alignment using paper vertices. In alignment using paper vertices, the image is transformed so that the paper vertices of the inspection image coincide with the paper vertices of the reference image. Image transformation is also called geometric transformation, and there are known methods such as affine transformation.
[0044] Next, we will describe the alignment using information within the image according to Embodiment 1.
[0045] Referring to Figures 6 and 7, the processing procedure for the alignment process executed by the alignment processing unit 203 according to this embodiment 1 in S401 of Figure 4 will be described.
[0046] Figure 6 is a flowchart illustrating the processing procedure of the alignment process performed by the alignment processing unit 203 according to Embodiment 1 in S401 of Figure 4. Figure 7 is a diagram showing an example of the alignment process according to Embodiment 1.
[0047] In this embodiment 1, the alignment process describes an example in which the inspection target image I shown in Figure 7(A) is aligned with the reference image T, and the aligned image I' is obtained. I(x,y), T(x,y), and I'(x,y) represent the pixel values at coordinates (x,y), respectively. The process described in Figure 6 is implemented, for example, by the CPU 101 loading a program stored in ROM 103 into RAM 102 and executing it. Furthermore, the step number of each process is indicated by a number following S below.
[0048] In S601, the alignment processing unit 203 performs initial alignment. Here, a general alignment method may be used. For example, one method is to extract feature points and perform a projection transformation so that the sum of the Euclidean distances of the feature points is minimized.
[0049] Next, proceeding to S602, the alignment processing unit 203 places multiple control points. As shown in Figure 7(B), L × M control points are placed in a grid pattern on the input image I. At this time, the distance δ between control points is determined from L, M and the image size of the reference image. Let the coordinates of the control point in the lth row and mth column be pl,m (l=1,…,L,m=1,…,M).
[0050] Next, proceeding to S603, the alignment processing unit 203 updates the positions of the control points. The equation for this update is shown in equation (1) below. Here, μ represents the weighting coefficient, which may be a value such as 0.1, or it may be changed according to the speed of the control point update. ∇c is the derivative of the sum of the squares of the differences in pixel values between the aligned image I' and the reference image T in the set of pixel positions Dl,m in the vicinity of the control points pl,m shown in equation (2) and Figure 7(B).
[0051] pl,m=pl,m+μ(∇c / ||∇c||) …Equation (1) ∇c={∂ / (∂pl,m)}Σ|I'(x,y)-T(x,y)| 2 …Formula (2) Here, Σ represents the sum in sets Dl and m.
[0052] Next, proceeding to S604, the alignment processing unit 203 updates the pixels. This process will be explained with reference to Figure 7(C). The update formula at this time is shown in equation (3).
[0053] I'(x,y)=I(w(x,y)) …Equation (3) Here, w(x,y) is expressed by equation (4), which is the equation for calculating the pixel coordinates of image I' after the alignment process of the coordinates (x,y) in the image I being examined.
[0054] w(x,y)=ΣΣBi(u')Bj(v')Pu+i,v+j...Equation (4) Here, the first summation (Σ) represents the sum from i=0 to i=3, and the second summation (Σ) represents the sum from j=0 to j=3.
[0055] The basis vectors B0(t), B1(t), B2(t), and B3(t) in equation (4) are expressed by equations (5), (6), (7), and (8), respectively.
[0056] B0(t)=(1-t) 3 / 6 …Equation (5) B1(t) = (3t 3 -6t 2 +4) / 6 …Equation (6) B2(t) = (-3t) 3 +3t 2 +3t+1) / 6 …Equation (7) B3(t) = t 3 / 6 …Equation (8) As shown in Figure 7(C), u = |x / δ|-1, v = |y / δ|-1, u' = x / δ - |x / δ|, v' = y / δ - |y / δ|. Here, |x / δ| and |y / δ| represent floor brackets, i.e., x / δ and y / δ rounded to integers without decimal places.
[0057] In Embodiment 1, the grid points used to calculate the pixels in image I' after alignment processing were set to 16 points p(u,v), p(u+1,v), ... p(u+3,v+3), but this is not limited to these. For example, four grid points with close Euclidean distances (x,y) may also be used.
[0058] Next, in S605, the alignment processing unit 203 determines whether the update is complete. The determination of whether the update is complete may also be made by calculating the distance d between the image I' after the alignment process and the reference image T, and then determining the completion based on the distance d and a threshold. Here, d=(1 / XY)ΣΣ|I'(x,y)-T(x,y)| …Equation (9) Here, the first summation (Σ) represents the sum from x=1 to x=X, and the second summation (Σ) represents the sum from y=1 to y=Y.
[0059] When the distance d falls below the threshold, the update process is completed.
[0060] Finally, in S606, the alignment processing unit 203 corrects the control points near the edges of the paper. Details of this process will be described later with reference to Figures 8 to 10.
[0061] Next, with reference to Figures 8, 9, and 10, the procedure for correcting control points near the edge of the paper, which is a feature of this embodiment and is performed in S606 by the alignment processing unit 203 according to Embodiment 1, will be described.
[0062] Figure 8 is a flowchart illustrating the process of correcting the control points near the edge of the paper in S606 of Figure 6.
[0063] Figure 9 is a schematic diagram showing an example of a reference image and an image to be examined.
[0064] Figure 9(A) is a schematic diagram showing an example of a reference image used as a reference for alignment in the alignment processing unit 203. Figure 9(B) is a schematic diagram showing an example of an inspection target image that is subject to alignment in the alignment processing unit 203. Figure 9(B) shows the case where the print position of the inspection target image is shifted to the left due to a misalignment of the print position. It can be seen that the print position of the string "ABC" in Figure 9(B) is closer to the edge of the paper than the string "ABC" in Figure 9(A).
[0065] Figure 10 illustrates a specific example of the correction of the control point in S606.
[0066] Figure 10 is a schematic diagram showing an example of the position of control points before and after S605, when the alignment processing unit 203 corrects the control points near the edges of the paper for the image to be inspected. As shown in Figure 10(A), it can be seen that the string "ABC" has been stretched horizontally (in the long direction of the paper) due to the effect of the printing misalignment. This occurs because, when the edge of the paper is used as the reference, the string "ABC" in the reference image is to the right of the string "ABC" in the image to be inspected, so the string "ABC" in the image to be inspected is aligned to the position of the string "ABC" in the reference image. Therefore, when the difference between Figure 9(A) and Figure 10(A) is calculated, a large error occurs near the edges of the paper. In Figure 10(A), pl and m, which represent the control points, indicate the control point in the l row and m column.
[0067] Figure 10(B) is a schematic diagram of the position of control points in an image to be inspected to which the correction process (S606) for control points near the edge of the paper in Embodiment 1 has been applied.
[0068] In the first embodiment, the correction of control points near the edge of the paper is performed on the control points shown in Figure 10(A), and an example of obtaining the control points shown in Figure 10(B) is described. The process described below is realized, for example, by the CPU 101 reading the program stored in ROM 103 into RAM 102 and executing it. In the following, the step number of each process is indicated by a number following S. The following process is performed on all the control points shown in Figure 10(A).
[0069] In S801, the alignment processing unit 203 determines whether the control point of interest pl,m and p1+1,m, or pl,m+1 are adjacent to the edge of the paper. The coordinates of control point pl,m are (xl,m,yl,m), the coordinates of control point pl+1,m are (xl+1,m,yl+1,m), and the coordinates of control point pl,m+1 are (xl,m+1,yl,m+1).
[0070] Check if the control points pl and m of interest are adjacent to the edges of the paper, using the left edge coordinates xle, right edge coordinates xre, top edge coordinates yte, and bottom edge coordinates ybe.
[0071] Whether a control point is adjacent to the left edge of the paper is determined by the following conditions:
[0072] xl,m<xle、かつ、xl+1,m> xle...Formula (10) A control point is considered to be adjacent to the right edge of the paper only if it satisfies the following conditions.
[0073] xl,m<xre、かつ、x1+1,m)> xre...Formula (11) A control point is considered to be adjacent to the top edge of the paper only if it satisfies the following conditions.
[0074] yl,m<yte、かつ、yl,m+1> yte ... Equation (12) A control point is considered to be adjacent to the bottom edge of the paper if it satisfies the following conditions.
[0075] yl,m<ybe、かつ、yl,m+1> ybe ... Equation (13) If the above conditions are met, it is determined that the control points pl and m are adjacent to the edge of the paper, and the process proceeds to S802 to correct the control points. If the conditions are not met, it is determined that they are not adjacent to the edge of the paper, and the process proceeds to S805 to move the control point of interest to the next control point.
[0076] In S802, the alignment processing unit 203 calculates the distance Δp between neighboring control points. For the left edge of the paper, the distance Δp between control points is obtained using the following equation (14).
[0077] Δp = pl + 3, m - pl + 2, m …Equation (14) For the right edge of the paper, the distance Δp between control points is obtained using the following equation (15).
[0078] Δp = pl-1,m - pl-2,m …Equation (15) For the top edge of the paper, the distance Δp between control points is obtained using the following equation (16).
[0079] Δp = pl, m + 3 - pl, m + 2 …Equation (16) For the bottom edge of the paper, the distance Δp between control points is obtained using the following equation (17).
[0080] Δp = pl, m-1 - pl, m-2 …Equation (17) In S803, the alignment processing unit 203 obtains the coordinates ql,m of the corrected control point. In the case of the leftmost point, the coordinates ql,m are obtained using the following equation (18) based on the control point pl+2,m and the interval Δp.
[0081] ql+1,m=pl+2,m-Δp ql, m = ql + 1, m - Δp ... Equation (18) In the case of the rightmost point, the coordinates ql,m are obtained by equation (19) below, based on the control points pl-2,m and Δp.
[0082] ql-1,m=pl-2,m+Δp ql,m = ql-1,m + Δp …Equation (19) In the case of the upper limit, the coordinates ql,m are obtained by equation (20) below, based on the control points pl,m+2 and Δp.
[0083] ql, m+1=pl, m+2-Δp ql,m = ql,m+1 - Δp ...Equation (20) In the case of the lower limit, the coordinates ql,m are obtained by equation (21) below, based on the control points pl,m-2 and Δp.
[0084] ql, m-1 = pl, m-2 + Δp ql,m = ql,m-1 + Δp ...Equation (21) Figure 10(A) shows how to correct the control points pl,m near the left edge of the paper. Here, the distance Δp between control points is calculated from control points p1+3,m and p1+2,m, which are located away from the left edge of the paper. The control point q1+1,m, after correction based on the control point p1+2,m and the distance Δp, is shown as a gray circle. Similarly, the control point ql,m, after correction based on the control point p1+1,m near the left edge of the paper and the distance Δp, is shown as a gray circle.
[0085] In S804, the alignment processing unit 203 moves the control point of interest pl,m to ql,m and p1+1,m to q1+1,m if the paper is at the left or right edge. On the other hand, if the paper is at the top or bottom edge, it moves the control point of interest pl,m to ql,m and pl,m+1 to ql,m+1.
[0086] Figure 10(B) shows the arrangement of control points after correcting the control points near the edges of the paper in Figure 10(A). In Figure 10(A), the string "ABC" is stretched horizontally, and when the difference between Figure 9(A) and Figure 10(A) is calculated, a difference occurs at the location of the string "ACB". However, in Figure 10(B), where the control points near the edges of the paper have been corrected, when the difference is obtained from Figure 9(A), it can be seen that the difference is smaller compared to Figure 10(A).
[0087] In S805, the alignment processing unit 203 determines whether it has processed all control points. If it determines that it has processed all control points, it terminates this process. On the other hand, if it determines that there are unprocessed control points, it proceeds to S801.
[0088] Referring to Figures 11 and 12, the difference image acquisition process performed by the image inspection unit 205 according to Embodiment 1 will be described. When alignment is performed using the information within the image with the flowchart in Figure 6 described above, the position of the printed image will not be aligned at the edges of the paper due to the influence of the printing position. Therefore, in the difference image acquisition process, near the edges of the paper, the difference is calculated using the image aligned at the top of the paper, thereby correctly generating a difference image even near the edges of the paper.
[0089] Figure 11 is a flowchart illustrating the process (S402) for acquiring a difference image according to Embodiment 1. In Figure 11, the explanation is given using an example where the CPU 101 functions as the functional unit shown in Figure 2.
[0090] Figure 12(a) shows an example of a reference image. The numbers at the top of the figure indicate the coordinates in the main scanning direction, and the numbers at the left of the figure indicate the coordinates in the sub-scanning direction. Figure 12 shows an example of a single-color image, but the image may also be a three-color RGB image. Embodiment 1 will be explained assuming that the pixel value of the white pixels in Figure 12 is "0" and the pixel value of the black pixels is "255".
[0091] Figure 12(b) shows an example of an image to be inspected, aligned using information within the image according to the flowchart in Figure 6. This image shows the case where the print position is shifted to the left. The black pixel at coordinates (21,7) simulates a defect.
[0092] Figure 12(c) is the difference image between Figure 12(a) and Figure 12(b). Figure 12(d) shows an example of an inspection target image aligned with the paper vertex relative to Figure 12(a). Figure 12(e) is the difference image between Figure 12(a) and Figure 12(d). And Figure 12(f) shows an example of a difference image obtained according to the flowchart in Figure 11.
[0093] First, in S1101, the image inspection unit 205 determines whether the position of the target pixel is near the edge of the paper. In Embodiment 1, the two pixels from the edge of the paper are considered to be near the edge of the paper. That is, coordinates (3,3) in Figure 12(a) are determined to be near the edge of the paper. Also, coordinates (4,4) in Figure 12(a) are the third pixel from the edge of the paper, so they are determined not to be near the edge of the paper. In Embodiment 1, the two pixels from the edge of the paper were used as the criterion for determining whether it is the edge of the paper, but this is not the only criterion, and it may be set based on the maximum width of print position misalignment, etc. If it is determined in S1101 that it is near the edge of the paper, the process proceeds to S1103, and if it is determined not to be near the edge of the paper, the process proceeds to S1102. In S1102, the image inspection unit 205 calculates the difference FErr using the image aligned with the image information in the inspection image using the following formula (22), and proceeds to S1104. Here, the result is obtained from the absolute difference between the reference image (Ref) and the image aligned using information within the examination image (FTar).
[0094] FErr(i,j)=|Ref(i,j)-FTar(i,j)| …Equation (22) Figure 12(c) shows the difference between the reference image in Figure 12(a) and the inspection target image aligned using the information within the image in Figure 12(b). Here, since the alignment is done using the information within the image, it can be seen that no difference occurs in the string "ABC". It can be seen that due to the effect of print misalignment, differences occur between coordinates (2,2) and (2,26) and between coordinates (26,2) and (26,26) at the edge of the paper. However, since the coordinates between (2,2) and (2,26) and between coordinates (26,2) and (26,26) are near the edge of the paper, the differences that occur here are not taken into consideration.
[0095] Meanwhile, in S1103, the image inspection unit 205 calculates the difference CErr using the image aligned at the vertices of the paper according to the following formula (23) and proceeds to S1104. It is calculated from the absolute value of the difference between the reference image (Ref) and the image aligned at the vertices of the paper (CTar).
[0096] CErr(i,j)=|Ref(i,j)-CTar(i,j)| …Equation (23) Figure 12(e) shows the difference between the reference image in Figure 12(a) and the inspection target image aligned at the top of the paper in Figure 12(d). Here, because the alignment is at the top of the paper, it can be seen that a difference occurs in the text string "ABC" within the image. On the other hand, no difference occurs at the edges of the paper. This is because the alignment is at the top of the paper.
[0097] Figure 12(f) shows the image difference acquired by the image inspection unit 205 in Embodiment 1. Figure 12(e) is used near the edges of the paper, and Figure 12(c) is used everywhere else. In Figure 12(f), it can be seen that there is no excessive difference at the edges of the paper, and the defect at coordinate (21,7) is correctly extracted.
[0098] In this way, the difference between the inspection target image, which is aligned using information within the image, and the inspection target image, which is aligned using the paper's vertices, is obtained, except near the edges of the paper. This makes it possible to correctly obtain the difference both near and outside the edges of the paper.
[0099] In S1104, the image inspection unit 205 determines whether it has acquired the difference for all pixels. If it determines that it has, it terminates the process of acquiring the difference image. On the other hand, if it determines that there are unprocessed pixels, it moves the pixel of interest to the next pixel and proceeds to S1101.
[0100] In Embodiment 1, the difference image was obtained by switching the alignment image depending on whether it was near the edge of the paper. Alternatively, to obtain the difference of the image near the edge of the paper, it is also possible to copy the image data of the paper edge and calculate the difference.
[0101] Alternatively, the edges of the paper could be excluded from the difference calculation process.
[0102] Next, we will describe in detail the case where the inspection result output unit 206 displays the detection result at S308 in Figure 3.
[0103] Figure 13 shows an example of a UI screen 1301 in which the image processing device 100 according to Embodiment 1 displays detection results on the UI panel 108.
[0104] The UI screen 1301 displays an overall view 1302 of the image to be inspected. Here, for example, a defect 1303 detected using the filter in Figure 5(A) is determined to be a point-like defect, and the words "Point-like defect" are displayed near defect 1303. Similarly, a defect 1304 detected using the filter in Figure 5(B) is determined to be a linear defect, and the words "Linear defect" are displayed near defect 1304. Furthermore, as shown in Tables 1305 and 1306, the position coordinates where each defect was detected may also be displayed.
[0105] However, the method of displaying the inspection results is not limited to the above method. For example, it is sufficient to indicate which of the multiple detection processes detected the defect, such as displaying each type of detection process in a different color, and the method is not limited.
[0106] As described above, according to Embodiment 1, even if the printing position on the paper is shifted due to misalignment of the printing position, etc., it is possible to achieve high-precision alignment even near the edges of the paper by correcting the control points near the edges of the paper using information from surrounding control points.
[0107] [Embodiment 2] Embodiment 1 described above explained a method for correcting control points near the edges of the paper. In contrast, Embodiment 2 describes a method for adding control points near the edges of the paper. In Embodiment 2, by adding control points to the edges of the paper and the edges of the printable area, high-precision alignment is achieved near the edges of the paper even when a print misalignment occurs. Note that the configuration of the printing system and the hardware configuration of the image processing device in Embodiment 2 are the same as those in Embodiment 1, so their explanation will be omitted. Below, only the differences from Embodiment 1 will be described in detail.
[0108] <Alignment process> Next, with reference to Figures 14 and 15, the processing procedure for the alignment process executed by the alignment processing unit 203 according to Embodiment 2 in S401 of Figure 4 will be described.
[0109] Figure 15 shows an example of the arrangement of control points according to Embodiment 2.
[0110] In Figure 15, the gray object is an image including the paper. The area enclosed by the dotted line inside the gray object indicates the printable area, which is a predetermined range. The printable area is defined, for example, as the area 1.5 mm inward from the edge of the paper.
[0111] Figure 14 is a flowchart illustrating the processing procedure of the alignment process executed by the alignment processing unit 203 according to Embodiment 2 in S401 of Figure 4. In the explanation of Figure 14, we will describe an example in which the CPU 101 functions as the functional unit shown in Figure 2.
[0112] First, in S1401, the alignment processing unit 203 performs initial alignment. Next, in S1402, the alignment processing unit 203 arranges control points, for example, as shown in Figure 15. Here, L × M control points are arranged in a grid pattern on the input image I. At this time, the distance δ between control points is obtained from L, M and the image size. Here, the coordinates of the control point in the l row and m column are pl,m (l=1,…,L,m=1,…,M).
[0113] Next, proceeding to S1403, the alignment processing unit 203 adds control points to the edges of the paper and the edges of the printable area. Specifically, the alignment processing unit 203 adds control points rl and m to the edges of the paper. Here, it finds the intersection point between the line segment connecting control points pl and m and p1+1 and m, which extend across the edges of the paper, and the line segment at the edges of the paper, and adds this intersection point as the control point rl and m. Furthermore, the alignment processing unit 203 adds control points sl and m to the edges of the printable area. Specifically, it finds the intersection point between the line segment connecting control points pl and m and p1+1 and m, which extend across the edges of the printable area, and the line segment at the printable area, and adds this intersection point as the control point sl and m.
[0114] This allows control points rl and m to align the paper edge even if a print misalignment occurs. Furthermore, since control points sl and m are positioned at the edge of the printable area, it is guaranteed that no user data exists between control points rl and m and control points sl and m. Therefore, even if control points rl and m move due to a print misalignment, control points sl and m allow for alignment of the inspection target image and the reference image within the effective printable area without being affected by the print misalignment.
[0115] Then, proceeding to S1404, the alignment processing unit 203 updates the position of the control point. Next, proceeding to S1405, the alignment processing unit 203 updates the pixels. Then, in S1406, the alignment processing unit 203 determines whether the update is complete. If it determines that it is complete, it terminates this process; otherwise, it returns to S1404.
[0116] As described above, according to Embodiment 2, by adding control points rl,m at the edge of the paper and control points sl,m within the printable area, even if a print misalignment occurs, the misalignment can be absorbed by the control points rl,m and sl,m. As a result, within the effective printable area, the inspection target image and the reference image can be aligned without being affected by the print misalignment.
[0117] (Other embodiments) The present invention can also be realized by supplying a program that implements one or more of the functions of the above-described embodiments to a system or device via a network or storage medium, and by having one or more processors in the computer of that system or device read and execute the program. It can also be realized by a circuit (e.g., an ASIC) that implements one or more functions.
[0118] [Item 1] An image processing apparatus for inspecting an image formed on a recording medium by a printing device, An acquisition means for reading an image of the object to be inspected formed on the recording medium and acquiring the image of the object to be inspected, A first alignment means for aligning the image to be inspected with respect to a reference image by non-rigid alignment, the first alignment means corrects the position of control points near the edge of the recording medium among the control points placed on the image to be inspected, and performs alignment using the control points at the corrected positions, The system includes an inspection means for inspecting whether or not there are defects in the image to be inspected, based on the image to be inspected and a reference image that have been aligned by the first alignment means, An image processing apparatus characterized in that the position of control points near the end is corrected based on the interval between control points adjacent to the end.
[0119] [Item 2] The image processing apparatus according to item 1, further comprising a second alignment means for aligning the image to be inspected with respect to a reference image using the vertices of the recording medium and the vertices of the reference image.
[0120] [Item 3] The inspection means further includes a setting means for setting processing parameters used in the inspection, The image processing apparatus according to item 1 or 2, characterized in that the processing parameters include at least the type of defect to be inspected by the inspection means and a threshold for determining whether or not the defect is present.
[0121] [Item 4] The image processing apparatus according to any one of items 1 to 3, characterized in that the first alignment means performs alignment by adding control points near the edge of the recording medium.
[0122] [Item 5] The inspection means includes a difference image acquisition means that acquires a difference image between the inspection target image and the reference image that has been aligned by the first alignment means or the second alignment means. The image processing apparatus according to item 2, characterized in that the difference image acquisition means acquires a difference image between the inspection target image aligned by the first alignment means and the reference image for images near the edge of the recording medium.
[0123] [Item 6] The image processing apparatus according to item 5, characterized in that the difference image acquisition means acquires a difference image between the inspection target image aligned by the second alignment means and the reference image for images that are not near the edge of the recording medium.
[0124] [Item 7] The image processing apparatus according to item 4, characterized in that the addition of the control points is performed by adding a control point at the intersection of a line segment connecting adjacent control points, which extends across the end of the recording medium, and the end of the recording medium.
[0125] [Item 8] The image processing apparatus according to item 4, characterized in that the addition of control points is performed by adding control points at the intersection of a line segment connecting adjacent control points that extends across the edge of the printable area of the recording medium and the edge of the printable area.
[0126] [Item 9] The image processing apparatus according to item 2, characterized in that the second alignment means performs alignment using affine transformation.
[0127] [Item 10] The image processing apparatus according to any one of items 1 to 9, characterized in that, in the non-rigid alignment, the control points that control the shape of the image are arranged in a grid pattern on the image to be inspected, and the positions of the control points are sequentially updated in order to deform the image to be inspected to match the position of the reference image.
[0128] [Item 11] The system further includes a display means for displaying the inspection results obtained by the aforementioned inspection means. The image processing apparatus according to item 3, characterized in that the display means displays the type of defect and the position coordinates where the defect was detected, according to the processing parameters.
[0129] [Item 12] An image processing apparatus for inspecting an image formed on a recording medium by a printing device, An acquisition means for reading an image of the object to be inspected formed on the recording medium and acquiring the image of the object to be inspected, Alignment means for aligning the image to be inspected with a reference image, An acquisition means for acquiring the difference between the inspection target image and the reference image that have been aligned by the alignment means, A determination means for determining whether the position of the target pixel is near the edge of the recording medium, The system includes an inspection means that checks for defects in the image to be inspected based on the difference and processing parameters obtained by the acquisition means, The image processing apparatus is characterized in that the alignment means switches the method of performing the alignment according to the result determined by the determination means.
[0130] [Item 13] The aforementioned alignment means is The system comprises a first means for aligning at the vertices of the recording medium and a second means for aligning using image information of the image to be inspected by non-rigid alignment. The image processing apparatus according to item 12, characterized in that when the determination means determines that the recording medium is near the edge, the first means performs alignment, and when the determination means determines that the recording medium is not near the edge, the second means performs alignment.
[0131] [Item 14] The system further includes setting means for setting the aforementioned processing parameters, The image processing apparatus according to item 12 or 13, characterized in that the processing parameters include at least the type of defect to be inspected by the inspection means and a threshold for determining whether or not the defect is present.
[0132] [Item 15] The image processing apparatus according to item 13, characterized in that the second means corrects the position of the control point near the edge of the recording medium to perform alignment.
[0133] [Item 16] The image processing apparatus according to item 13, characterized in that the second means is to perform alignment by adding a control point near the edge of the recording medium.
[0134] [Item 17] The image processing apparatus according to item 16, characterized in that the addition of the control points is performed by adding a control point at the intersection of a line segment connecting adjacent control points that extends across the edge of the recording medium and the edge.
[0135] [Item 18] The image processing apparatus according to item 16, characterized in that the addition of the control points is performed by adding control points at the intersection of a line segment connecting adjacent control points that extends across the edge of the printable area of the recording medium and the edge of the printable area.
[0136] [Item 19] A control method for controlling an image processing apparatus that performs inspection of an image formed on a recording medium by a printing apparatus, An acquisition step of reading the image of the object to be inspected formed on the recording medium and acquiring the image of the object to be inspected, A positioning step for aligning the image to be inspected with respect to a reference image by non-rigid alignment, comprising correcting the position of control points near the edge of the recording medium among the control points placed on the image to be inspected, and performing alignment using the control points at the corrected positions, The system includes an inspection step which checks for defects in the image to be inspected based on the image to be inspected and a reference image that have been aligned by the alignment step, A control method characterized in that the position of a control point near the end is corrected based on the interval between control points adjacent to the end.
[0137] [Item 20] A control method for controlling an image processing apparatus that performs inspection of an image formed on a recording medium by a printing apparatus, An acquisition step of reading the image of the object to be inspected formed on the recording medium and acquiring the image of the object to be inspected, A positioning step of aligning the image to be inspected with a reference image, An acquisition step is to acquire the difference between the inspection target image and the reference image that have been aligned by the alignment step, A determination step to determine whether the position of the target pixel is near the edge of the recording medium, The system includes an inspection step which checks for defects in the image to be inspected based on the difference obtained in the acquisition step and processing parameters, The alignment step is a control method characterized by switching the method of performing the alignment according to the result determined by the determination step.
[0138] [Item 21] A program for causing a computer to function as one of the means of an image processing apparatus as described in any one of items 1 through 18.
[0139] The present invention is not limited to the embodiments described above, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the following claims are attached to make the scope of the invention public. [Explanation of symbols]
[0140] 100…Image processing device (inspection processing device), 101…CPU, 102…RAM, 105…Image reading device, 108…UI panel, 190…Printing device, 111,112…Output tray, 202…Inspection processing selection unit, 203…Alignment processing unit, 204…Processing parameter setting unit, 205…Image inspection unit, 206…Inspection result output unit
Claims
1. An image processing apparatus for inspecting an image formed on a recording medium by a printing device, An acquisition means for reading an image of the object to be inspected formed on the recording medium and acquiring the image of the object to be inspected, A first alignment means for aligning the image to be inspected with respect to a reference image by non-rigid alignment, the first alignment means corrects the position of control points near the edge of the recording medium among the control points placed on the image to be inspected, and performs alignment using the control points at the corrected positions, The system includes an inspection means for inspecting whether or not there are defects in the image to be inspected, based on the image to be inspected and a reference image that have been aligned by the first alignment means, An image processing apparatus characterized in that the position of control points near the end is corrected based on the interval between control points adjacent to the end.
2. The image processing apparatus according to claim 1, further comprising a second alignment means for aligning the image to be inspected with respect to a reference image using the vertices of the recording medium and the vertices of the reference image.
3. The inspection means further includes a setting means for setting processing parameters used in the inspection, The image processing apparatus according to claim 1, characterized in that the processing parameters include at least the type of defect to be inspected by the inspection means and a threshold value for determining whether or not the defect is present.
4. The image processing apparatus according to claim 1, characterized in that the first alignment means performs alignment by adding control points near the edge of the recording medium.
5. The inspection means includes a difference image acquisition means that acquires a difference image between the inspection target image and the reference image that has been aligned by the first alignment means or the second alignment means. The image processing apparatus according to claim 2, characterized in that the difference image acquisition means acquires a difference image between the inspection target image aligned by the first alignment means and the reference image for images near the edge of the recording medium.
6. The image processing apparatus according to claim 5, characterized in that the difference image acquisition means acquires a difference image between the inspection target image aligned by the second alignment means and the reference image for images that are not near the edge of the recording medium.
7. The image processing apparatus according to claim 4, characterized in that the addition of the control points is performed by adding a control point at the intersection of a line segment connecting adjacent control points that extends across the end of the recording medium and the end of the recording medium.
8. The image processing apparatus according to claim 4, characterized in that the addition of the control points is performed by adding control points at the intersection of a line segment connecting adjacent control points that extends across the edge of the printable area of the recording medium and the edge of the printable area.
9. The image processing apparatus according to claim 2, characterized in that the second alignment means performs alignment using affine transformation.
10. The image processing apparatus according to claim 1, characterized in that, in the non-rigid alignment, the control points that control the shape of the image are arranged in a grid pattern on the image to be inspected, and the positions of the control points are sequentially updated in order to deform the image to be inspected to match the position of the reference image.
11. The system further includes a display means for displaying the inspection results obtained by the aforementioned inspection means. The image processing apparatus according to claim 3, wherein the display means displays the type of defect and the position coordinates where the defect was detected, according to the processing parameters.
12. An image processing apparatus for inspecting an image formed on a recording medium by a printing device, An acquisition means for reading an image of the object to be inspected formed on the recording medium and acquiring the image of the object to be inspected, Alignment means for aligning the image to be inspected with a reference image, An acquisition means for acquiring the difference between the inspection target image and the reference image that have been aligned by the alignment means, A determination means for determining whether the position of the target pixel is near the edge of the recording medium, The system includes an inspection means that checks for defects in the image to be inspected based on the difference and processing parameters obtained by the acquisition means, The image processing apparatus is characterized in that the alignment means switches the method of performing the alignment according to the result determined by the determination means.
13. The aforementioned alignment means is The system comprises a first means for aligning at the vertices of the recording medium and a second means for aligning using image information of the image to be inspected by non-rigid alignment. The image processing apparatus according to claim 12, characterized in that if the determination means determines that the recording medium is near the edge, the first means performs alignment, and if the determination means determines that the recording medium is not near the edge, the second means performs alignment.
14. The system further includes setting means for setting the aforementioned processing parameters, The image processing apparatus according to claim 12, characterized in that the processing parameters include at least the type of defect to be inspected by the inspection means and a threshold value for determining whether or not the defect is present.
15. The image processing apparatus according to claim 13, characterized in that the second means corrects the position of the control point near the edge of the recording medium to perform alignment.
16. The image processing apparatus according to claim 13, characterized in that the second means is to perform alignment by adding control points near the edge of the recording medium.
17. The image processing apparatus according to claim 16, characterized in that the addition of the control points is performed by adding a control point at the intersection of a line segment connecting adjacent control points that extends across the end of the recording medium and the end of the recording medium.
18. The image processing apparatus according to claim 16, characterized in that the addition of the control points is performed by adding control points at the intersection of a line segment connecting adjacent control points that extends across the edge of the printable range of the recording medium and the edge of the printable range.
19. A control method for controlling an image processing apparatus that performs inspection of an image formed on a recording medium by a printing apparatus, An acquisition step of reading the image of the object to be inspected formed on the recording medium and acquiring the image of the object to be inspected, A positioning step for aligning the image to be inspected with respect to a reference image by non-rigid alignment, comprising correcting the position of control points near the edge of the recording medium among the control points placed on the image to be inspected, and performing alignment using the control points at the corrected positions, The system includes an inspection step which checks for defects in the image to be inspected based on the image to be inspected and a reference image that have been aligned by the alignment step, A control method characterized in that the position of a control point near the end is corrected based on the interval between control points adjacent to the end.
20. A control method for controlling an image processing apparatus that performs inspection of an image formed on a recording medium by a printing apparatus, An acquisition step of reading the image of the object to be inspected formed on the recording medium and acquiring the image of the object to be inspected, A positioning step of aligning the image to be inspected with a reference image, An acquisition step is to acquire the difference between the inspection target image and the reference image that have been aligned by the alignment step, A determination step to determine whether the position of the target pixel is near the edge of the recording medium, The system includes an inspection step which checks for defects in the image to be inspected based on the difference obtained in the acquisition step and processing parameters, The alignment step is a control method characterized by switching the method of performing the alignment according to the result determined by the determination step.
21. A program for causing a computer to function as one of the means of an image processing apparatus according to any one of claims 1 to 18.