US-12626355-B2 - Image processing apparatus, method of controlling the same, and storage medium
Abstract
The present invention provides an image processing apparatus that inspects an image formed on a printing medium. The image processing apparatus reads an image formed on a printing medium and obtains a target image to be inspected, and corrects a position of control point among control points disposed on the target image, at or near an edge of the printing medium, and performs alignment using the corrected position of the control point so as to align the target image to a reference image using a non-rigid-body alignment, and inspects for a defect in the target image on a basis of the aligned target image and the reference image. In the correcting, a position of a control point at or near the edge is corrected on a basis of an interval between adjacent control points at or near the edge.
Inventors
- Kenichirou Haruta
Assignees
- CANON KABUSHIKI KAISHA
Dates
- Publication Date
- 20260512
- Application Date
- 20230516
- Priority Date
- 20220530
Claims (20)
- 1 . An image processing apparatus that inspects an image formed on a printing medium by a printing apparatus, comprising: one or more controllers including one or more processors and one or more memories, the one or more controllers being configured to: read an image for inspection formed on a printing medium and obtain a target image to be inspected; correct a position of a control point in the target image, from among control points disposed on the target image, at or near an edge of the printing medium, and perform alignment using the corrected control point so as to align the target image to a reference image using a non-rigid-body alignment; and inspect for a defect in the target image on a basis of the aligned target image and the reference image after the alignment; wherein, in the correcting, the position of the control point at or near the edge of the printing medium is corrected on a basis of an interval between adjacent control points in the target image, at or near the edge of the printing medium.
- 2 . The image processing apparatus according to claim 1 , wherein the one of more controllers are further configured to: align the target image to the reference image using vertices of the printing medium and vertices of the reference image.
- 3 . The image processing apparatus according to claim 1 , wherein the one or more controllers are further configured to: set processing parameters used in the inspection, wherein the processing parameters include at least a type of the defect and a threshold for determining whether or not a defect exists.
- 4 . The image processing apparatus according to claim 1 , wherein the one or more controllers are further configured to: in the alignment using the non-rigid-body alignment, add a control point at or near the edge of the printing medium.
- 5 . The image processing apparatus according to claim 2 , wherein the one or more controllers are further configured to: in the inspection, obtain a difference image of the target image and the reference image after the alignment using the non-rigid-body alignment, or using the vertices of the printing medium and the vertices of the reference image, and in obtaining the difference image, obtain a difference image of the target image and the reference image after the alignment using the non-rigid-body alignment on an image portion at or near the edge of the printing medium.
- 6 . The image processing apparatus according to claim 5 , wherein the one or more controllers are further configured to: in obtaining the difference image, obtain a difference image of the target image and the reference image after the alignment using the vertices of the printing medium and the vertices of the reference image on an image portion not at or near the edge of the printing medium.
- 7 . The image processing apparatus according to claim 4 , wherein in adding the control point, a control point is added at an intersection point of a line segment joining adjacent control points, running between the edges of the printing medium, and the edge of the printing medium.
- 8 . The image processing apparatus according to claim 4 , wherein in adding the control point, a control point is added at an intersection point of a line segment joining adjacent control points, running between edges of a printable area of the printing medium, and an edge of the printable area.
- 9 . The image processing apparatus according to claim 2 , wherein the alignment using the vertices of the printing medium and the vertices of the reference image is alignment using affine transformation.
- 10 . The image processing apparatus according to claim 1 , wherein, in the non-rigid-body alignment, the control points for controlling a shape of an image are disposed in a grid-like pattern on the target image, and positions of the control points are successively updated as the target image deforms to match a position of the target image with a position of the reference image.
- 11 . The image processing apparatus according to claim 3 , wherein the one or more controllers are further configured to: display an inspection result from the inspection, wherein, in the display, the type of the defect and positional coordinates where the defect is detected according to the processing parameters are displayed.
- 12 . An image processing apparatus that inspects an image formed on a printing medium, comprising: one or more controllers including one or more processors and one or more memories, the one or more controllers being configured to: read an image for inspection formed on a printing medium and obtain a target image to be inspected; align the target image to a reference image; obtain a difference between the aligned target image and the reference image; determine whether a pixel of the target image is at or near an edge of the printing medium; and inspect for a defect in the aligned target image on a basis of the obtained difference and processing parameters, wherein, in the alignment of the target image, the one or more controllers changes methods for the alignment depending on whether the pixel of the target image is determined to be at or near the edge of the printing medium.
- 13 . The image processing apparatus according to claim 12 , wherein the one or more controllers are further configured to execute alignment using a first method in a case that the pixel of the target image exists at or near the edge of the printing medium, and execute alignment using a second method in a case that the pixel of the target image does not exist at or near the edge of the printing medium, wherein the first method includes alignment using vertices of the printing medium, and the second method includes alignment using non-rigid-body alignment.
- 14 . The image processing apparatus according to claim 12 , wherein the one or more controllers are further configured to: set the processing parameters, wherein the processing parameters include at least a type of a defect to inspect for and a threshold for determining whether or not a defect exists.
- 15 . The image processing apparatus according to claim 13 , wherein the second method includes alignment by correcting a position of a control point at or near the edge of the printing medium.
- 16 . The image processing apparatus according to claim 13 , wherein the second method includes alignment by adding a control point at or near the edge of the printing medium.
- 17 . The image processing apparatus according to claim 16 , wherein, in adding the control point, a control point is added at an intersection point of a line segment joining adjacent control points, running between the edges of the printing medium, and the edge of the printing medium.
- 18 . The image processing apparatus according to claim 16 , wherein, in adding the control point, a control point is added at an intersection point of a line segment joining adjacent control points, running between edges of a printable area of the printing medium and an edge of the printable area.
- 19 . A method of controlling an image processing apparatus that inspects an image formed on a printing medium, the method comprising: reading an image for inspection formed on a printing medium and obtaining a target image to be inspected; correcting a position of a control point in the target image, from among control points disposed on the target image, at or near the edge of the printing medium, and performing alignment using the corrected control point so as to align the target image to a reference image using non-rigid body alignment; and inspecting for a defect in the target image on a basis of the aligned target image and the reference image after the alignment, wherein a position of a control point at or near the edge of the printing medium is corrected on a basis of an interval between adjacent control points in the target image, at or near the edge of the printing medium.
- 20 . A method of controlling an image processing apparatus that inspects an image formed on a printing medium, the method comprising: reading an image for inspection formed on a printing medium and obtaining a target image to be inspected; aligning the target image to a reference image; obtaining a difference between the aligned target image and the reference image after the alignment; determining whether a pixel of the target image exists at or near an edge of the printing medium; and inspecting for a defect in the target image on a basis of the difference obtained and processing parameters, wherein, in the aligning, a method for the alignment is changed depending on whether the pixel of the target image is determined to exist at or near the edge of the printing medium.
Description
BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to an image processing apparatus, a method of controlling the same, and a storage medium. Description of the Related Art Inspection systems that automatically perform inspections are known. An inspection system that automatically performs inspection uses a method of inspecting for defects in a printed image that includes reading an image of a printed matter using a scanner and comparing image data of the read image with a reference image. When inspecting an image by comparing images in this manner, the alignment of the images greatly affects the inspection accuracy. Thus, it is important to accurately align the images for such image inspection. A typical alignment method includes extracting feature points of the images and performing alignment using a rigid registration such as projective transformation. For example, in Japanese Patent Laid-Open No. 2020-118497, feature points of a printed image at a leading edge and a trailing edge of a printed matter in a conveyance direction are extracted and alignment is performed using a rigid-body transformation. However, alignment using the rigid-body transformation cannot compensate for localized misalignment caused by conveying unevenness or paper stretching. An example of a more accurate alignment method is the known method of non-rigid registration or Free-Form Deformations (FFD). By using such the non-rigid registration method, alignment of images including localized scaling and misalignment can be performed. Thus, compared to alignment using the rigid-body transformation, the alignment can be more accurate. With Free-Form Deformations, control points for controlling the shape of an image are disposed in a grid-like pattern on the image, and the image is deformed by individually moving the control points. Then, to obtain the layout of the control points for performing deformation so that the image data to be inspected is aligned with the reference image, errors in the image are calculated and the positions of the control points are successively updated in a direction so that an amount of the error is reduced. Generally, it is known that accuracy of alignment is reduced at or near the edges of a sheet. The cause of this is considered to be not in the print data but due to the print position relative to the sheet in the printing apparatus being misaligned. When the print position relative to the sheet is misaligned due to the effects of print position misalignment, the accuracy of the alignment particularly at or near the edges of the sheet may be reduced and a print defect may be mistakenly detected at or near the edges of the sheet. SUMMARY OF THE INVENTION Embodiments of the present disclosure eliminate the above-mentioned issues with conventional technology. A feature of the present invention is to provide a technique that can reduce erroneous detection at or near an edge of a printing medium when print position misalignment occurs when inspecting an image using non-rigid-body alignment. According to a first aspect of embodiments of the present disclosure, there is provided an image processing apparatus that inspects an image formed on a printing medium by a printing apparatus, comprising: one or more controllers including one or more processors and one or more memories, the one or more controllers being configured to: read an image for inspection formed on a printing medium and obtain a target image to be inspected; correct a position of a control point, from among control points disposed on the target image, at or near an edge of the printing medium, and perform alignment using the corrected control point so as to align the target image to a reference image using a non-rigid-body alignment; and inspect for a defect in the target image on a basis of the aligned target image and the reference image after the alignment; wherein, in the correcting, the position of the control point at or near the edge of the printing medium is corrected on a basis of an interval between adjacent control points at or near the edge of the printing medium. According to a second aspect of embodiments of the present disclosure, there is provided an image processing apparatus that inspects an image formed on a printing medium, comprising: one or more controllers including one or more processors and one or more memories, the one or more controllers being configured to: read an image for inspection formed on a printing medium and obtain a target image to be inspected; align the target image to a reference image; obtain a difference between the aligned target image and the reference image; determine whether a pixel of the target image is at or near an edge of the printing medium; and inspect for a defect in the aligned target image on a basis of the obtained difference and processing parameters, wherein, in the alignment of the target image, the one or more controllers changes methods for the alignment depen