Inspection apparatus that extracts a predetermined area, inspection method, and storage medium
From one of an inspection image of a printed material and a reference image, a predetermined area including an edge is extracted and a pixel value of a pixel is corrected, which configures the predetermined area in the inspection image or the reference image, from which the predetermined area has been extracted, and a blot on the printed material is detected by using collation results of the corrected inspection image and the reference image and a threshold value, or by using collation results of the inspection image and the corrected reference image and the threshold value.
1 . An inspection apparatus that inspects a printed material, comprising:
one or more processors connected to one or more memories, the one or more processors being configured to:
extract a predetermined area including an edge from one of an inspection image obtained by reading the printed material and a reference image that is taken as a reference in the inspection;
perform a first correction to correct a pixel value of a pixel configuring the predetermined area in the inspection image or the reference image, from which the predetermined area has been extracted by the extracting; and
detect a blot on the printed material by using collation results of collating the inspection image and the reference image and a threshold value for detecting a blot on the printed material, wherein
the detecting detects:
the blot on the printed material by using collation results of collating the reference image in which the pixel value of the pixel in the predetermined area is corrected and the inspection image as the collation results in a case where the pixel value of the pixel in the predetermined area is corrected in the reference image by the first correction.
2 . The inspection apparatus according to claim 1 , wherein:
the first correction includes correcting the pixel value of the pixel in the predetermined area by performing at least one of smoothing processing using a filter and noise appending processing to append noise.
3 . The inspection apparatus according to claim 1 , the one or more processors being configured to:
determine a correction amount in a case where the pixel value of the pixel in the predetermined area is corrected by the first correction, wherein
the determining determines the correction amount by analyzing a chart image obtained by reading a chart including a dark color patch, which is output by a printing apparatus that performs printing of the printed material and
the first correction includes correcting the pixel value of the pixel in the predetermined area based on the determined correction amount.
4 . The inspection apparatus according to claim 3 , the one or more processors being configured to:
determine the correction amount from an average value of pixel values in an area corresponding to the dark color patch in the chart image and an average value of pixel values in an area corresponding to a portion other than the dark color patch in the chart image, wherein
the first correction includes correcting the pixel value of the pixel in the predetermined area by performing smoothing processing using a filter corresponding to the determined correction amount.
5 . The inspection apparatus according to claim 3 , the one or more processors being configured to:
determine the correction amount from a pixel value of a reference image of the chart and a pixel value of the chart image, wherein
the first correction includes correcting the pixel value of the pixel in the predetermined area by performing noise appending processing to append noise corresponding to the determined correction amount.
6 . The inspection apparatus according to claim 5 , wherein:
the first correction includes correcting the pixel value of the pixel in the predetermined area by performing the noise appending processing to add the noise corresponding to the determined correction amount in a case where the pixel value of the chart image is higher than the pixel value of the reference image of the chart.
7 . The inspection apparatus according to claim 5 , wherein:
the first correction includes correcting the pixel value of the pixel in the predetermined area by performing the noise appending processing to subtract the noise corresponding to the determined correction amount in a case where the pixel value of the chart image is lower than the pixel value of the reference image of the chart.
8 . The inspection apparatus according to claim 3 , the one or more processors being configured to:
determine a first correction amount from an average value of pixel values of pixels in an area corresponding to the dark color patch in the chart image and an average value of pixel values of pixels in an area corresponding to a portion other than the dark color patch in the chart image;
determine a second correction amount from a pixel value of a reference image of the chart and a pixel value of the chart image,
wherein the first correction includes:
correcting the pixel value of the pixel in the predetermined area by performing smoothing processing using a filter corresponding to the determined first correction amount; and
correcting the pixel value of the pixel in the predetermined area by performing noise appending processing to append noise corresponding to the determined second correction amount.
9 . The inspection apparatus according to claim 1 , the one or more processors being configured to:
convert resolutions of the reference image and the inspection image into a predetermined resolution;
perform color space conversion for the reference image and the inspection image whose resolutions have been converted;
extract the predetermined area including the edge from one of the reference image and the inspection image for which color space conversion has been performed and
detect a blot on the printed material by using collation results of collating the inspection image and the reference image by using a vicinity search method and the threshold value.
10 . The inspection apparatus according to claim 1 , the one or more processors being configured to:
perform a second correction so that there is not a difference in the pixel value between the inspection image and the reference image for an entire area or an area other than the predetermined area of one of the inspection image and the reference image.
11 . The inspection apparatus according to claim 10 , wherein
the second correction is performed before the first correction.
12 . The inspection apparatus according to claim 10 , wherein
the second correction includes performing at least one piece of correction processing of smoothing processing using a filter and noise appending processing to append noise.
13 . The inspection apparatus according to claim 1 , wherein
the detecting detects a streak on the printed material by using the threshold value, wherein the threshold value comprises a threshold for detecting a streak on the printed material.
14 . The inspection apparatus according to claim 1 , wherein
the detecting detects a spot-shaped defect on the printed material by using the threshold value, wherein the threshold value comprises a threshold for detecting a spot-shaped defect on the printed material.
15 . An inspection method of inspecting a printed material, the inspection method comprising:
an extraction step of extracting a predetermined area including an edge from one of an inspection image obtained by reading the printed material and a reference image that is taken as a reference in the inspection;
a first correction step of correcting a pixel value of a pixel configuring the predetermined area in the inspection image or the reference image, from which the predetermined area has been extracted at the extraction step; and
a detection step of detecting a blot on the printed material by using collation results of collating the inspection image and the reference image and a threshold value for detecting a blot on the printed material, wherein
at the detection step:
the blot on the printed material is detected by using collation results of collating the reference image in which the pixel value of the pixel in the predetermined area is corrected and the inspection image as the collation results in a case where the pixel value of the pixel in the predetermined area is corrected in the reference image at the first correction step.
16 . A non-transitory computer readable storage medium storing a program for causing a computer to execute an inspection method of inspecting a printed material, the inspection method comprising:
an extraction step of extracting a predetermined area including an edge from one of an inspection image obtained by reading the printed material and a reference image that is taken as a reference in the inspection;
a first correction step of correcting a pixel value of a pixel configuring the predetermined area in the inspection image or the reference image, from which the predetermined area has been extracted at the extraction step; and
a detection step of detecting a blot on the printed material by using collation results of collating the inspection image and the reference image and a threshold value for detecting a blot on the printed material, wherein
at the detection step:
the blot on the printed material is detected by using collation results of collating the reference image in which the pixel value of the pixel in the predetermined area is corrected and the inspection image as the collation results in a case where the pixel value of the pixel in the predetermined area is corrected in the reference image at the first correction step.