JP6665903B2 - Feature image generation device, inspection device, feature image generation method, and feature image generation program - Google Patents

Feature image generation device, inspection device, feature image generation method, and feature image generation program Download PDF

Info

Publication number
JP6665903B2
JP6665903B2 JP2018158436A JP2018158436A JP6665903B2 JP 6665903 B2 JP6665903 B2 JP 6665903B2 JP 2018158436 A JP2018158436 A JP 2018158436A JP 2018158436 A JP2018158436 A JP 2018158436A JP 6665903 B2 JP6665903 B2 JP 6665903B2
Authority
JP
Japan
Prior art keywords
image
gradation
binarized
template
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018158436A
Other languages
Japanese (ja)
Other versions
JP2019067373A (en
Inventor
秀人 松井
秀人 松井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Publication of JP2019067373A publication Critical patent/JP2019067373A/en
Application granted granted Critical
Publication of JP6665903B2 publication Critical patent/JP6665903B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、基準となる対象物を撮像した基準画像と、比較対象物を撮像した比較画像を比較する際の両画像の位置合わせを行うための技術に関する。   The present invention relates to a technique for aligning a reference image obtained by capturing an object serving as a reference and a comparison image obtained by capturing a comparison object, when comparing the two images.

従来、印刷機で印刷された印刷物について、色調の良否、汚れの有無、抜けの有無等の検査を印刷機上で自動的に行う方法として、カメラで印刷物を撮像して得た被検査画像と、一定の基準を満たした基準画像を比較する方法がある。   Conventionally, as for a method of automatically inspecting a printed matter printed by a printing machine on a printing machine for color tone quality, presence or absence of dirt, presence or absence of omission, an inspection image obtained by imaging the printed matter with a camera, There is a method of comparing reference images satisfying a certain reference.

このような検査方法では、基準画像と被検査画像を比較する際に、正確な位置合わせを行う必要がある。例えば、輪転印刷ではロール紙などの連続シートに印刷が行われるが、印刷後の連続シートを搬送中に撮像して被検査画像を得る場合、連続シートは搬送方向に収縮したり幅方向に蛇行したりするため比較検査前に位置合わせを行うが必要となる。また、枚葉印刷では枚葉紙などのカットシートに印刷が行われるが、カットシートを印刷後に撮像して被検査画像を得る場合、カットシートは縦方向、横方向、回転方向に不規則にズレるため位置合わせが必要となる。   In such an inspection method, it is necessary to perform accurate alignment when comparing the reference image and the image to be inspected. For example, in rotary printing, printing is performed on a continuous sheet such as roll paper, but when an image to be inspected is obtained by imaging the printed continuous sheet during transport, the continuous sheet contracts in the transport direction or meanders in the width direction. It is necessary to perform positioning before the comparative inspection. Also, in sheet printing, printing is performed on a cut sheet such as a sheet, but when the cut sheet is printed and imaged to obtain an image to be inspected, the cut sheet is irregularly arranged in the vertical, horizontal, and rotational directions. Positioning is required for displacement.

特許文献1−3には、基準画像と比較できるように被検査画像の位置合わせ(位置補正という場合がある)を行う技術が開示されている。これらは、被検査画像及び基準画像を複数のブロックに細分化し、ブロック毎に画像のズレ量を算出し、全体的な位置補正を行う技術である。また、ブロック毎に特徴的な図柄(特徴部)を含む画像を切り出して特徴画像を生成して、被検査画像及び基準画像とでマッチングを行い特徴部がどれだけズレているかによって位置補正を行うことも知られている。   Patent Literatures 1 to 3 disclose techniques for performing position adjustment (sometimes referred to as position correction) of an image to be inspected so that the image can be compared with a reference image. These are techniques for subdividing an image to be inspected and a reference image into a plurality of blocks, calculating an image shift amount for each block, and performing overall position correction. Further, an image including a characteristic pattern (characteristic portion) is cut out for each block to generate a characteristic image, matching is performed between the image to be inspected and the reference image, and position correction is performed based on how much the characteristic portion is shifted. It is also known.

特許第3916596号公報Japanese Patent No. 3916596 特許第4163199号公報Japanese Patent No. 4163199 特許第5061543号公報Japanese Patent No. 5061543

一方で、カメラ等の技術進歩により高解像度の画像を用いて、より精密に印刷物検査が行えるようになってきている。しかしながら、特許文献1−3の技術は低解像度の画像に適した技術であり高解像度の画像については充分に位置補正ができない場合がある。また、特徴部を用いて位置補正する方法についても、高解像度画像ではブロック内で、位置補正に適当な特徴部を選択することができないという問題がある。これは、高解像度化により、細分化されたブロックにおいて図柄が相対的に大きくなって抽象的になることや、ブロックサイズが小さくなって図柄のないブロックが多数存在してしまうことが原因として考えられる。   On the other hand, technical advances in cameras and the like have made it possible to more precisely inspect printed matter using high-resolution images. However, the techniques disclosed in Patent Literatures 1-3 are suitable for low-resolution images, and may not be sufficiently corrected for high-resolution images. Also, the method of performing position correction using a characteristic portion has a problem that a high-resolution image cannot select a characteristic portion suitable for position correction within a block. This is thought to be due to the fact that the design becomes relatively large and abstract in the subdivided blocks due to the increase in resolution, and there are many blocks without designs due to the small block size. Can be

本発明は、このような問題に鑑みて為されたもので、その課題の一例は、高解像度の基準画像と比較画像の位置合わせを行うためのマッチングに用いる特徴画像を基準画像から適切に生成することができる特徴画像生成装置等を提供することを課題とする。   The present invention has been made in view of such a problem, and one example of the problem is to appropriately generate a feature image used for matching for aligning a high-resolution reference image and a comparative image from the reference image. It is an object of the present invention to provide a characteristic image generation device or the like that can perform the above-mentioned operations.

上記課題を解決するために、請求項1に記載の発明は、基準画像からエッジを抽出したエッジ画像を生成するエッジ抽出部と、前記エッジ画像を第1の階調で二値化した第1二値化画像と、前記エッジ画像を前記第1の階調よりも低い第2の階調で二値化した第2二値化画像と、前記エッジ画像を前記第1の階調と前記第2の階調の間の第3の階調で二値化した第3二値化画像と、を生成する二値化部と、前記第1二値化画像における水平の直線と垂直の直線の交点座標を取得する交点取得部と、前記第1二値化画像及び前記第2二値化画像から前記交点座標を含む画像を切り出して、それぞれ第1切り出し画像及び第2切り出し画像を生成する切り出し画像生成部と、前記第1切り出し画像と第2切り出し画像の差分画素数が所定の条件を満たす場合に、前記第3二値化画像から前記交点座標を含む画像を切り出した特徴画像を生成する特徴画像生成部と、を備えることを特徴とする。   In order to solve the above-mentioned problem, the invention according to claim 1 includes an edge extraction unit that generates an edge image by extracting an edge from a reference image, and a first image that binarizes the edge image with a first gradation. A binarized image, a second binarized image obtained by binarizing the edge image with a second gradation lower than the first gradation, and the edge image with the first gradation and the second gradation. A third binarized image binarized at a third gray level between two gray levels, and a binarization unit that generates a third binarized image, and a horizontal straight line and a vertical straight line in the first binary image. An intersection acquisition unit that acquires intersection coordinates; and an extraction unit that extracts an image including the intersection coordinates from the first binarized image and the second binarized image and generates a first cutout image and a second cutout image, respectively. An image generation unit, wherein a difference pixel number between the first cutout image and the second cutout image is a predetermined condition. If the plus, characterized in that it and a feature image generation unit for generating feature images cut out an image including the intersection coordinates from said third binary image.

請求項2に記載の発明は、請求項1に記載の特徴画像生成装置であって、前記第1二値化画像から水平の直線を抽出した第1水平画像と、前記第1二値化画像から垂直の直線を抽出した第1垂直画像を合成し、第1合成画像を生成する第1合成部と、前記第2二値化画像から水平の直線を抽出した第2水平画像と、前記第2二値化画像から垂直の直線を抽出した第2垂直画像を合成し、第2合成画像を生成する第2合成部と、を更に備え、前記交点取得部は、前記第1二値化画像から生成された前記第1合成画像に基づいて、前記交点座標を取得し、前記切り出し画像生成部は、前記第1二値化画像から生成された前記第1合成画像及び前記第2二値化画像から生成された前記第2合成画像から、それぞれ前記第1切り出し画像及び前記第2切り出し画像を生成することを特徴とする。   The invention according to claim 2 is the feature image generation device according to claim 1, wherein a first horizontal image obtained by extracting a horizontal straight line from the first binary image, and the first binary image. A first vertical image extracting a vertical straight line from the first vertical image, and a first synthesizing unit for generating a first synthesized image; a second horizontal image extracting a horizontal straight line from the second binarized image; A second synthesizing unit for synthesizing a second vertical image obtained by extracting a vertical straight line from the binarized image to generate a second synthesized image; Acquiring the intersection coordinates based on the first synthesized image generated from the first synthesized image and the first synthesized image and the second binarized image generated from the first binarized image. From the second composite image generated from the image, the first cutout image and the second And generating an image Eject and.

請求項3に記載の発明は、請求項2に記載の特徴画像生成装置であって、前記第1合成部は、前記第1二値化画像から水平の直線を抽出し、水平方向に拡大させた前記第1水平画像と、前記第1二値化画像から垂直の直線を抽出し、垂直方向に拡大させた前記第1垂直画像を合成し、前記第1合成画像を生成し、前記第2合成部は、前記第2二値化画像から水平の直線を抽出し、水平方向に拡大させた前記第2水平画像と、前記第2二値化画像から垂直の直線を抽出し、垂直方向に拡大させた前記第2垂直画像を合成し、前記第2合成画像を生成することを特徴とする。   The invention according to claim 3 is the feature image generation device according to claim 2, wherein the first synthesizing unit extracts a horizontal straight line from the first binarized image and enlarges the horizontal straight line. Extracting a vertical straight line from the first horizontal image and the first binarized image, combining the first vertical image enlarged in the vertical direction, generating the first combined image, The combining unit extracts a horizontal straight line from the second binarized image, extracts the second horizontal image enlarged in the horizontal direction, and a vertical straight line from the second binarized image, and extracts a vertical straight line from the second binary image. The enlarged second vertical image is combined to generate the second combined image.

請求項4に記載の発明は、請求項1乃至3の何れか一項に記載の特徴画像生成装置であって、前記基準画像を複数のブロックに分割する分割部を更に備え、前記特徴画像生成部は、前記差分画素数が前記所定の条件を満たす前記第1切り出し画像及び第2切り出し画像を切り出した際の前記交点座標を含む前記ブロックについて前記特徴画像を生成することを特徴とする。 The invention according to claim 4 is the feature image generation device according to any one of claims 1 to 3, further comprising a division unit configured to divide the reference image into a plurality of blocks, The unit generates the feature image for the block including the intersection coordinates when the first cutout image and the second cutout image in which the difference pixel number satisfies the predetermined condition .

請求項5に記載の発明は、請求項4に記載の特徴画像生成装置であって、前記基準画像が連続シートを長手方向に沿って搬送している際に当該連続シートの一部を撮影した画像である場合に、一の前記ブロックに対して一つの特徴画像を生成することを特徴とする。   The invention according to claim 5 is the feature image generating apparatus according to claim 4, wherein the reference image captures a part of the continuous sheet when the continuous sheet is conveyed in the longitudinal direction. When the image is an image, one feature image is generated for one block.

請求項6に記載の発明は、請求項4に記載の特徴画像生成装置であって、前記基準画像が連続シートを枚葉単位に切断したカットシートを撮影した画像である場合に、一の前記ブロックに対して二つの特徴画像を生成することを特徴とする。   The invention according to claim 6 is the feature image generation device according to claim 4, wherein the reference image is an image obtained by photographing a cut sheet obtained by cutting a continuous sheet into sheet units. It is characterized in that two feature images are generated for a block.

請求項7に記載の発明は、請求項1乃至6の何れか一項に記載の特徴画像生成装置であって、前記第3二値化画像における前記交点座標を基準とする検証領域内を、前記特徴画像を移動させつつ第3二値化画像と比較し、前記交点座標以外で一致する場合に、当該特徴画像を不適切な特徴画像と判定する判定部を更に備えることを特徴とする。   The invention according to claim 7 is the feature image generation device according to any one of claims 1 to 6, wherein a verification area based on the intersection coordinates in the third binary image is The image processing apparatus further includes a determination unit that compares the feature image with the third binarized image while moving the feature image, and determines that the feature image is an inappropriate feature image when the feature image matches other than the intersection coordinates.

請求項8に記載の発明は、請求項1乃至7の何れか一項に記載の特徴画像生成装置が作成した前記特徴画像を用いて被検査画像の位置補正を行い、前記基準画像と当該被検査画像の比較検査を行う検査装置であって、前記被検査画像における前記特徴画像に対応する座標を特定し、前記交点取得部が取得した前記交点座標との差であるズレ量を算出するズレ量算出部と、前記ズレ量に基づいて前記被検査画像の位置補正を行う位置補正部と、前記位置補正が行われた前記被検査画像と前記基準画像とを比較する比較部と、を備えることを特徴とする。   According to an eighth aspect of the present invention, a position of an image to be inspected is corrected using the characteristic image created by the characteristic image generating apparatus according to any one of the first to seventh aspects, and the reference image and the image to be inspected are corrected. An inspection apparatus for performing a comparative inspection of an inspection image, comprising: identifying coordinates corresponding to the characteristic image in the image to be inspected; and calculating a shift amount that is a difference from the intersection coordinates acquired by the intersection acquisition unit. An amount calculator, a position corrector that corrects the position of the inspected image based on the deviation amount, and a comparator that compares the inspected image subjected to the position correction and the reference image. It is characterized by the following.

請求項9に記載の発明は、基準画像からエッジを抽出したエッジ画像を生成するエッジ抽出工程と、前記エッジ画像を第1の階調で二値化した第1二値化画像と、前記エッジ画像を前記第1の階調よりも低い第2の階調で二値化した第2二値化画像と、前記エッジ画像を前記第1の階調と前記第2の階調の間の第3の階調で二値化した第3二値化画像と、を生成する二値化工程と、前記第1二値化画像における水平の直線と垂直の直線の交点座標を取得する交点取得工程と、前記第1二値化画像及び前記第2二値化画像から前記交点座標を含む画像を切り出して、それぞれ第1切り出し画像及び第2切り出し画像を生成する切り出し画像生成工程と、前記第1切り出し画像と第2切り出し画像の差分画素数が所定の条件を満たす場合に、前記第3二値化画像から前記交点座標を含む画像を切り出した特徴画像を生成する特徴画像生成工程と、を含むことを特徴とする。   The invention according to claim 9, wherein an edge extraction step of generating an edge image by extracting an edge from a reference image; a first binarized image obtained by binarizing the edge image with a first gradation; A second binarized image obtained by binarizing the image at a second gradation lower than the first gradation, and a second binarized image obtained by converting the edge image between the first gradation and the second gradation. A binarizing step of generating a third binarized image binarized by three gradations, and an intersection obtaining step of obtaining intersection coordinates of a horizontal straight line and a vertical straight line in the first binary image A cutout image generating step of cutting out an image including the intersection coordinates from the first binarized image and the second binarized image to generate a first cutout image and a second cutout image, respectively; When the difference pixel number between the cutout image and the second cutout image satisfies a predetermined condition, And wherein the image generating step from the 3 binary image to generate a feature image cut out an image including the intersection coordinates, characterized in that it comprises a.

請求項10に記載の発明は、コンピュータを、基準画像からエッジを抽出したエッジ画像を生成するエッジ抽出部、前記エッジ画像を第1の階調で二値化した第1二値化画像と、前記エッジ画像を前記第1の階調よりも低い第2の階調で二値化した第2二値化画像と、前記エッジ画像を前記第1の階調と前記第2の階調の間の第3の階調で二値化した第3二値化画像と、を生成する二値化部、前記第1二値化画像における水平の直線と垂直の直線の交点座標を取得する交点取得部、前記第1二値化画像及び前記第2二値化画像から前記交点座標を含む画像を切り出して、それぞれ第1切り出し画像及び第2切り出し画像を生成する切り出し画像生成部、前記第1切り出し画像と第2切り出し画像の差分画素数が所定の条件を満たす場合に、前記第3二値化画像から前記交点座標を含む画像を切り出した特徴画像を生成する特徴画像生成部、として機能させることを特徴とする。   The invention according to claim 10 is a computer, comprising: an edge extraction unit that generates an edge image obtained by extracting an edge from a reference image; a first binarized image obtained by binarizing the edge image with a first gradation; A second binarized image obtained by binarizing the edge image with a second gradation lower than the first gradation, and converting the edge image between the first gradation and the second gradation. A third binarized image binarized at the third gradation, and an intersection acquisition unit for acquiring intersection coordinates of a horizontal straight line and a vertical straight line in the first binary image. A cutout image generation unit that cuts out an image including the intersection coordinates from the first binarized image and the second binarized image to generate a first cutout image and a second cutout image, respectively, and the first cutout When the difference pixel number between the image and the second cut image satisfies a predetermined condition, Feature image generation unit for generating feature images cut out an image including the intersection coordinates from the third binarized image, characterized in that to function as a.

本発明によれば、基準画像からエッジを抽出したエッジ画像を、第1の階調で二値化した画像から得られた第1切り出し画像と、エッジ画像を第2の階調で二値化した画像から得られた第2切り出し画像の差が所定の条件を満たしている場合に、エッジ画像を第3の階調で二値化した画像から同じ位置を切り出して特徴画像とすることから、基準画像と比較する画像のエッジ画像における階調が第1の階調と第2の階調の間であれば、基準画像と比較画像の位置合わせを行うことができる。すなわち、高解像度の基準画像と比較画像の位置合わせを行うためのマッチングに用いる特徴画像を基準画像から適切に生成することができる。   According to the present invention, a first clipped image obtained from an image obtained by binarizing an edge image obtained by extracting an edge from a reference image with a first gradation and an edge image is binarized by a second gradation When the difference between the second cut-out images obtained from the obtained images satisfies a predetermined condition, the same position is cut out from the image obtained by binarizing the edge image with the third gradation to obtain a feature image. If the gradation in the edge image of the image to be compared with the reference image is between the first gradation and the second gradation, the alignment of the reference image and the comparison image can be performed. That is, a feature image used for matching for aligning the high-resolution reference image and the comparative image can be appropriately generated from the reference image.

第1実施形態における印刷機Sの一例を示す図である。FIG. 2 is a diagram illustrating an example of a printing machine S according to the first embodiment. 第1実施形態における検査装置Tの構成の一例を示すブロック図である。It is a block diagram showing an example of composition of inspection device T in a 1st embodiment. 第1実施形態における検査装置Tによる連続シート用テンプレート画像作成処理の一例を示すフローチャートである。6 is a flowchart illustrating an example of a continuous sheet template image creation process performed by the inspection device T according to the first embodiment. 第1実施形態における基準画像200を複数ブロックに分割した一例を示す図である。FIG. 3 is a diagram illustrating an example in which a reference image 200 according to the first embodiment is divided into a plurality of blocks. R成分画像のA画像の例である。It is an example of the A image of the R component image. G成分画像のA画像の例である。It is an example of the A image of the G component image. B成分画像のA画像の例である。It is an example of the A image of the B component image. (A)はR成分画像のB画像の例であり、(B)はG成分画像のB画像の例であり、(C)はB成分画像のB画像の例であり、(D)はRGB成分画像のB画像の例である。(A) is an example of a B image of an R component image, (B) is an example of a B image of a G component image, (C) is an example of a B image of a B component image, and (D) is an RGB image. It is an example of a B image of a component image. (A)はR成分画像のC画像の例であり、(B)はG成分画像のC画像の例であり、(C)はB成分画像のC画像の例であり、(D)はRGB成分画像のC画像の例である。(A) is an example of a C image of an R component image, (B) is an example of a C image of a G component image, (C) is an example of a C image of a B component image, and (D) is an RGB image. It is an example of a C image of a component image. (A)はC1画像の例であり、(B)はC2画像の例であり、(C)はC1画像とC2画像を合成した画像の例である。(A) is an example of a C1 image, (B) is an example of a C2 image, and (C) is an example of an image obtained by combining a C1 image and a C2 image. (A)はB1画像の例であり、(B)はB2画像の例であり、(C)はB1画像とB2画像を合成した画像の例である。(A) is an example of a B1 image, (B) is an example of a B2 image, and (C) is an example of an image obtained by combining a B1 image and a B2 image. (A)はC3画像の例であり、(B)はB3画像の例であり、(C)はC’画像の例であり、(D)はB’画像の例である。(A) is an example of a C3 image, (B) is an example of a B3 image, (C) is an example of a C 'image, and (D) is an example of a B' image. D画像の例である。It is an example of a D image. 第1実施形態における検査装置Tによる連続シート検査処理の一例を示すフローチャートである。5 is a flowchart illustrating an example of a continuous sheet inspection process performed by the inspection device T according to the first embodiment. 第1実施形態における検査装置Tによる連続シート・ズレ量算出処理の一例を示すフローチャートである。6 is a flowchart illustrating an example of a continuous sheet shift amount calculation process performed by the inspection device T according to the first embodiment. 第1実施形態における検査装置Tによる連続シート・テンプレート有りブロック処理の一例を示すフローチャートである。5 is a flowchart illustrating an example of a continuous sheet template presence block process performed by the inspection apparatus T according to the first embodiment. 第2実施形態における検査装置Tによる枚葉紙用テンプレート画像作成処理の一例を示すフローチャートである。It is a flow chart which shows an example of sheet template image creation processing by inspection device T in a 2nd embodiment. 第2実施形態における検査装置Tによる枚葉紙検査処理の一例を示すフローチャートである。It is a flow chart which shows an example of sheet inspection processing by inspection equipment T in a 2nd embodiment. 第2実施形態における検査装置Tによる枚葉紙・ズレ量算出処理の一例を示すフローチャートである。It is a flow chart which shows an example of sheet and gap amount calculation processing by inspection device T in a 2nd embodiment. 第2実施形態における検査装置Tによる枚葉紙・テンプレート有りブロック処理の一例を示すフローチャートである。It is a flowchart which shows an example of the sheet | seat / template presence block process by the inspection apparatus T in 2nd Embodiment.

[1.第1実施形態]
以下、図面を参照して本発明の第1実施形態について説明する。なお、以下に説明する実施の形態は、オフセット輪転印刷機に設置された検査装置に対して本発明を適用した場合の実施形態である。
[1. First Embodiment]
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. The embodiment described below is an embodiment in which the present invention is applied to an inspection device installed in an offset rotary printing press.

[1.1.オフセット輪転印刷機及び検査装置の構成]
図1及び図2を用いて本実施形態におけるオフセット輪転印刷機S(以下、「印刷機S」という)及び検査装置Tの構成について説明する。
[1.1. Configuration of offset rotary printing press and inspection device]
The configuration of the offset rotary printing press S (hereinafter, referred to as “printing press S”) and the inspection device T according to the present embodiment will be described with reference to FIGS. 1 and 2.

[1.1.1.印刷機Sの構成]
まず、図1を用いて印刷機Sの構成について説明する。印刷機Sは、多色刷りの印刷機であり、インキ色(C(シアン)、M(マゼンタ)、Y(イエロー)、K(ブラック))毎に、印刷ユニットU1−U4が設けられている。印刷機Sは両面印刷機のため、各印刷ユニットU1−U4は、紙の搬送経路を挟むようにブランケット胴(上胴、下胴)が備えられ、各ブランケット胴に対して版胴(上胴、下胴)及びインキ供給装置(上胴側、下胴側)が設けられている。版胴には1シート分の絵柄の版が形成されており、ブランケット胴には2シート分の絵柄のインキが乗るようになっており、版胴が2回転するとき、ブランケット胴は1回転する(いわゆる「倍胴型のブランケット胴」)。つまり、ブランケット胴が1回転する間に2カットシート分の絵柄が印刷される。なお、本実施形態では被印刷物が帯状のロール紙(「連続シート」の一例)である場合について説明するが、ロール紙以外の連続シートについても適用できる。連続シートの素材は印刷が可能なものであれば、布やビニール等であってもよい。また、連続シートを枚葉単位で切断したもの(例えば枚葉紙)をカットシートという。
[1.1.1. Configuration of Printing Machine S]
First, the configuration of the printing machine S will be described with reference to FIG. The printing machine S is a multi-color printing machine, and is provided with printing units U1 to U4 for each ink color (C (cyan), M (magenta), Y (yellow), and K (black)). Since the printing machine S is a two-sided printing machine, each printing unit U1-U4 is provided with a blanket cylinder (upper cylinder, lower cylinder) so as to sandwich the paper transport path, and a plate cylinder (upper cylinder) is provided for each blanket cylinder. , Lower drum) and an ink supply device (upper drum side, lower drum side). The plate cylinder is provided with a plate of a picture for one sheet, and the blanket cylinder is provided with ink for a picture of two sheets. When the plate cylinder makes two rotations, the blanket cylinder makes one rotation. (So-called "double-blanket blanket cylinder"). That is, a picture for two cut sheets is printed while the blanket cylinder makes one rotation. Note that, in the present embodiment, a case is described in which the print target is a band-shaped roll paper (an example of a “continuous sheet”), but the present invention is also applicable to a continuous sheet other than the roll paper. The material of the continuous sheet may be cloth or vinyl as long as it can be printed. A sheet obtained by cutting a continuous sheet (for example, sheet) is referred to as a cut sheet.

印刷ユニットU1−U4の下流には乾燥機U5が設けられている。また、乾燥機U5の下流には被印刷物であるロール紙に印刷された絵柄(記号、図形、写真、模様等)を含む検査対象領域(絵柄を構成する画線部及び非画線部を含む。例えば、新聞の紙面1ページ)を撮像するために、表面カメラ31A及び表面照明32Aと、裏面カメラ31B及び裏面照明32Bとが設けられている。表面カメラ31A及び裏面カメラ31B(以下、まとめて「カメラ31」という場合がある)は、例えば、25μ秒毎に4096画素のライン画像を撮像が可能なラインセンサカメラであり、シート毎に絵柄が印刷されたロール紙を撮像して得られたカメラ信号を出力する。表面照明32A及び裏面照明32B(以下、まとめて「照明32」という場合がある)は、それぞれ、表面カメラ31A及び裏面カメラ31Bが高解像度画像を撮像するために充分な光を照射する。   A dryer U5 is provided downstream of the printing units U1-U4. In addition, downstream of the dryer U5, an inspection target area (including an image portion and a non-image portion forming a pattern) including a pattern (symbol, graphic, photograph, pattern, and the like) printed on roll paper as a printing material is included. For example, a front camera 31A and a front illumination 32A, and a back camera 31B and a rear illumination 32B are provided in order to capture an image of a newspaper page. The front camera 31A and the back camera 31B (hereinafter, may be collectively referred to as “camera 31”) are line sensor cameras that can capture a line image of 4096 pixels every 25 μsec, for example. A camera signal obtained by imaging the printed roll paper is output. The front illumination 32A and the back illumination 32B (hereinafter sometimes collectively referred to as “illumination 32”) irradiate sufficient light for the front camera 31A and the rear camera 31B to capture a high-resolution image, respectively.

カメラ31及び照明32が設置されている部分の更に下流には、絵柄が印刷されたロール紙を折り畳むための折り機U6が設けられている。   A folding machine U6 for folding roll paper on which a picture is printed is provided further downstream of the portion where the camera 31 and the lighting 32 are installed.

[1.1.2.検査装置Tの構成]
次に、図2を用いて検査装置Tの構成について説明する。検査装置Tは、システムコントローラ11、パイプライン画像処理部12、並列画像処理部13、表カメラ分岐ボード14、裏カメラ分岐ボード15、エンコーダ分岐ボード16、HUB17、カメラ31、照明32及びエンコーダ33を含んで構成されている。また、検査装置Tは、検査サーバ20、製版サーバSV及びオフセット印刷機Sと接続されている。
[1.1.2. Configuration of inspection device T]
Next, the configuration of the inspection device T will be described with reference to FIG. The inspection apparatus T includes a system controller 11, a pipeline image processing unit 12, a parallel image processing unit 13, a front camera branch board 14, a back camera branch board 15, an encoder branch board 16, a HUB 17, a camera 31, a lighting 32, and an encoder 33. It is comprised including. The inspection device T is connected to the inspection server 20, the plate making server SV, and the offset printing press S.

システムコントローラ11は、印刷機Sや検査装置T内部の各部から各種信号を受け取り、検査装置Tの各部を制御するPLC(Programmable logic controller)である。   The system controller 11 is a PLC (Programmable Logic Controller) that receives various signals from the printing machine S and various parts inside the inspection device T and controls each part of the inspection device T.

パイプライン画像処理部12は、表面用と裏面用にそれぞれ2セット、合計4枚の画像処理ボード(表用画像処理ボード121A、表用画像処理ボード122A、裏用画像処理ボード121B、裏用画像処理ボード122B)を搭載している。表用画像処理ボード121Aと表用画像処理ボード122Aは交互に動作が切り替わる(裏用画像処理ボード121Bと裏用画像処理ボード122Bも同様)。各画像処理ボードは複数個の並列処理チップを搭載し、例えば、1000万×3色の画像の処理を45m秒毎に行う。表用画像処理ボード121Aと表用画像処理ボード122Aは、表カメラ分岐ボード14を介して、表面カメラ31Aからカメラ信号を受け取り、エンコーダ分岐ボード16から受け取ったパルス信号に基づいて表面について高解像度画像を生成し(具体的な生成方法については、特許3811565号公報を参照)、高解像度画像を用いて全数検査(全ての印刷物を対象とする検査)を行う。同様に、裏用画像処理ボード121Bと裏用画像処理ボード122Bも、裏カメラ分岐ボード15を介して、裏面カメラ31Bからカメラ信号を受け取り、全数検査を行う。   The pipeline image processing unit 12 includes four sets of image processing boards (a front image processing board 121A, a front image processing board 122A, a back image processing board 121B, and a back image). The processing board 122B) is mounted. The operations of the front image processing board 121A and the front image processing board 122A are alternately switched (the same applies to the back image processing board 121B and the back image processing board 122B). Each image processing board has a plurality of parallel processing chips mounted thereon and performs, for example, processing of an image of 10 million × 3 colors every 45 msec. The front image processing board 121A and the front image processing board 122A receive a camera signal from the front camera 31A via the front camera branch board 14, and obtain a high-resolution image of the surface based on the pulse signal received from the encoder branch board 16. Is generated (refer to Japanese Patent No. 311565 for a specific generation method), and a 100% inspection (inspection for all printed materials) is performed using the high-resolution image. Similarly, the back image processing board 121B and the back image processing board 122B also receive a camera signal from the back camera 31B via the back camera branch board 15, and perform a 100% inspection.

次に、全数検査の内容について説明する。パイプライン画像処理部12は、予めオペレータが問題無しと判断した高解像度画像を基準画像として、全数検査開始後に撮像された画像(被検査画像という場合がある)に基づいて全数検査を行う。具体的には、被検査画像から基準画像を引いた差分画像や、基準画像から被検査画像を引いた差分画像を、閾値画像と比較することにより不良を検出する。   Next, the contents of the 100% inspection will be described. The pipeline image processing unit 12 performs a 100% inspection based on an image (may be referred to as an image to be inspected) captured after the start of the 100% inspection, using a high-resolution image determined in advance by the operator as having no problem as a reference image. Specifically, a defect is detected by comparing a difference image obtained by subtracting the reference image from the inspection image or a difference image obtained by subtracting the inspection image from the reference image with the threshold image.

パイプライン画像処理部12は、被検査画像と基準画像を比較する検査を行うに当たり、比較を適切に行えるように両画像の位置合わせを行う。そのために、パイプライン画像処理部12は、画像を複数のブロックに分割し、ブロック毎に両画像のズレ量を算出するズレ量算出処理を行う。ズレ量算出処理において、パイプライン画像処理部12は、基準画像及び被検査画像をブロックに分けて、基準画像を基に当該ブロック毎に作成したテンプレート画像により、被検査画像の対応するブロック内をサーチすることにより一致する箇所を探索し、一致した座標とテンプレート画像の座標との差をズレ量として算出する。   When performing the inspection for comparing the image to be inspected with the reference image, the pipeline image processing unit 12 performs alignment of the two images so that the comparison can be appropriately performed. For this purpose, the pipeline image processing unit 12 divides an image into a plurality of blocks, and performs a shift amount calculation process of calculating a shift amount between both images for each block. In the shift amount calculation process, the pipeline image processing unit 12 divides the reference image and the image to be inspected into blocks, and uses a template image created for each of the blocks based on the reference image to divide the corresponding block of the image to be inspected. A matching part is searched for, and a difference between the matched coordinate and the coordinate of the template image is calculated as a deviation amount.

パイプライン画像処理部12は、被印刷物が連続シートである第1実施形態では、一ブロックについて一枚のテンプレート画像を作成して、一枚のテンプレート画像により被検査画像の対応するブロック内をサーチする。なお、テンプレート画像の作成処理については、フローチャートを用いて後述する。   In the first embodiment, in which the printing object is a continuous sheet, the pipeline image processing unit 12 creates one template image for one block, and searches the corresponding block of the inspection image with one template image. I do. Note that the template image creation processing will be described later using a flowchart.

パイプライン画像処理部12は、テンプレート画像の作成処理において、特徴部の少ないブロックについてはテンプレート画像を作成できない場合がある。パイプライン画像処理部12は、テンプレート画像を作成できたブロック(「テンプレート有りブロック」)については、テンプレート画像に基づいてズレ量を算出する一方、テンプレート画像を作成できなかったブロック(「テンプレート無しブロック」)については、ズレ量が決定している上下左右のブロック又は同行/同列のブロックのズレ量に基づいてズレ量を決定する。   In the template image creation process, the pipeline image processing unit 12 may not be able to create a template image for a block having a small number of characteristic portions. The pipeline image processing unit 12 calculates the shift amount based on the template image for the block in which the template image was able to be created (“block with template”), and on the other hand, the block in which the template image was not created (“block without template”). )), The shift amount is determined on the basis of the shift amount of the upper, lower, left and right blocks or the block in the same row / column in which the shift amount is determined.

また、パイプライン画像処理部12は、ブロック毎にテンプレート画像と被検査画像を比較する際には、被検査画像についてもブロック毎にテンプレート画像と同様の手法によりブロック画像を作成し、テンプレート画像により、対応するブロック画像内をサーチすることにより一致する箇所を探索する。このように同様の手法で作成した画像同士を比較することで、より正確に一致点を探索することができる。   When comparing the template image and the image to be inspected for each block, the pipeline image processing unit 12 creates a block image for the image to be inspected for each block in the same manner as the template image, and generates the block image using the template image. , The corresponding block image is searched for a matching portion. By comparing the images created by the same method as described above, a matching point can be more accurately searched.

パイプライン画像処理部12は、ブロック毎に算出したズレ量に基づいて被検査画像の位置補正を行うことにより、基準画像と被検査画像の位置合わせを行う。   The pipeline image processing unit 12 performs the position correction of the image to be inspected based on the shift amount calculated for each block, thereby aligning the reference image and the image to be inspected.

並列画像処理部13は、表面用と裏面用にそれぞれ1枚、合計2枚の画像処理ボード(表用画像処理ボード131A、裏用画像処理ボード131B)を搭載しており、パイプライン画像処理部12と並列に動作する。各画像処理ボードは複数個の並列処理チップを搭載し、例えば、1000万×3色の画像の処理を45m秒毎に行う。表用画像処理ボード131Aは、表カメラ分岐ボード14を介して、表面カメラ31Aからカメラ信号を受け取り、エンコーダ分岐ボード16から受け取ったパルス信号に基づいて表面について高解像度画像を生成し、製版データ(製版データにより表される画像)との照合検査と、倍胴間検査を行う。製版データは版胴に取り付ける刷版を生成する際の元データであり、製版データとの照合検査では、面付け、寸法、校正、版傷、ゴミ付き(版胴やブランケット胴にゴミが付いていないか)について検査を行う。   The parallel image processing unit 13 is equipped with a total of two image processing boards (a front image processing board 131A and a back image processing board 131B), one for the front side and one for the back side. 12 and operates in parallel. Each image processing board has a plurality of parallel processing chips mounted thereon and performs, for example, processing of an image of 10 million × 3 colors every 45 msec. The front image processing board 131A receives a camera signal from the front camera 31A via the front camera branch board 14, generates a high-resolution image of the front surface based on the pulse signal received from the encoder branch board 16, and generates plate making data ( A collation inspection with the image represented by the plate making data) and a double body inspection are performed. Plate making data is the original data used when creating a printing plate to be attached to a plate cylinder. In comparison inspection with plate making data, imposition, dimensions, proofreading, plate scratches, dust (with dust on the plate cylinder or blanket cylinder) Check if there is any).

一方、倍胴間検査は、ブランケット胴が一回転する際に印刷される2枚のシート(印刷物)をそれぞれ撮像した高解像度画像(すなわち、連続する高解像度画像)を比較する検査である。例えば、画像が一致しない場合には、ブランケット胴の一部に傷やゴミが付いている不良が検出される。   On the other hand, the double-body inspection is an inspection for comparing high-resolution images (that is, continuous high-resolution images) of two sheets (prints) printed when the blanket cylinder makes one rotation. For example, when the images do not match, a defect in which a part of the blanket cylinder has scratches or dust is detected.

表カメラ分岐ボード14は、表面カメラ31Aからのカメラ信号を表用画像処理ボード121A、表用画像処理ボード122A、表用画像処理ボード131Aへ同時に分岐して送る。   The front camera branch board 14 branches and sends the camera signal from the front camera 31A to the front image processing board 121A, the front image processing board 122A, and the front image processing board 131A at the same time.

裏カメラ分岐ボード15は、裏面カメラ31Bからのカメラ信号を裏用画像処理ボード121B、裏用画像処理ボード122B、表用画像処理ボード131Bへ同時に分岐して送る。   The back camera branch board 15 branches and sends the camera signal from the back camera 31B to the back image processing board 121B, the back image processing board 122B, and the front image processing board 131B at the same time.

エンコーダ分岐ボード16は、オフセット印刷機Sにおける版胴に取り付けられ、版胴に連動(版の回転と1:1で連動)するエンコーダ33から出力されるエンコーダパルス信号(A、B、Z相)を受信し、パイプライン画像処理部12、並列画像処理部13に0.05〜0.1mmのエンコーダパルス信号(A、B、Z相)を分岐して出力する。   The encoder branch board 16 is attached to the plate cylinder of the offset printing press S, and is an encoder pulse signal (A, B, Z phase) output from an encoder 33 that is interlocked with the plate cylinder (interlocked with the rotation of the plate at 1: 1). And the encoder pulse signals (A, B, Z phases) of 0.05 to 0.1 mm are branched and output to the pipeline image processing unit 12 and the parallel image processing unit 13.

HUB17は、システムコントローラ11、パイプライン画像処理部12、並列画像処理部13、検査サーバ20、製版サーバSV及び印刷機SとのLAN接続用のHUBである。   The HUB 17 is a HUB for LAN connection with the system controller 11, the pipeline image processing unit 12, the parallel image processing unit 13, the inspection server 20, the plate making server SV, and the printing machine S.

検査サーバ20は、基準画像の保存、不良検出時における不良画像の保存、検査開始時や停止時における稼働記録や検査ログデータの保存といった機能を果たす。また、検査サーバ20は必要に応じてLAN経由で検査結果を閲覧する際に用いられる。製版サーバSVは、製版データ等を記憶しており、オペレータが新たな絵柄の印刷物を印刷するために印刷機Sの設定を行うと、その設定の内容を取得して、検査装置Tによる検査に必要な情報(製版データを含む)を検査装置Tに設定する。   The inspection server 20 has a function of storing a reference image, storing a defective image when detecting a defect, and storing operation records and inspection log data when the inspection is started or stopped. The inspection server 20 is used when viewing inspection results via the LAN as needed. The plate-making server SV stores plate-making data and the like. When the operator sets the printing machine S to print a new printed material, the contents of the setting are acquired and the inspection device T performs inspection. Necessary information (including plate making data) is set in the inspection device T.

[1.2.連続シート用テンプレート画像作成処理の動作]
図3を用いて、パイプライン画像処理部12による連続シート用テンプレート画像作成処理について説明する。なお、図3は、連続シート用テンプレート画像作成処理の一例を示すフローチャートである。
[1.2. Operation of template image creation processing for continuous sheet]
The continuous sheet template image creation processing by the pipeline image processing unit 12 will be described with reference to FIG. FIG. 3 is a flowchart illustrating an example of a continuous sheet template image creation process.

まず、パイプライン画像処理部12は、オペレータが製品として問題無しと判断した印刷物を撮像した基準画像を取得する(ステップS1)。基準画像は、画素毎にRGB(Red、Green、Blue)成分を持つRGB画像であり、各成分は濃度の段階を意味する階調を示す値(例えば、256階調であれば「0〜255」の値)で示される。   First, the pipeline image processing unit 12 acquires a reference image obtained by capturing an image of a printed matter determined by the operator as a product without any problem (step S1). The reference image is an RGB image having RGB (Red, Green, Blue) components for each pixel, and each component is a value indicating a gradation indicating a density level (for example, “0 to 255 if 256 gradations”). ").

次に、パイプライン画像処理部12は、基準画像について、RGB毎に白紙部に対応する各画素の輝度(白紙部輝度)を取得する(ステップS2)。白紙部とは、インキが付着していない用紙部分のことである。   Next, for the reference image, the pipeline image processing unit 12 acquires the luminance of each pixel corresponding to the blank section (blank section luminance) for each of the RGB (step S2). The blank paper portion is a paper portion to which no ink is attached.

次に、パイプライン画像処理部12は、基準画像について、RGB毎に、白紙部輝度が目標白紙部輝度になるように補正係数を算出し、各画素を補正する(ステップS3)。目標白紙部輝度は、例えば、予めオペレータ等によって設定されているものとする。   Next, the pipeline image processing unit 12 calculates a correction coefficient for each of the RGB so that the blank-sheet portion luminance becomes the target blank-sheet portion luminance for the reference image, and corrects each pixel (step S3). It is assumed that the target blank portion luminance is set in advance by an operator or the like, for example.

次に、パイプライン画像処理部12は、基準画像(例えば、幅方向1030mm×搬送方向625mmの大きさの印刷物を撮像した画像)を複数ブロックに分割する(ステップS4)。分割するブロック数は、オペレータが任意に設定することとする。例えば、図4に示すように、基準画像200を64行8列の512ブロックに分割する。但し、行数は用紙1ピッチのサイズにより変更するのが好ましい(1行80画素)。また、パイプライン画像処理部12は、各ブロックの範囲(4隅のXY座標)をパイプライン画像処理部12内の記憶部(図示しない)に記憶させておく。   Next, the pipeline image processing unit 12 divides the reference image (for example, an image obtained by capturing a printed matter having a size of 1030 mm in the width direction × 625 mm in the conveyance direction) into a plurality of blocks (Step S4). The number of blocks to be divided is arbitrarily set by the operator. For example, as shown in FIG. 4, the reference image 200 is divided into 512 blocks of 64 rows and 8 columns. However, it is preferable to change the number of lines according to the size of one pitch of the paper (80 pixels per line). The pipeline image processing unit 12 stores the range of each block (XY coordinates of the four corners) in a storage unit (not shown) in the pipeline image processing unit 12.

次に、パイプライン画像処理部12は、基準画像について、RGB毎に、ソーベルフィルタやエッジ抽出フィルタによりエッジ抽出を行う(ステップS5)。具体的には、基準画像(RGB)をR成分画像、G成分画像、B成分画像に分割して、それぞれの画像についてエッジ抽出を行う。RGB毎にエッジ抽出を行う理由は、より多くのエッジを抽出するためである。エッジを抽出した画像(エッジ画像)を、以下「A画像」という。図5は、R成分画像のA画像の例であり、図6は、G成分画像のA画像の例であり、図7は、B成分画像のA画像の例である。なお、エッジは、画像における濃度が急激に変化している箇所のことであり、例えば、画像中の物体の輪郭や線などが該当する。   Next, the pipeline image processing unit 12 performs edge extraction on the reference image for each of the RGB using a Sobel filter or an edge extraction filter (step S5). Specifically, the reference image (RGB) is divided into an R component image, a G component image, and a B component image, and edge extraction is performed for each image. The reason why edge extraction is performed for each RGB is to extract more edges. The image from which the edges are extracted (edge image) is hereinafter referred to as “A image”. 5 shows an example of an A image of an R component image, FIG. 6 shows an example of an A image of a G component image, and FIG. 7 shows an example of an A image of a B component image. Note that an edge is a point in the image where the density is rapidly changing, and corresponds to, for example, an outline or a line of an object in the image.

次に、パイプライン画像処理部12は、A画像を階調a(本実施形態では「90」)で二値化する(ステップS6)。具体的には、ステップS5の処理で生成されたR成分画像のA画像、G成分画像のA画像、B成分画像のA画像それぞれについて階調aで二値化する。二値化して得た画像を、以下「B画像」という。図8(A)は、R成分画像のB画像の例であり、図8(B)は、G成分画像のB画像の例であり、図8(C)は、B成分画像のB画像の例であり、図8(D)は、これらのB画像を合成したRGB成分のB画像である。   Next, the pipeline image processing unit 12 binarizes the A image with a gradation a (“90” in the present embodiment) (Step S6). Specifically, each of the A image of the R component image, the A image of the G component image, and the A image of the B component image generated in the process of step S5 is binarized by the gradation a. The image obtained by the binarization is hereinafter referred to as “B image”. 8A shows an example of a B image of an R component image, FIG. 8B shows an example of a B image of a G component image, and FIG. 8C shows an example of a B image of a B component image. FIG. 8D shows an example of an RGB component B image obtained by combining these B images.

次に、パイプライン画像処理部12は、A画像を階調b(本実施形態では「130」)で二値化する(ステップS7)。具体的には、ステップS5の処理で生成されたR成分画像のA画像、G成分画像のA画像、B成分画像のA画像それぞれについて階調bで二値化する。二値化して得た画像を、以下「C画像」という。図9(A)は、R成分画像のC画像の例であり、図9(B)は、G成分画像のC画像の例であり、図9(C)は、B成分画像のC画像の例であり、図9(D)は、これらのC画像を合成したRGB成分のC画像である。   Next, the pipeline image processing unit 12 binarizes the A image with the gradation b (“130” in the present embodiment) (Step S7). Specifically, each of the A image of the R component image, the A image of the G component image, and the A image of the B component image generated in the process of step S5 is binarized by the gradation b. The image obtained by the binarization is hereinafter referred to as “C image”. 9A illustrates an example of a C image of an R component image, FIG. 9B illustrates an example of a C image of a G component image, and FIG. 9C illustrates an example of a C image of a B component image. For example, FIG. 9D is a C component image of an RGB component obtained by combining these C images.

次に、パイプライン画像処理部12は、C画像を水平微分(水平微分することにより図柄のエッジの水平線のみを抽出する)した後、2画素分水平方向へ膨張させた画像(以下「C1画像」という)を生成する(ステップS8)。2画素分水平方向へ膨張とは、画像全体を水平方向に拡大することを意味する。水平方向へ膨張させることにより後述するステップS10の処理において交点を求めやすくする。なお、図10(A)は、C1画像の例である。   Next, the pipeline image processing unit 12 horizontally differentiates the C image (extracts only the horizontal line of the edge of the symbol by horizontal differentiation) and then expands the image by two pixels in the horizontal direction (hereinafter referred to as “C1 image”). ") (Step S8). The expansion in the horizontal direction by two pixels means that the entire image is expanded in the horizontal direction. The expansion in the horizontal direction makes it easier to find the intersection in the processing of step S10 described below. FIG. 10A is an example of the C1 image.

次に、パイプライン画像処理部12は、C画像を垂直微分した後、2画素分垂直方向へ膨張させた画像(以下「C2画像」という)を生成する(ステップS9)。2画素分垂直方向へ膨張とは、画像全体を垂直方向に拡大することを意味する。垂直方向へ膨張させることにより後述するステップS10の処理において交点を求めやすくする。なお、図10(B)は、C2画像の例である。   Next, after vertical differentiation of the C image, the pipeline image processing unit 12 generates an image expanded in the vertical direction by two pixels (hereinafter, referred to as a “C2 image”) (step S9). The expansion in the vertical direction by two pixels means that the entire image is expanded in the vertical direction. The expansion in the vertical direction makes it easier to find the intersection in the processing of step S10 described later. FIG. 10B is an example of a C2 image.

次に、パイプライン画像処理部12は、C1画像とC2画像を合成してC中間画像を生成し、水平・垂直とも8画素以上連続する直線であって、垂直に交差する直線のみを残した画像(以下「C3画像という)を生成し、交点のXYアドレスを取得する(ステップS10)。なお、図10(C)は、C1画像とC2画像を合成した画像の例であり、図12(A)は、C3画像の例である。図12(A)に示すように、交点が複数ある場合にはそれぞれのXYアドレスを取得する。   Next, the pipeline image processing unit 12 combines the C1 image and the C2 image to generate a C intermediate image, and leaves only a straight line that is continuous over 8 pixels in both the horizontal and vertical directions and that intersects vertically. An image (hereinafter, referred to as “C3 image”) is generated, and the XY address of the intersection is obtained (step S10) Note that FIG.10 (C) is an example of an image obtained by combining the C1 image and the C2 image, and FIG. 12A is an example of a C3 image, and when there are a plurality of intersections, the respective XY addresses are acquired as shown in FIG.

次に、パイプライン画像処理部12は、B画像を水平微分した後、2画素分水平方向へ膨張させた画像(以下「B1画像」という)を生成する(ステップS11)。なお、図11(A)は、B1画像の例である。   Next, the pipeline image processing unit 12 generates an image (hereinafter, referred to as “B1 image”) expanded horizontally by two pixels after the B image is horizontally differentiated (step S11). FIG. 11A is an example of a B1 image.

次に、パイプライン画像処理部12は、B画像を垂直微分した後、2画素分垂直方向へ膨張させた画像(以下「B2画像」という)を生成する(ステップS12)。なお、図11(B)は、B2画像の例である。   Next, after the B image is vertically differentiated, the pipeline image processing unit 12 generates an image (hereinafter, referred to as a “B2 image”) expanded in the vertical direction by two pixels (step S12). FIG. 11B is an example of a B2 image.

次に、パイプライン画像処理部12は、B1画像とB2画像を合成してB中間画像を生成し、水平・垂直とも8画素以上連続する直線であって、垂直に交差する直線のみを残した画像(以下「B3画像という)を生成する(ステップS13)。なお、図11(C)は、B1画像とB2画像を合成した画像の例であり、図12(B)は、B3画像の例である。   Next, the pipeline image processing unit 12 generates a B intermediate image by combining the B1 image and the B2 image, and leaves only a straight line that is continuous for at least 8 pixels in both the horizontal and vertical directions and that intersects vertically. An image (hereinafter, referred to as a “B3 image”) is generated (step S13) Note that FIG.11 (C) is an example of an image obtained by combining the B1 image and the B2 image, and FIG.12 (B) is an example of the B3 image. It is.

次に、パイプライン画像処理部12は、C3画像(図12(A)参照)から、ステップS10で取得したXYアドレスを中心とする32画素×32画素の切り出し画像(C’画像)を生成する(ステップS14)。なお、切り出し画像(C’画像)のサイズは任意であり、例えば、64画素×64画素の切り出し画像(C’画像)を生成することとしてもよい。図12(C)は、C’画像の例である。   Next, the pipeline image processing unit 12 generates a cutout image (C ′ image) of 32 pixels × 32 pixels centered on the XY address acquired in step S10 from the C3 image (see FIG. 12A). (Step S14). The size of the cut-out image (C ′ image) is arbitrary, and for example, a cut-out image (C ′ image) of 64 × 64 pixels may be generated. FIG. 12C is an example of a C ′ image.

次に、パイプライン画像処理部12は、B3画像(図12(B)参照)から、ステップS13の処理で切り出し画像を切り出した際に中心としたXYアドレスと同じXYアドレスを中心とする32画素×32画素の切り出し画像(B’画像)を生成する(ステップS15)。なお、ステップS13の処理と同様に64画素×64画素の切り出し画像(B’画像)を生成することとしてもよい(但し、C’画像と同じサイズとする)。図12(D)は、B’画像の例である。   Next, the pipeline image processing unit 12 calculates a 32-pixel centered on the same XY address as the XY address centered when the cutout image is cut out from the B3 image (see FIG. 12B) in the process of step S13. A clipped image (B ′ image) of × 32 pixels is generated (step S15). Note that a cutout image (B ′ image) of 64 × 64 pixels may be generated (however, the same size as the C ′ image) as in the process of step S13. FIG. 12D is an example of a B ′ image.

次に、パイプライン画像処理部12は、C’画像とB’画像の差分が1画素から8画素の範囲内であれば、これらの画像の中心アドレス(ステップS10の処理で取得したXYアドレス)について「テンプレート適性有り」と判定する(ステップS16)。なお、C’画像とB’画像の差分が0画素(完全に一致)の場合も「テンプレート適性有り」と判定してもよい。一方、パイプライン画像処理部12は、C’画像とB’画像の差分が1画素から8画素の範囲内でなければ、これらの画像の中心アドレスについて「テンプレート適性無し」と判定する。すなわち、C’画像とB’画像の差分が、例えば、本実施形態のように9画素以上ある場合には違いがあり過ぎるので「テンプレート適性無し」と判定する。なお、本実施形態では差分が1画素から8画素の範囲内である場合にのみ「テンプレート適性有り」と判定することとしたが、これは一例であって閾値は適宜変更してもよい。   Next, if the difference between the C ′ image and the B ′ image is within the range of 1 pixel to 8 pixels, the pipeline image processing unit 12 determines the center addresses of these images (the XY addresses acquired in the processing in step S10). Is determined to be "template suitable" (step S16). When the difference between the C ′ image and the B ′ image is 0 pixel (completely coincident), it may be determined that “there is template aptitude”. On the other hand, if the difference between the C ′ image and the B ′ image is not within the range of 1 pixel to 8 pixels, the pipeline image processing unit 12 determines that the center addresses of these images are “no template suitability”. That is, if the difference between the C ′ image and the B ′ image is, for example, 9 pixels or more as in the present embodiment, there is too much difference, so that “No template aptitude” is determined. In the present embodiment, it is determined that “there is a template suitability” only when the difference is within the range of 1 pixel to 8 pixels. However, this is an example, and the threshold value may be appropriately changed.

なお、ステップS10の処理で複数のXYアドレスを取得した場合には、その数分だけ、ステップS14及びステップS15の処理を行い、C’画像及びB’画像を生成する。このとき、同じXYアドレスから切り出したC’画像及びB’画像を組にして記憶しておく。そして、それぞれの組のC’画像及びB’画像についてステップS16の処理を行う。   When a plurality of XY addresses are obtained in the process of step S10, the processes of steps S14 and S15 are performed by the number of the XY addresses to generate the C 'image and the B' image. At this time, the C 'image and the B' image cut out from the same XY address are stored as a set. Then, the process of step S16 is performed for each set of the C 'image and the B' image.

次に、パイプライン画像処理部12は、ステップS4の処理で分割した一のブロックを選択する(ステップS17)。   Next, the pipeline image processing unit 12 selects one block divided in the process of step S4 (step S17).

次に、パイプライン画像処理部12は、ステップS17の処理で選択したブロック内に、「テンプレート適性有り」と判定したXYアドレスがないかサーチする(ステップS18)。具体的には、ブロック内の始点(例えば、左下隅)からX方向に一画素ずつずらしながら「テンプレート適性有り」と判定したXYアドレスがないかサーチする。ブロック端までいっても見つからない場合には、Y方向に1画素ずらし再度、X方向に一画素ずつずらしながら「テンプレート適性有り」と判定したXYアドレスがないかサーチする。「テンプレート適性有り」と判定したXYアドレスが1つ見つかった時点でサーチを終了する。   Next, the pipeline image processing unit 12 searches the block selected in the process of step S17 for an XY address determined to be "template suitable" (step S18). Specifically, a search is made for an XY address determined to be "template suitable" while shifting one pixel at a time in the X direction from a starting point (for example, a lower left corner) in the block. If it is not found even at the end of the block, it is shifted by one pixel in the Y direction, and again shifted by one pixel in the X direction, and a search is made for an XY address determined to be "template suitable". The search is terminated when one XY address determined as “template suitable” is found.

そして、パイプライン画像処理部12は、ブロック内に「テンプレート適性有り」のXYアドレスがあったか否かを判定する(ステップS19)。具体的には、「テンプレート適性有り」のXYアドレスがそのブロック内に一つでも含まれていれば「YES」と判定する。   Then, the pipeline image processing unit 12 determines whether or not there is an XY address “with template aptitude” in the block (Step S19). Specifically, if at least one XY address of “with template aptitude” is included in the block, “YES” is determined.

パイプライン画像処理部12は、ブロック内に「テンプレート適性有り」のXYアドレスがないと判定した場合には(ステップS19:NO)、当該ブロックを「テンプレート無しブロック」と判定し(ステップS20)、ステップS26の処理に移行する。一方、パイプライン画像処理部12は、ブロック内に「テンプレート適性有り」のXYアドレスがあると判定した場合には(ステップS19:YES)、当該ブロックを「テンプレート有りブロック」と判定し(ステップS21)、ステップS22の処理に移行する。   If the pipeline image processing unit 12 determines that there is no XY address of “with template aptitude” in the block (step S19: NO), the pipeline image processing unit 12 determines that the block is a “block without template” (step S20). The process moves to the process in step S26. On the other hand, when the pipeline image processing unit 12 determines that there is an XY address of “with template aptitude” in the block (step S19: YES), it determines that the block is a “block with template” (step S21). ), The process proceeds to step S22.

次に、パイプライン画像処理部12は、ステップS6の処理と同様にRGB毎にA画像を階調((a+b)/2)(本実施形態では「(90+130)/2=110」)で二値化し、ステップS11〜ステップS13の処理においてB画像について行ったのと同様の処理を行い、D画像を生成する(ステップS22)。図13は、D画像の例である。   Next, the pipeline image processing unit 12 converts the A image into gradations ((a + b) / 2) for each of RGB in a manner similar to the processing in step S6 (“(90 + 130) / 2 = 110” in the present embodiment). Then, the same processing as that performed on the B image in the processing of steps S11 to S13 is performed to generate a D image (step S22). FIG. 13 is an example of a D image.

次に、パイプライン画像処理部12は、D画像から、「テンプレート適性有り」のXYアドレスを中心アドレスとする32画素×32画素を切り出し、テンプレート画像(D’画像)(図13におけるD’画像300参照)を生成する(ステップS23)。なお、D’画像のサイズも64画素×64画素としてもよい。   Next, the pipeline image processing unit 12 cuts out 32 pixels × 32 pixels having the XY address “Template appropriate” as a center address from the D image, and generates a template image (D ′ image) (D ′ image in FIG. 13). 300 (see step S23). Note that the size of the D 'image may be 64 pixels × 64 pixels.

次に、パイプライン画像処理部12は、テンプレート画像(D’画像)のチェックを行う(ステップS24)。このチェックでは、テンプレート検証範囲(テンプレート画像(D’画像)の中心アドレスを基準とするX方向±64画素、Y方向±128画素の範囲)内を、D’画像を1画素ずつずらしていき、何れの位置でも(但し、中心アドレスを除く)D画像とD’画像の差分が1画素以上であることを検証する。すなわち、テンプレート画像(D’画像)がその周囲(テンプレート検証範囲内)でユニークであることを検証する。   Next, the pipeline image processing unit 12 checks the template image (D 'image) (Step S24). In this check, the D 'image is shifted by one pixel within the template verification range (a range of ± 64 pixels in the X direction and ± 128 pixels in the Y direction with reference to the center address of the template image (D' image)). It is verified that the difference between the D image and the D ′ image is one pixel or more at any position (excluding the center address). That is, it is verified that the template image (D 'image) is unique around it (within the template verification range).

そして、パイプライン画像処理部12は、チェックの結果、テンプレート検証範囲内でテンプレート画像(D’画像)がユニークでない場合には、当該テンプレート画像(D’画像)は不合格として、ステップS18に戻り、同じブロック内の他の「テンプレート適性有り」のXYアドレスをサーチし、当該XYアドレスについて、ステップS19〜ステップS24の処理を行う。ステップS18〜ステップS24の処理を2回やり直してもチェックの結果が変わらない場合には、ステップS20の処理に移行する。一方、パイプライン画像処理部12は、チェックの結果、テンプレート検証範囲内でテンプレート画像(D’画像)がユニークである場合には、ステップS25の処理に移行する。   If the template image (D ′ image) is not unique within the template verification range as a result of the check, the pipeline image processing unit 12 determines that the template image (D ′ image) has failed, and returns to step S18. Then, another XY address of “with template aptitude” in the same block is searched, and the processing of steps S19 to S24 is performed for the XY address. If the result of the check does not change even if the processing of steps S18 to S24 is repeated twice, the processing shifts to the processing of step S20. On the other hand, when the template image (D 'image) is unique within the template verification range as a result of the check, the pipeline image processing unit 12 proceeds to the process of step S25.

次に、パイプライン画像処理部12は、直近のステップS17の処理で選択した一のブロックの識別情報(例えば、ブロックID)と、テンプレート画像(D’画像)と、中心アドレス(テンプレート画像(D’画像)をD画像から切り取った際のXYアドレス)とを対応付けてテンプレートテーブル(図示しない)に登録し(ステップS25)、ステップS26の処理に移行する。   Next, the pipeline image processing unit 12 determines the identification information (for example, block ID) of one block selected in the processing of the latest step S17, the template image (D ′ image), and the center address (template image (D The 'image' is registered in a template table (not shown) in association with an XY address when the 'image' is cut out from the D image (step S25), and the process proceeds to step S26.

パイプライン画像処理部12は、ステップS20又はステップS25の処理を終えると、次いで、全てのブロックを選択したか否かを判定する(ステップS26)。すなわち、パイプライン画像処理部12は、ステップS4の処理で分割した全ブロックをステップS17の処理により選択したか否かを判定する。このとき、パイプライン画像処理部12は、全てのブロックを選択していないと判定した場合には(ステップS26:NO)、ステップS17の処理に移行し、それまでに選択していない一のブロックを選択する。一方、パイプライン画像処理部12は、全てのブロックを選択したと判定した場合には(ステップS26:YES)、連続シート用テンプレート画像作成処理を終了する。   After completing the processing in step S20 or step S25, the pipeline image processing unit 12 determines whether all blocks have been selected (step S26). That is, the pipeline image processing unit 12 determines whether or not all the blocks divided in the processing in step S4 have been selected in the processing in step S17. At this time, if it is determined that all the blocks have not been selected (step S26: NO), the pipeline image processing unit 12 shifts to the process of step S17, and selects one block that has not been selected. Select On the other hand, when it is determined that all the blocks have been selected (step S26: YES), the pipeline image processing unit 12 ends the continuous sheet template image creation processing.

本実施形態において、パイプライン画像処理部12は、A画像を階調aで二値化したB画像と、A画像を階調bで二値化したC画像のそれぞれから切り出し画像(B’画像及びC’画像)を比較して、差分が一定の範囲(1画素〜8画素)である場合に、B’画像及びC’画像を切り出した際のXYアドレスをテンプレートの適性有りと判断とする。これにより、一定の階調の範囲(階調a〜bの範囲)の特徴点を見つけることができる。また、パイプライン画像処理部12は、A画像を階調(a+b)/2で二値化したD画像から、テンプレート適性有りと判断したXYアドレスに基づいて、テンプレート画像(D’画像)を生成する。これにより、被検査画像の階調が階調a〜bの範囲で変化してもテンプレート画像(D’画像)と適切にマッチングすることができる。   In the present embodiment, the pipeline image processing unit 12 cuts out an image (B ′ image) cut out from each of a B image obtained by binarizing the A image at the gradation a and a C image obtained by binarizing the A image at the gradation b. And the C ′ image) are compared, and when the difference is within a certain range (1 pixel to 8 pixels), the XY address at the time of cutting out the B ′ image and the C ′ image is determined to be appropriate for the template. . As a result, it is possible to find feature points in a certain gradation range (range of gradations a and b). Further, the pipeline image processing unit 12 generates a template image (D ′ image) from the D image obtained by binarizing the A image with the gradation (a + b) / 2, based on the XY address determined to be appropriate for the template. I do. Thereby, even if the gradation of the inspected image changes in the range of gradations a and b, it can be appropriately matched with the template image (D 'image).

[1.3.連続シート検査処理の動作]
次に、図14を用いて、パイプライン画像処理部12による連続シート検査処理について説明する。なお、図14は、連続シート検査処理の一例を示すフローチャートである。連続シート検査処理は、基準画像と被検査画像の比較処理を行う全数検査である。
[1.3. Operation of continuous sheet inspection processing]
Next, the continuous sheet inspection processing by the pipeline image processing unit 12 will be described with reference to FIG. FIG. 14 is a flowchart illustrating an example of the continuous sheet inspection process. The continuous sheet inspection process is a 100% inspection that performs a comparison process between the reference image and the image to be inspected.

まず、パイプライン画像処理部12は、連続シート・ズレ量算出処理を行う(ステップS31)。なお、連続シート・ズレ量算出処理については後述する。   First, the pipeline image processing unit 12 performs a continuous sheet shift amount calculation process (step S31). The continuous sheet shift amount calculation processing will be described later.

次に、パイプライン画像処理部12は、連続シート・ズレ量算出処理により、ブロック毎に算出したズレ量に基づいて、被検査画像の位置補正を行う(ステップS32)。   Next, the pipeline image processing unit 12 performs the position correction of the image to be inspected based on the shift amount calculated for each block by the continuous sheet shift amount calculation processing (step S32).

次に、パイプライン画像処理部12は、位置補正した被検査画像と基準画像を比較する検査を行う(ステップS33)。   Next, the pipeline image processing unit 12 performs an inspection for comparing the position-corrected image to be inspected with the reference image (step S33).

次に、パイプライン画像処理部12は、ステップS33の処理で行った比較検査の結果を出力し(ステップS34)、連続シート検査処理を終了する。ステップS34の処理において、パイプライン画像処理部12は、例えば、比較検査の結果を示す結果データを作成して検査サーバ20に送信したり(不良検出時における不良画像、検査開始時や停止時における稼働記録や検査ログデータとともに送信してもよい)、検査結果を表示装置(例えば、検査サーバ20に接続された表示装置等)に表示させたりしてもよい。   Next, the pipeline image processing unit 12 outputs the result of the comparison inspection performed in the processing of Step S33 (Step S34), and ends the continuous sheet inspection processing. In the process of step S34, the pipeline image processing unit 12 creates, for example, result data indicating the result of the comparison inspection and transmits the result data to the inspection server 20 (a defective image at the time of defect detection, The test result may be transmitted together with the operation record or the test log data), or the test result may be displayed on a display device (for example, a display device connected to the test server 20).

[1.4.連続シート・ズレ量算出処理の動作]
次に、図15を用いて、パイプライン画像処理部12による連続シート・ズレ量算出処理について説明する。
[1.4. Operation of continuous sheet shift amount calculation processing]
Next, the continuous sheet shift amount calculation processing by the pipeline image processing unit 12 will be described with reference to FIG.

まず、パイプライン画像処理部12は、全数検査の対象となる印刷物を撮像した被検査画像を取得する(ステップS51)。被検査画像はRGB画像であり、各成分は「0〜255」の階調を示す値で示される。   First, the pipeline image processing unit 12 obtains an image to be inspected obtained by capturing an image of a printed material to be subjected to the 100% inspection (step S51). The image to be inspected is an RGB image, and each component is represented by a value indicating a gradation of “0 to 255”.

次に、パイプライン画像処理部12は、被検査画像について、RGB毎に白紙部に対応する各画素の輝度(白紙部輝度)を取得する(ステップS52)。   Next, the pipeline image processing unit 12 acquires, for each of the RGB images, the luminance of each pixel corresponding to the blank section (blank section luminance) for the image to be inspected (step S52).

次に、パイプライン画像処理部12は、被検査画像について、RGB毎に、白紙部輝度が目標白紙部輝度になるように補正係数を算出し、各画素を補正する(ステップS53)。目標白紙部輝度は、連続シート用テンプレート画像作成処理のステップS3と同じ値が予めオペレータ等によって設定されているものとする。   Next, the pipeline image processing unit 12 calculates a correction coefficient for each of the R, G, and B components of the image to be inspected so that the blank-sheet luminance becomes the target blank-sheet luminance, and corrects each pixel (step S53). It is assumed that the same value as that in step S3 of the continuous sheet template image creation process is set in advance by the operator or the like as the target blank sheet portion brightness.

次に、パイプライン画像処理部12は、基準画像と同様に被検査画像を複数ブロックに分割する(ステップS54)。   Next, the pipeline image processing unit 12 divides the image to be inspected into a plurality of blocks as in the case of the reference image (step S54).

次に、パイプライン画像処理部12は、基準画像と同様に被検査画像について、RGB毎に、ソーベルフィルタによりエッジ抽出を行う(ステップS55)。なお、連続シート検査処理においてもエッジ抽出した画像を「A画像」という。   Next, the pipeline image processing unit 12 performs edge extraction on the image to be inspected for each of the RGB using a Sobel filter, similarly to the reference image (step S55). Note that the image extracted in the continuous sheet inspection process is also referred to as “A image”.

次に、パイプライン画像処理部12は、連続シート用テンプレート画像作成処理のステップS22と同様に、A画像を階調((a+b)/2)(本実施形態では「(90+130)/2=110」)で二値化した画像に対して、連続シート用テンプレート画像作成処理のステップS11〜ステップS13の処理においてB画像について行ったのと同様の処理を行い、D画像を生成する(ステップS56)。なお、aとbは、連続シート用テンプレート画像作成処理における値と同じ値を用いる。   Next, the pipeline image processing unit 12 converts the A image into the gradation ((a + b) / 2) (in the present embodiment, “(90 + 130) / 2”, as in step S22 of the continuous sheet template image creation processing. = 110 ”), the same processing as that performed on the B image in the processing of steps S11 to S13 of the continuous sheet template image generation processing is performed on the image binarized to generate the D image (step S110). S56). Note that a and b use the same values as those in the continuous sheet template image creation processing.

次に、パイプライン画像処理部12は、連続シート・テンプレート有りブロック処理を行う(ステップS57)。なお、連続シート・テンプレート有りブロック処理については後述する。連続シート・テンプレート有りブロック処理は、テンプレート有りブロックについてズレ量を決定する処理である。   Next, the pipeline image processing unit 12 performs a continuous sheet / template block processing (step S57). The continuous sheet / template block processing will be described later. The continuous sheet / template block processing is processing for determining a shift amount for a template block.

次に、パイプライン画像処理部12は、ズレ量が決定していないブロックがあるか否かを判定する(ステップS58)。連続シート・テンプレート有りブロック処理では、テンプレート有りブロックについてズレ量を決定するので、ここでズレ量が決定していないブロックはテンプレート無しブロックが該当する。パイプライン画像処理部12は、ズレ量が決定していないブロックがないと判定した場合には(ステップS58:NO)、連続シート・ズレ量算出処理を終了する。一方、パイプライン画像処理部12は、ズレ量が決定していないブロックがあると判定した場合には(ステップS58:YES)、一のテンプレート無しブロックを選択し(ステップS59)、ズレ量が決定している上下左右のブロック又は同行/同列のブロックのズレ量に基づいてズレ量を決定し(ステップS60)、ステップS58の処理に移行する。そして、パイプライン画像処理部12は、全ての「テンプレート無しブロック」を選択するまで(全てのテンプレート無しブロックについてズレ量を決定するまで)、ステップS58〜ステップS60の処理を繰り返す。   Next, the pipeline image processing unit 12 determines whether or not there is a block whose deviation amount has not been determined (step S58). In the continuous sheet / template block processing, the shift amount is determined for the template block, and the block for which the shift amount has not been determined corresponds to the template-less block. When determining that there is no block in which the shift amount has not been determined (step S58: NO), the pipeline image processing unit 12 ends the continuous sheet shift amount calculation processing. On the other hand, when the pipeline image processing unit 12 determines that there is a block whose deviation amount has not been determined (step S58: YES), the pipeline image processing unit 12 selects one block without template (step S59), and determines the deviation amount. The shift amount is determined based on the shift amount of the upper, lower, left and right blocks or the block in the same row / same column (step S60), and the process proceeds to step S58. Then, the pipeline image processing unit 12 repeats the processing of steps S58 to S60 until all “template-less blocks” are selected (until the deviation amounts are determined for all template-less blocks).

[1.5.連続シート・テンプレート有りブロック処理の動作]
次に、図16を用いて、パイプライン画像処理部12による連続シート・テンプレート有りブロック処理について説明する。
[1.5. Operation of block processing with continuous sheet template]
Next, block processing with a continuous sheet template by the pipeline image processing unit 12 will be described with reference to FIG.

まず、パイプライン画像処理部12は、連続シート用テンプレート画像作成処理のステップS21の処理で「テンプレート有りブロック」と判定した一のブロックを選択する(ステップS101)。   First, the pipeline image processing unit 12 selects one block determined as a “block with template” in the process of step S21 of the template image creation process for a continuous sheet (step S101).

次に、パイプライン画像処理部12は、テンプレートテーブル(連続シート用テンプレート画像作成処理のステップS25を参照)から、ステップS101の処理で選択したブロックに含まれるテンプレート画像(D’画像)と中心アドレスを取得する(ステップS102)。   Next, the pipeline image processing unit 12 obtains a template image (D ′ image) and a center address included in the block selected in step S101 from the template table (see step S25 of the continuous sheet template image creation process). Is acquired (step S102).

次に、パイプライン画像処理部12は、ステップS102の処理で取得した中心アドレスを基準とする予め設定された設定範囲(例えば、X方向±64画素、Y方向±128画素の範囲)内を、ステップS56の処理で生成したD画像に対してD’画像を1画素ずつずらしていき、D画像とD’画像の差分を算出する(ステップS103)。   Next, the pipeline image processing unit 12 sets a predetermined range (for example, a range of ± 64 pixels in the X direction and ± 128 pixels in the Y direction) based on the center address acquired in the processing of step S102 as a reference. The D ′ image is shifted by one pixel with respect to the D image generated in the process of step S56, and the difference between the D image and the D ′ image is calculated (step S103).

次に、パイプライン画像処理部12は、差分が最小であった位置を特定する(ステップS104)。なお、差分が最小である位置が同じ値で複数ある場合には最も中心アドレスに近い位置を一つ特定する。   Next, the pipeline image processing unit 12 specifies the position where the difference is minimum (Step S104). When there are a plurality of positions having the same value with the smallest difference, one position closest to the center address is specified.

次に、パイプライン画像処理部12は、ステップS104の処理で特定した位置と、ステップS102の処理で取得した中心アドレスの差をズレ量(dx,dy)として決定する(ステップS105)。なお、決定したズレ量は、当該中心アドレスを含むブロックの識別情報(例えば、ブロックID)と対応付けて記憶させておくものとする。   Next, the pipeline image processing unit 12 determines the difference between the position specified in the processing in step S104 and the center address acquired in the processing in step S102 as the deviation amount (dx, dy) (step S105). Note that the determined shift amount is stored in association with identification information (for example, a block ID) of a block including the center address.

次に、パイプライン画像処理部12は、全ての「テンプレート有りブロック」を選択したか否かを判定する(ステップS106)。このとき、パイプライン画像処理部12は、全ての「テンプレート有りブロック」を選択していないと判定した場合には(ステップS106:NO)、ステップS101の処理に移行し、それまでに選択していない一の「テンプレート有りブロック」を選択する。そして、全ての「テンプレート有りブロック」を選択するまで、ステップS101〜ステップS106の処理を繰り返す。一方、パイプライン画像処理部12は、全ての「テンプレート有りブロック」を選択したと判定した場合には(ステップS106:YES)、連続シート・テンプレート有りブロック処理を終了し、連続シート・ズレ量算出処理に戻る。   Next, the pipeline image processing unit 12 determines whether or not all “blocks with template” have been selected (Step S106). At this time, if it is determined that all “blocks with template” have not been selected (step S106: NO), the pipeline image processing unit 12 shifts to the processing of step S101 and has selected it up to that point. One of the "blocks with template" is selected. Then, the processing of steps S101 to S106 is repeated until all “blocks with template” are selected. On the other hand, when it is determined that all “blocks with template” have been selected (step S106: YES), the pipeline image processing unit 12 ends the continuous sheet / template block processing and calculates the continuous sheet deviation amount. Return to processing.

[2.第2実施形態]
次に、図面を参照して本発明の第2実施形態について説明する。なお、第2実施形態は、オフセット枚葉印刷機に設置された検査装置に対して本発明を適用した場合の実施形態である。なお、第2実施形態は、第1実施形態と共通する部分が多いので、ここでは、その差異点を中心に説明する。
[2. Second Embodiment]
Next, a second embodiment of the present invention will be described with reference to the drawings. Note that the second embodiment is an embodiment in which the present invention is applied to an inspection device installed in an offset sheet-fed printing press. Note that the second embodiment has many parts in common with the first embodiment, and therefore, the following description will focus on the differences.

[2.1.オフセット枚葉印刷機及び検査装置の構成]
第2実施形態におけるオフセット枚葉印刷機の構成は、本発明と直接的に関係しないので説明を省略する。
[2.1. Configuration of offset sheet-fed printing press and inspection device]
The configuration of the offset sheet-fed printing press according to the second embodiment is not directly related to the present invention, and thus the description is omitted.

次に、第2実施形態における検査装置Tの構成について説明する。第2実施形態における検査装置Tは、基本的に第1実施形態における検査装置Tと同様の構成を有している。   Next, a configuration of the inspection device T according to the second embodiment will be described. The inspection device T according to the second embodiment has basically the same configuration as the inspection device T according to the first embodiment.

パイプライン画像処理部12は、表面用と裏面用にそれぞれ2セット、合計4枚の画像処理ボード(表用画像処理ボード121A、表用画像処理ボード122A、裏用画像処理ボード121B、裏用画像処理ボード122B)を搭載している。表用画像処理ボード121Aと表用画像処理ボード122Aは交互に動作が切り替わる(裏用画像処理ボード121Bと裏用画像処理ボード122Bも同様)。各画像処理ボードは複数個の並列処理チップを搭載し、例えば、1000万×3色の画像の処理を180msec毎に行う。表用画像処理ボード121Aと表用画像処理ボード122Aは、表カメラ分岐ボード14を介して、表面カメラ31Aからカメラ信号を受け取り、エンコーダ分岐ボード16から受け取ったパルス信号に基づいて表面について高解像度画像を生成し(具体的な生成方法については、特許3811565号公報を参照)、高解像度画像を用いて全数検査(全ての印刷物を対象とする検査)を行う。同様に、裏用画像処理ボード121Bと裏用画像処理ボード122Bも、裏カメラ分岐ボード15を介して、裏面カメラ31Bからカメラ信号を受け取り、全数検査を行う。   The pipeline image processing unit 12 includes four sets of image processing boards (a front image processing board 121A, a front image processing board 122A, a back image processing board 121B, and a back image). The processing board 122B) is mounted. The operations of the front image processing board 121A and the front image processing board 122A are alternately switched (the same applies to the back image processing board 121B and the back image processing board 122B). Each image processing board has a plurality of parallel processing chips mounted thereon and performs, for example, processing of an image of 10 million × 3 colors every 180 msec. The front image processing board 121A and the front image processing board 122A receive a camera signal from the front camera 31A via the front camera branch board 14, and obtain a high-resolution image of the surface based on the pulse signal received from the encoder branch board 16. Is generated (refer to Japanese Patent No. 311565 for a specific generation method), and a 100% inspection (inspection for all printed materials) is performed using the high-resolution image. Similarly, the back image processing board 121B and the back image processing board 122B also receive a camera signal from the back camera 31B via the back camera branch board 15, and perform a 100% inspection.

パイプライン画像処理部12は、第1実施形態と同様に、全数検査において被検査画像と基準画像を比較する検査を行うに当たり、比較を適切に行えるように両画像の位置合わせを行う。そのために、パイプライン画像処理部12は、画像を複数のブロックに分割し、ブロック毎に両画像のズレ量を算出するズレ量算出処理を行う。   As in the first embodiment, the pipeline image processing unit 12 aligns the two images so that the comparison can be appropriately performed when performing the inspection for comparing the image to be inspected with the reference image in the 100% inspection. For this purpose, the pipeline image processing unit 12 divides an image into a plurality of blocks, and performs a shift amount calculation process of calculating a shift amount between both images for each block.

被印刷物がカットシートの一例である枚葉紙である第2実施形態では、印刷がなされたそれぞれの枚葉紙をカメラ31で次々に撮影すると、各枚葉紙が不規則な方向(縦方向、横方向或いは回転方向)にズレて撮影されるため、連続する被検査画像の向きも不規則となる。一ブロックについて二枚のテンプレート画像を作成して、二枚のテンプレート画像により被検査画像の対応するブロック内をサーチする。なお、テンプレート画像の作成処理については、フローチャートを用いて後述する。一方、連続する被検査画像の向き(ズレ)に関連性があり、且つ、印刷速度が速く全数検査にも速度が求められる第1実施形態では、上述したように、一ブロックについて一枚のテンプレート画像により位置合わせを行う。   In the second embodiment in which the substrate is a sheet, which is an example of a cut sheet, when each of the printed sheets is sequentially photographed by the camera 31, the sheets are placed in an irregular direction (vertical direction). (Horizontal or rotational direction), the direction of the continuous image to be inspected becomes irregular. Two template images are created for one block, and a search is made within the corresponding block of the image to be inspected with the two template images. Note that the template image creation processing will be described later using a flowchart. On the other hand, in the first embodiment in which the orientation (deviation) of successive images to be inspected is related, and the printing speed is high and the speed is also required for 100% inspection, as described above, one template is used for one block. Alignment is performed using images.

パイプライン画像処理部12は、テンプレート画像の作成処理において、特徴部の少ないブロックについてはテンプレート画像を二枚作成できない場合がある。パイプライン画像処理部12は、テンプレート画像を二枚作成できたブロック(「テンプレート有りブロック」)については、二枚のテンプレート画像に基づいてズレ量を算出する(2つの一致点についてズレ量を算出し、その平均をそのブロックのズレ量とする)一方、テンプレート画像を作成できなかったブロック(「テンプレート無しブロック」)については、ズレ量が決定している上下左右のブロック又は同行/同列のブロックのズレ量に基づいてズレ量を決定する。   In the template image creation processing, the pipeline image processing unit 12 may not be able to create two template images for a block having a small number of characteristic portions. The pipeline image processing unit 12 calculates a shift amount based on the two template images for a block in which two template images have been created (“block with template”) (calculates a shift amount for two coincident points). On the other hand, with respect to the blocks for which the template image could not be created (“blocks without template”), the upper, lower, left, and right blocks or the blocks in the same row / same column for which the amount of displacement is determined The shift amount is determined based on the shift amount.

また、パイプライン画像処理部12は、ブロック毎にテンプレート画像と被検査画像を比較する際には、被検査画像についてもブロック毎にテンプレート画像と同様の手法によりブロック画像を作成し、テンプレート画像により、対応するブロック画像内をサーチすることにより一致する箇所を探索する。このように同様の手法で作成した画像同士を比較することで、より正確に一致点を探索することができる。   When comparing the template image and the image to be inspected for each block, the pipeline image processing unit 12 creates a block image for the image to be inspected for each block in the same manner as the template image, and generates the block image using the template image. , The corresponding block image is searched for a matching portion. By comparing the images created by the same method as described above, a matching point can be more accurately searched.

パイプライン画像処理部12は、ブロック毎に算出したズレ量に基づいて被検査画像の位置補正を行うことにより、基準画像と被検査画像の位置合わせを行う。   The pipeline image processing unit 12 performs the position correction of the image to be inspected based on the shift amount calculated for each block, thereby aligning the reference image and the image to be inspected.

[2.2.枚葉紙用テンプレート画像作成処理の動作]
図17を用いて、パイプライン画像処理部12による枚葉紙用テンプレート画像作成処理について説明する。なお、図17は、枚葉紙用テンプレート画像作成処理の一例を示すフローチャートである。
[2.2. Operation of Sheet Image Template Image Creation Processing]
With reference to FIG. 17, a description will be given of the sheet template image creation processing by the pipeline image processing unit 12. FIG. 17 is a flowchart illustrating an example of a sheet-sheet template image creation process.

枚葉紙用テンプレート画像作成処理の冒頭の処理は、連続シート用テンプレート画像作成処理(図3参照)のステップS1〜ステップS16と同様である。   The process at the beginning of the sheet template image creation process is the same as Steps S1 to S16 of the continuous sheet template image creation process (see FIG. 3).

パイプライン画像処理部12は、ステップS16の処理を終えると、次いで、ステップS4の処理で分割した一のブロックを選択する(ステップS201)。   After completing the processing in step S16, the pipeline image processing unit 12 selects one block divided in the processing in step S4 (step S201).

次に、パイプライン画像処理部12は、ステップS17の処理で選択したブロック内に「テンプレート適性有り」と判定したXYアドレスがないかサーチする(ステップS202)。具体的には、ブロック内の始点(例えば、左下隅)からX方向に一画素ずつずらしながら「テンプレート適性有り」と判定したXYアドレスがないかサーチする。ブロック端までいっても見つからない場合には、Y方向に1画素ずらし再度、X方向に一画素ずつずらしながら「テンプレート適性有り」と判定したXYアドレスがないかサーチする。「テンプレート適性有り」と判定したXYアドレスが2つ見つかった時点でサーチを終了する。   Next, the pipeline image processing unit 12 searches the block selected in the process of step S17 for an XY address determined to be "template suitable" (step S202). Specifically, a search is made for an XY address determined to be "template suitable" while shifting one pixel at a time in the X direction from a starting point (for example, a lower left corner) in the block. If it is not found even at the end of the block, it is shifted by one pixel in the Y direction, and again shifted by one pixel in the X direction, and a search is made for an XY address determined to be "template suitable". The search is terminated when two XY addresses determined as “template suitable” are found.

そして、パイプライン画像処理部12は、ブロック内に「テンプレート適性有り」のXYアドレスが2つあったか否かを判定する(ステップS203)。パイプライン画像処理部12は、「テンプレート適性有り」のXYアドレスが2つなかったと判定した場合には(ステップS203:NO)、当該ブロックを「テンプレート無しブロック」と判定し(ステップS204)、ステップS210の処理に移行する。一方、パイプライン画像処理部12は、「テンプレート適性有り」のXYアドレスが2つあったと判定した場合には(ステップS203:YES)、当該ブロックを「テンプレート有りブロック」と判定し(ステップS205)、ステップS206の処理に移行する。   Then, the pipeline image processing unit 12 determines whether or not there are two XY addresses “with template aptitude” in the block (Step S203). If the pipeline image processing unit 12 determines that there are no two XY addresses of “with template aptitude” (step S203: NO), it determines that the block is a “template-less block” (step S204). The process proceeds to S210. On the other hand, when the pipeline image processing unit 12 determines that there are two XY addresses of “with template aptitude” (step S203: YES), the block is determined to be a “block with template” (step S205). Then, the process proceeds to the process of step S206.

次に、パイプライン画像処理部12は、連続シート用テンプレート画像作成処理のステップS22と同様に、A画像を階調((a+b)/2)(本実施形態では「(90+130)/2=110」)で二値化した画像に対して、連続シート用テンプレート画像作成処理のステップS11〜ステップS13の処理においてB画像について行ったのと同様の処理を行い、D画像を生成する(ステップS206)。   Next, the pipeline image processing unit 12 converts the A image into the gradation ((a + b) / 2) (in the present embodiment, “(90 + 130) / 2”, as in step S22 of the continuous sheet template image creation processing. = 110 ”), the same processing as that performed on the B image in the processing of steps S11 to S13 of the continuous sheet template image generation processing is performed on the image binarized to generate the D image (step S110). S206).

次に、パイプライン画像処理部12は、D画像から、「テンプレート適性有り」のXYアドレスを中心とする32画素×32画素を切り出し、テンプレート画像(D’画像)を生成する(ステップS207)。なお、第2実施形態では一のブロックにつき「テンプレート適性有り」のXYアドレスは2つあるので、パイプライン画像処理部12は、それぞれについてステップS207の処理を行い、2枚のテンプレート画像(D’画像)を生成する。   Next, the pipeline image processing unit 12 cuts out 32 pixels × 32 pixels centered on the XY address “Template appropriate” from the D image, and generates a template image (D ′ image) (Step S207). In the second embodiment, since there are two XY addresses of “with template aptitude” for one block, the pipeline image processing unit 12 performs the process of step S207 for each block, and executes two template images (D ′). Image).

次に、パイプライン画像処理部12は、テンプレート画像(D’画像)のチェックを行う(ステップS208)。このチェックでは、テンプレート検証範囲(テンプレート画像(D’画像)の中心アドレスを基準とするX方向±64画素、Y方向±128画素の範囲)内を、D’画像を1画素ずつずらしていき、何れの位置でも(但し、中心アドレスを除く)D画像とD’画像の差分が1画素以上あることを検証する。すなわち、テンプレート画像(D’画像)がその周囲(テンプレート検証範囲内)でユニークであることを検証する。なお、第2実施形態では一のブロックにつきD’画像は2枚あるので、パイプライン画像処理部12は、ステップS208の処理においてそれぞれのD’画像について検証を行う。   Next, the pipeline image processing unit 12 checks the template image (D 'image) (Step S208). In this check, the D 'image is shifted by one pixel within the template verification range (a range of ± 64 pixels in the X direction and ± 128 pixels in the Y direction with reference to the center address of the template image (D' image)). At any position (excluding the center address), it is verified that the difference between the D image and the D ′ image is one or more pixels. That is, it is verified that the template image (D 'image) is unique around it (within the template verification range). In the second embodiment, since there are two D 'images for one block, the pipeline image processing unit 12 verifies each D' image in the process of step S208.

そして、パイプライン画像処理部12は、チェックの結果、テンプレート検証範囲内でテンプレート画像(D’画像)がユニークでない場合には、当該テンプレート画像(D’画像)は不合格として、他の画像と差し替えるためにステップS202に戻り、同じブロック内の他の「テンプレート適性有り」のXYアドレスをサーチし、当該XYアドレスについて、ステップS203〜ステップS208の処理を行う。ステップS202〜ステップS208の処理を2回やり直しても、2枚のテンプレート画像(D’画像)が合格とならない場合には、ステップS204の処理に移行する。一方、パイプライン画像処理部12は、チェックの結果、テンプレート検証範囲内でテンプレート画像(D’画像)がユニークである場合には合格とする。パイプライン画像処理部12は、2枚のテンプレート画像(D’画像)が合格である場合には、ステップS209の処理に移行する。   If the template image (D ′ image) is not unique within the template verification range as a result of the check, the pipeline image processing unit 12 determines that the template image (D ′ image) has failed, and The process returns to step S202 in order to replace the XY address, and another XY address of “with template aptitude” in the same block is searched, and the processes of steps S203 to S208 are performed on the XY address. If the two template images (D 'images) do not pass even after performing the processes of steps S202 to S208 twice, the process proceeds to step S204. On the other hand, as a result of the check, the pipeline image processing unit 12 passes if the template image (D ′ image) is unique within the template verification range. When the two template images (D 'images) pass, the pipeline image processing unit 12 proceeds to the process of step S209.

次に、パイプライン画像処理部12は、直近のステップS201の処理で選択した一のブロックの識別情報(例えば、ブロックID)と、2枚のテンプレート画像(D’画像)と、各テンプレート画像(D’画像)の中心アドレスと、その平均座標と、ブロックの中心アドレスとを、対応付けてテンプレートテーブル(図示しない)に登録し(ステップS209)、ステップS210の処理に移行する。   Next, the pipeline image processing unit 12 determines the identification information (for example, block ID) of one block selected in the process of the latest step S201, two template images (D ′ images), and each template image (D ′ image). The center address of the D 'image), its average coordinates, and the center address of the block are registered in a template table (not shown) in association with each other (step S209), and the process proceeds to step S210.

パイプライン画像処理部12は、ステップS204又はステップS209の処理を終えると、次いで、全てのブロックを選択したか否かを判定する(ステップS210)。すなわち、パイプライン画像処理部12は、ステップS4の処理で分割した全ブロックをステップS201の処理により選択したか否かを判定する。このとき、パイプライン画像処理部12は、全てのブロックを選択していないと判定した場合には(ステップS210:NO)、ステップS201の処理に移行し、それまでに選択していない一のブロックを選択する。そして、全てのブロックを選択するまで、ステップS201〜ステップS210の処理を繰り返す。一方、パイプライン画像処理部12は、全てのブロックを選択したと判定した場合には(ステップS210:YES)、枚葉紙用テンプレート画像作成処理を終了する。   After completing the processing in step S204 or step S209, the pipeline image processing unit 12 determines whether all blocks have been selected (step S210). That is, the pipeline image processing unit 12 determines whether or not all the blocks divided in the processing in step S4 have been selected in the processing in step S201. At this time, when it is determined that all the blocks have not been selected (step S210: NO), the pipeline image processing unit 12 proceeds to the process of step S201, and selects one block that has not been selected. Select Then, the processing of steps S201 to S210 is repeated until all blocks are selected. On the other hand, when determining that all the blocks have been selected (step S210: YES), the pipeline image processing unit 12 ends the sheet-sheet template image creation processing.

第2実施形態において、パイプライン画像処理部12は、A画像を階調aで二値化したB画像と、A画像を階調bで二値化したC画像のそれぞれから切り出し画像(B’画像及びC’画像)を比較して、差分が一定の範囲(1画素〜8画素)である場合に、B’画像及びC’画像を切り出した際のXYアドレスをテンプレートの適性有りと判断とする。これにより、一定の階調の範囲(階調a〜bの範囲)の特徴点を見つけることができる。また、パイプライン画像処理部12は、A画像を階調(a+b)/2で二値化したD画像から、テンプレート適性有りと判断したXYアドレスに基づいて、テンプレート画像(D’画像)を2枚生成する。これにより、被検査画像の階調が階調a〜bの範囲で変化してもテンプレート画像(D’画像)と適切にマッチングすることができ、また、一ブロック当たり、2枚のテンプレート画像によりズレ量を算出して位置補正を行うことから、第1実施形態より高精度に位置補正を行うことができる。   In the second embodiment, the pipeline image processing unit 12 cuts out an image (B ′) cut out from each of a B image obtained by binarizing the A image with the gradation a and a C image obtained by binarizing the A image with the gradation b. Image and C ′ image), and when the difference is within a certain range (1 pixel to 8 pixels), the XY address at the time of cutting out the B ′ image and C ′ image is determined to be appropriate for the template. I do. As a result, it is possible to find feature points in a certain gradation range (range of gradations a and b). In addition, the pipeline image processing unit 12 converts the template image (D ′ image) into two based on the XY address determined as having the template suitability from the D image obtained by binarizing the A image with the gradation (a + b) / 2. Generate one. Thereby, even if the gradation of the image to be inspected changes in the range of gradations a and b, it can be appropriately matched with the template image (D ′ image), and two template images per block can be used. Since the displacement is calculated and the position is corrected, the position can be corrected with higher accuracy than in the first embodiment.

[2.3.枚葉紙検査処理の動作]
次に、図18を用いて、パイプライン画像処理部12による枚葉紙検査処理について説明する。なお、図18は、枚葉紙検査処理の一例を示すフローチャートである。枚葉紙検査処理は、基準画像と被検査画像の比較処理を行う全数検査である。
[2.3. Operation of Sheet Inspection Processing]
Next, the sheet inspection processing by the pipeline image processing unit 12 will be described with reference to FIG. FIG. 18 is a flowchart illustrating an example of the sheet inspection process. The sheet inspection process is a 100% inspection that performs a comparison process between the reference image and the image to be inspected.

まず、パイプライン画像処理部12は、枚葉紙・ズレ量算出処理を行う(ステップS231)。なお、枚葉紙・ズレ量算出処理については後述する。   First, the pipeline image processing unit 12 performs a sheet / shift amount calculation process (step S231). The sheet / shift amount calculation processing will be described later.

次に、パイプライン画像処理部12は、連続シート検査処理(図14参照)のステップS32〜ステップS34と同様の処理を行い、枚葉紙検査処理を終了する。   Next, the pipeline image processing unit 12 performs the same processing as Steps S32 to S34 of the continuous sheet inspection processing (see FIG. 14), and ends the sheet inspection processing.

[2.4.枚葉紙・ズレ量算出処理の動作]
次に、図19を用いて、パイプライン画像処理部12による枚葉紙・ズレ量算出処理について説明する。
[2.4. Operation of Sheet / Shift Amount Calculation Processing]
Next, the sheet / displacement amount calculation processing by the pipeline image processing unit 12 will be described with reference to FIG.

枚葉紙・ズレ量算出処理の冒頭の処理は、連続シート・ズレ量算出処理(図15参照)のステップS51〜ステップS56と同様である。   The process at the beginning of the sheet / shift amount calculation process is the same as Steps S51 to S56 of the continuous sheet shift amount calculation process (see FIG. 15).

次に、パイプライン画像処理部12は、枚葉紙・テンプレート有りブロック処理を行う(ステップS251)。なお、枚葉紙・テンプレート有りブロック処理については後述する。   Next, the pipeline image processing unit 12 performs a sheet / template presence block process (step S251). The sheet / template block processing will be described later.

次に、パイプライン画像処理部12は、連続シート・ズレ量算出処理(図15参照)のステップS58〜ステップS60と同様の処理を行い、枚葉紙・ズレ量算出処理を終了する。   Next, the pipeline image processing unit 12 performs the same processing as Steps S58 to S60 in the continuous sheet shift amount calculation processing (see FIG. 15), and ends the sheet / shift amount calculation processing.

[2.5.枚葉紙・テンプレート有りブロック処理の動作]
次に、図20を用いて、パイプライン画像処理部12による枚葉紙・テンプレート有りブロック処理について説明する。
[2.5. Operation of block processing with sheet / template]
Next, the sheet / template block processing by the pipeline image processing unit 12 will be described with reference to FIG.

まず、パイプライン画像処理部12は、枚葉紙用テンプレート画像作成処理のステップS205の処理で「テンプレート有りブロック」として判定した一のブロックを選択する(ステップS301)。   First, the pipeline image processing unit 12 selects one block determined as a “block with template” in the processing of step S205 of the sheet-sheet template image creation processing (step S301).

次に、パイプライン画像処理部12は、テンプレートテーブルから、ステップS301の処理で選択したブロックに含まれるテンプレート画像(D’画像)と中心アドレスを2組取得する(ステップS302)。   Next, the pipeline image processing unit 12 acquires two sets of the template image (D 'image) and the center address included in the block selected in the processing of step S301 from the template table (step S302).

次に、パイプライン画像処理部12は、ステップS302の処理で取得した一組目の中心アドレスを基準とする予め設定された設定範囲(X方向±64画素、Y方向±128画素の範囲)内を、D画像に対して一組目のD’画像を1画素ずつずらしていき、D画像とD’画像の差分を算出する(ステップS303)。   Next, the pipeline image processing unit 12 sets a predetermined range (a range of ± 64 pixels in the X direction and ± 128 pixels in the Y direction) based on the first set of center addresses acquired in the process of step S302. Is shifted from the D image by one pixel in the first set of D 'images, and the difference between the D image and the D' image is calculated (step S303).

次に、パイプライン画像処理部12は、差分が最小であった位置を特定する(ステップS304)。なお、差分が最小である位置が同じ値で複数ある場合には最も中心アドレスに近い位置を一つ特定する。   Next, the pipeline image processing unit 12 specifies the position where the difference is minimum (Step S304). When there are a plurality of positions having the same value with the smallest difference, one position closest to the center address is specified.

次に、パイプライン画像処理部12は、ステップS302の処理で取得した二組目の中心アドレスを基準とする予め設定された設定範囲(X方向±64画素、Y方向±128画素の範囲)内を、D画像に対して二組目のD’画像を1画素ずつずらしていき、D画像とD’画像の差分を算出する(ステップS305)。   Next, the pipeline image processing unit 12 sets a predetermined range (a range of ± 64 pixels in the X direction and a range of ± 128 pixels in the Y direction) based on the center address of the second set acquired in the process of step S302. Is shifted by one pixel from the D image with respect to the D image, and the difference between the D image and the D 'image is calculated (step S305).

次に、パイプライン画像処理部12は、差分が最小であった位置を特定する(ステップS306)。なお、差分が最小である位置が同じ値で複数ある場合には最も中心アドレスに近い位置を一つ特定する。   Next, the pipeline image processing unit 12 specifies the position where the difference is minimum (Step S306). When there are a plurality of positions having the same value with the smallest difference, one position closest to the center address is specified.

次に、パイプライン画像処理部12は、2つのテンプレート画像(D’画像)についてそれぞれ、ズレ量を算出する(ステップS307)。具体的には、ステップS304の処理で特定した位置と、ステップS302の処理で取得した一組目の中心アドレスの差を一つ目のズレ量(dx1,dy1)として算出し、ステップS306の処理で特定した位置と、ステップS302の処理で取得した二組目の中心アドレスの差を二つ目のズレ量(dx2,dy2)として算出する。   Next, the pipeline image processing unit 12 calculates a shift amount for each of the two template images (D 'images) (step S307). Specifically, the difference between the position specified in the process of step S304 and the center address of the first set acquired in the process of step S302 is calculated as the first shift amount (dx1, dy1), and the process of step S306 is performed. Then, the difference between the position specified in and the second set of center addresses acquired in the processing of step S302 is calculated as the second shift amount (dx2, dy2).

次に、パイプライン画像処理部12は、ステップS307の処理で算出した2つのズレ量の平均値をそのブロックのズレ量(dx,dy)として決定する(ステップS308)。なお、決定したズレ量は、当該ブロックの識別情報(例えば、ブロックID)と対応付けて記憶させておくものとする。   Next, the pipeline image processing unit 12 determines the average value of the two shift amounts calculated in the process of step S307 as the shift amount (dx, dy) of the block (step S308). Note that the determined shift amount is stored in association with identification information (for example, block ID) of the block.

次に、パイプライン画像処理部12は、全ての「テンプレート有りブロック」を選択したか否かを判定する(ステップS309)。このとき、パイプライン画像処理部12は、全ての「テンプレート有りブロック」を選択していないと判定した場合には(ステップS309:NO)、ステップS301の処理に移行し、それまでに選択していない一の「テンプレート有りブロック」を選択する。そして、全ての「テンプレート有りブロック」を選択するまで、ステップS301〜ステップS309の処理を繰り返す。一方、パイプライン画像処理部12は、全ての「テンプレート有りブロック」を選択したと判定した場合には(ステップS309:YES)、枚葉紙・テンプレート有りブロック処理を終了し、枚葉紙・ズレ量算出処理に戻る。   Next, the pipeline image processing unit 12 determines whether or not all “blocks with template” have been selected (Step S309). At this time, if it is determined that all the “blocks with template” have not been selected (step S309: NO), the pipeline image processing unit 12 proceeds to the process of step S301, and has selected it. One of the "blocks with template" is selected. Then, the processing of steps S301 to S309 is repeated until all "blocks with template" are selected. On the other hand, if it is determined that all “blocks with template” have been selected (step S309: YES), the pipeline image processing unit 12 ends the sheet / template block processing and returns to sheet / shift. The process returns to the amount calculation process.

以上説明したように、第1実施形態及び第2実施形態の検査装置T(「特徴画像生成装置」の一例)は、パイプライン画像処理部12(「エッジ抽出部」、「二値化部」、「第1合成部」、「交点取得部」、「第2合成部」、「切り出し画像生成部」、「特徴画像生成部」の一例)が、基準画像からエッジを抽出したA画像(「エッジ画像」の一例)を生成し、A画像を階調b(「第1の階調」の一例)で二値化したC画像(「第1二値化画像」の一例)と、エッジ画像を階調bよりも低い階調a(「第2の階調」の一例)で二値化したB画像(「第2二値化画像」の一例)と、エッジ画像を階調aと階調bの中間の階調で二値化したD画像(「第3二値化画像」の一例)と、を生成し、C画像から水平の直線を抽出したC1画像(「第1水平画像」の一例)と、C画像から垂直の直線を抽出したC2画像(「第1垂直画像」の一例)を合成し、C3画像(「第1合成画像」の一例)を生成し、C3画像における水平の直線と垂直の直線のXYアドレス(「交点座標」の一例)を取得し、B画像から水平の直線を抽出したB1画像(「第2水平画像」の一例)と、B画像から垂直の直線を抽出したB2画像(「第2垂直画像」の一例)を合成し、B3画像(「第2合成画像」の一例)を生成し、C3画像及びB3画像からXYアドレスを含む画像を切り出して、それぞれC’画像(「第1切り出し画像」の一例)及びB’画像(「第2切り出し画像」の一例)を生成し、C’画像とB’画像の差分画素数が1画素から8画素の範囲内である場合(「所定の条件を満たす場合」の一例)に、D画像からXYアドレスを含む画像を切り出したテンプレート画像(D’画像。「特徴画像」の一例)を生成する。   As described above, the inspection device T (an example of a “feature image generation device”) of the first embodiment and the second embodiment includes the pipeline image processing unit 12 (“edge extraction unit”, “binarization unit”). , The “first combining unit”, the “intersection acquisition unit”, the “second combining unit”, the “cut-out image generating unit”, and the “feature image generating unit” are examples), and the A image (““ C image (an example of a “first binarized image”) in which an A image is generated, and the A image is binarized with a gray level b (an example of a “first gray level”); Image (an example of a “second binarized image”) obtained by binarizing an image with a gradation a (an example of a “second gradation”) lower than the gradation b, and an edge image A D image (an example of a “third binarized image”) binarized at an intermediate gradation of the tone b, and a C1 image (“first water”) obtained by extracting a horizontal straight line from the C image Image) and a C2 image (an example of a “first vertical image”) obtained by extracting a vertical straight line from the C image to generate a C3 image (an example of a “first synthesized image”). XY addresses (an example of “intersection coordinates”) of a horizontal straight line and a vertical straight line are obtained, and a B1 image (an example of a “second horizontal image”) obtained by extracting a horizontal straight line from the B image and a vertical line from the B image B2 image (an example of a “second vertical image”) obtained by extracting the straight line of “1”, a B3 image (an example of a “second synthesized image”) is generated, and an image including an XY address is cut out from the C3 image and the B3 image. To generate a C ′ image (an example of a “first clipped image”) and a B ′ image (an example of a “second clipped image”), respectively. When the pixel is within the range of the pixel (an example of “when the predetermined condition is satisfied”) To generate a template image cut out an image including an XY address from D images (D 'image. An example of the "feature image").

したがって、検査装置Tによれば、基準画像からエッジを抽出したA画像を、階調bで二値化した画像から得られたC’画像と、エッジ画像を階調aで二値化した画像から得られたB’画像の差分画素数が1画素から8画素の範囲内である場合に、A画像を階調aと階調bの中間の階調で二値化したD画像から同じ位置を切り出してテンプレート画像(D’画像)とすることから、基準画像と比較する比較画像のエッジ画像における階調が階調bと階調aの間であれば、基準画像と被検査画像の位置合わせを行うことができる。すなわち、高解像度の基準画像と被検査画像の位置合わせを行うためのマッチングに用いるテンプレート画像(D’画像)を基準画像から適切に生成することができる。   Therefore, according to the inspection device T, the C ′ image obtained from the image obtained by binarizing the A image obtained by extracting the edge from the reference image with the gradation b and the image obtained by binarizing the edge image with the gradation a Is the same position from the D image obtained by binarizing the A image with a gray level between the gray level a and the gray level b when the difference pixel number of the B ′ image obtained from is within the range of 1 pixel to 8 pixels. Is cut out as a template image (D ′ image), and if the gradation in the edge image of the comparison image to be compared with the reference image is between gradation b and gradation a, the positions of the reference image and the image to be inspected are Matching can be performed. That is, a template image (D 'image) used for matching for aligning the high-resolution reference image and the image to be inspected can be appropriately generated from the reference image.

このように、階調aと階調bで二値化した画像(B画像とC画像)の双方で検出されるエッジに基づいてテンプレート画像(D’画像)を生成することから、被検査画像全体の階調が印刷過程で低下するなどの変化があっても、テンプレート画像を生成する際の基となったエッジはその階調が階調a〜bの範囲内で変化する分には検出可能となるため位置補正を行うことができる。すなわち、階調a〜bの範囲内でエッジ部の階調変化があっても適切に位置合わせが行われることが保証される。仮に1つの階調で二値化した画像で検出されるエッジに基づいてテンプレート画像を生成した場合、当該エッジが何れの階調の範囲で検出可能かが不明であり、印刷過程で当該エッジの階調が検出不可能な階調に変化にすると突然に位置合わせを行うことができなくなり、検査を停止せざるを得なくなる。   As described above, since the template image (D ′ image) is generated based on the edges detected in both the image (B image and C image) binarized by the gradation a and the gradation b, Even if there is a change such as a decrease in the overall gradation during the printing process, the edge on which the template image is generated is detected when the gradation changes within the range of gradations a and b. Since it becomes possible, position correction can be performed. In other words, it is guaranteed that proper alignment is performed even if there is a gradation change in the edge portion within the range of gradations a and b. If a template image is generated based on an edge detected in an image binarized by one gradation, it is not known in which gradation range the edge can be detected, and during the printing process, the edge is not detected. If the gray level changes to an undetectable gray level, alignment cannot be performed suddenly, and the inspection must be stopped.

なお、検査装置Tのパイプライン画像処理部12は、基準画像からエッジを抽出したA画像を生成し、A画像を階調bで二値化したC画像と、エッジ画像を階調bよりも低い階調aで二値化したB画像と、エッジ画像を階調aと階調bの間の階調で二値化したD画像と、を生成し、C画像における水平の直線と垂直の直線のXYアドレス(「交点座標」の一例)を取得し、C画像及びB画像からXYアドレスを含む画像を切り出して、それぞれC’画像(「第1切り出し画像」の一例)及びB’画像(「第2切り出し画像」の一例)を生成し、C’画像とB’画像の差分画素数が1画素から8画素の範囲内である場合(「所定の条件を満たす場合」の一例)に、D画像からXYアドレスを含む画像を切り出したテンプレート画像(D’画像。「特徴画像」の一例)を生成することとしてもよい。   Note that the pipeline image processing unit 12 of the inspection apparatus T generates an A image in which edges are extracted from the reference image, and a C image obtained by binarizing the A image with the gradation b and an edge image with a gradation b A B image binarized with a low gradation a and a D image obtained by binarizing an edge image with a gradation between the gradation a and the gradation b are generated, and a horizontal straight line and a vertical An XY address (an example of “intersection coordinates”) of a straight line is obtained, an image including the XY address is cut out from the C image and the B image, and a C ′ image (an example of the “first cut image”) and a B ′ image ( An example of the “second clipped image” is generated, and when the number of difference pixels between the C ′ image and the B ′ image is within the range of 1 to 8 pixels (an example of “when the predetermined condition is satisfied”), A template image (D ′ image obtained by cutting out an image including XY addresses from the D image. It may be generated an example) of a feature image. "

また、第1実施形態及び第2実施形態の検査装置Tは、パイプライン画像処理部12(「分割部」の一例)が基準画像を複数ブロックに分割し、ブロック毎にテンプレート画像(D’画像)を生成する。これにより、基準画像と被検査画像についてブロック毎にズレ量を算出することができ、延いてはブロック毎に位置合わせを行うことができる。   In the inspection apparatuses T of the first and second embodiments, the pipeline image processing unit 12 (an example of a “division unit”) divides a reference image into a plurality of blocks, and generates a template image (D ′ image) for each block. ). This makes it possible to calculate the amount of deviation for each block between the reference image and the image to be inspected, and thus to perform alignment for each block.

更に、第1実施形態の検査装置Tは、パイプライン画像処理部12が、基準画像が連続シートを長手方向に沿って搬送している際に当該連続シートの一部を撮影した画像である場合に、一のブロックに対して一つのテンプレート画像(D’画像)を生成する。   Further, in the inspection device T of the first embodiment, when the pipeline image processing unit 12 captures a part of the continuous sheet while the reference image is transporting the continuous sheet along the longitudinal direction, Next, one template image (D ′ image) is generated for one block.

更にまた、第2実施形態の検査装置Tは、パイプライン画像処理部12が、基準画像が枚葉紙(「カットシート」の一例)を撮影した画像である場合に、一のブロックに対して二つのテンプレート画像(D’画像)を生成する。枚葉紙を印刷後に撮像する場合、枚葉紙は縦方向、横方向、回転方向に不規則にズレるが、第2実施形態の検査装置Tによれば、一ブロック当たり2枚のテンプレート画像によりズレ量を算出することから、高精度に位置合わせをすることができる。   Furthermore, in the inspection device T of the second embodiment, when the pipeline image processing unit 12 captures a sheet (an example of a “cut sheet”), Two template images (D 'images) are generated. When an image is taken after printing a sheet, the sheet is irregularly displaced in the vertical, horizontal, and rotational directions. However, according to the inspection apparatus T of the second embodiment, two template images per block are used. By calculating the amount of displacement, it is possible to perform positioning with high accuracy.

更にまた、第1実施形態及び第2実施形態の検査装置Tは、パイプライン画像処理部12(「判定部」の一例)が、D画像におけるXYアドレスを基準とするテンプレート検証範囲(「検証領域内」の一例)を、テンプレート画像(D’画像)を移動させつつD画像と比較し、XYアドレス以外の位置で一致する場合に、テンプレート画像(D’画像)を不適切なテンプレート画像(D’画像)と判定する。これにより、その周囲(テンプレート検証範囲内)に類似する図柄(特徴)のない画像をテンプレート画像(D’画像)として採用することができる。   Furthermore, in the inspection apparatus T of the first embodiment and the second embodiment, the pipeline image processing unit 12 (an example of the “determination unit”) uses the template verification range (“verification area”) based on the XY address in the D image. “In” is compared with the D image while moving the template image (D ′ image), and when the template image (D ′ image) matches at a position other than the XY address, the template image (D ′ image) 'Image). As a result, an image without a pattern (feature) similar to the surroundings (within the template verification range) can be adopted as the template image (D 'image).

なお、印刷物の検査のために行う画像比較処理に限らず、様々な目的で画像比較処理を行うに当たり、一方の画像に歪み、伸び・縮み、回転等が生じるなどの理由から適切に比較を行うことができない場合に、両画像の位置合わせを行うために本発明のズレ量算出処理を利用することができる。   In addition to the image comparison processing performed for inspecting the printed matter, when performing the image comparison processing for various purposes, appropriate comparison is performed because one of the images is distorted, stretched / shrinked, rotated, or the like. If it is not possible, the deviation amount calculation processing of the present invention can be used to align the two images.

また、第1実施形態及び第2実施形態において階調aと階調bの真ん中の階調((a+b)/2)で二値化した画像(D画像)に基づいてテンプレート画像(D’画像)を生成することとしたが、必ずしも真ん中の階調で二値化した画像に基づいてテンプレート画像を生成しなくてもよい。テンプレート画像を切り出す画像(D画像)は、真ん中の階調より高低にずらした階調で二値化した画像であってもよいし、印刷過程で被検査画像の階調が低下することが想定されるのであれば、真ん中よりも高めの階調で二値化した画像であってもよい。   In addition, the template image (D ′ image) based on the image (D image) binarized by the middle gradation ((a + b) / 2) of the gradation a and the gradation b in the first embodiment and the second embodiment. ) Is generated, but it is not always necessary to generate the template image based on the binarized image at the middle gradation. The image (D image) from which the template image is cut out may be an image binarized with a gray level shifted higher or lower than the middle gray level, or the gray level of the image to be inspected may decrease during the printing process. If so, the image may be a binarized image with a higher gradation than the middle.

T 検査装置
11 システムコントローラ
12 パイプライン画像処理部
13 並列画像処理部
14 表カメラ分岐ボード
15 裏カメラ分岐ボード
16 エンコーダ分岐ボード
17 HUB
31A 表面カメラ
31B 裏面カメラ
32A 表面照明
32B 裏面照明
33 エンコーダ
S オフセット輪転印刷機
U1−U4 印刷ユニット
U5 乾燥機
U6 折り機
T inspection apparatus 11 system controller 12 pipeline image processing unit 13 parallel image processing unit 14 front camera branch board 15 back camera branch board 16 encoder branch board 17 HUB
31A Front camera 31B Back camera 32A Front illumination 32B Back illumination 33 Encoder S Offset rotary printing press U1-U4 Printing unit U5 Dryer U6 Folding machine

Claims (10)

基準画像からエッジを抽出したエッジ画像を生成するエッジ抽出部と、
前記エッジ画像を第1の階調で二値化した第1二値化画像と、前記エッジ画像を前記第1の階調よりも低い第2の階調で二値化した第2二値化画像と、前記エッジ画像を前記第1の階調と前記第2の階調の間の第3の階調で二値化した第3二値化画像と、を生成する二値化部と、
前記第1二値化画像における水平の直線と垂直の直線の交点座標を取得する交点取得部と、
前記第1二値化画像及び前記第2二値化画像から前記交点座標を含む画像を切り出して、それぞれ第1切り出し画像及び第2切り出し画像を生成する切り出し画像生成部と、
前記第1切り出し画像と第2切り出し画像の差分画素数が所定の条件を満たす場合に、前記第3二値化画像から前記交点座標を含む画像を切り出した特徴画像を生成する特徴画像生成部と、
を備えることを特徴とする特徴画像生成装置。
An edge extraction unit that generates an edge image obtained by extracting an edge from the reference image,
A first binarized image obtained by binarizing the edge image with a first gradation, and a second binarized image obtained by binarizing the edge image with a second gradation lower than the first gradation A binarizing unit configured to generate an image and a third binarized image obtained by binarizing the edge image with a third gradation between the first gradation and the second gradation;
An intersection acquisition unit that acquires intersection coordinates of a horizontal straight line and a vertical straight line in the first binarized image;
A cutout image generation unit that cuts out an image including the intersection coordinates from the first binarized image and the second binarized image, and generates a first cutout image and a second cutout image, respectively;
A feature image generating unit configured to generate a feature image obtained by cutting out an image including the intersection coordinates from the third binarized image when a difference pixel number between the first cutout image and the second cutout image satisfies a predetermined condition; ,
A characteristic image generating apparatus comprising:
請求項1に記載の特徴画像生成装置であって、
前記第1二値化画像から水平の直線を抽出した第1水平画像と、前記第1二値化画像から垂直の直線を抽出した第1垂直画像を合成し、第1合成画像を生成する第1合成部と、
前記第2二値化画像から水平の直線を抽出した第2水平画像と、前記第2二値化画像から垂直の直線を抽出した第2垂直画像を合成し、第2合成画像を生成する第2合成部と、
を更に備え、
前記交点取得部は、
前記第1二値化画像から生成された前記第1合成画像に基づいて、前記交点座標を取得し、
前記切り出し画像生成部は、
前記第1二値化画像から生成された前記第1合成画像及び前記第2二値化画像から生成された前記第2合成画像から、それぞれ前記第1切り出し画像及び前記第2切り出し画像を生成することを特徴とする特徴画像生成装置。
The feature image generation device according to claim 1,
A first horizontal image obtained by extracting a horizontal straight line from the first binary image and a first vertical image obtained by extracting a vertical straight line from the first binary image are combined to generate a first combined image. 1 synthesis unit,
A second horizontal image obtained by extracting a horizontal straight line from the second binary image and a second vertical image obtained by extracting a vertical straight line from the second binary image are combined to generate a second combined image. 2 synthesis unit,
Further comprising
The intersection obtaining unit,
Acquiring the intersection coordinates based on the first combined image generated from the first binarized image;
The cut-out image generation unit,
The first cutout image and the second cutout image are generated from the first combined image generated from the first binary image and the second combined image generated from the second binary image, respectively. A feature image generation device characterized by the above-mentioned.
請求項2に記載の特徴画像生成装置であって、
前記第1合成部は、前記第1二値化画像から水平の直線を抽出し、水平方向に拡大させた前記第1水平画像と、前記第1二値化画像から垂直の直線を抽出し、垂直方向に拡大させた前記第1垂直画像を合成し、前記第1合成画像を生成し、
前記第2合成部は、前記第2二値化画像から水平の直線を抽出し、水平方向に拡大させた前記第2水平画像と、前記第2二値化画像から垂直の直線を抽出し、垂直方向に拡大させた前記第2垂直画像を合成し、前記第2合成画像を生成することを特徴とする特徴画像生成装置。
The characteristic image generation device according to claim 2,
The first synthesizing unit extracts a horizontal straight line from the first binary image, extracts the first horizontal image enlarged in the horizontal direction, and extracts a vertical straight line from the first binary image, Combining the first vertical image enlarged in the vertical direction to generate the first combined image;
The second synthesizing unit extracts a horizontal straight line from the second binary image, extracts the second horizontal image enlarged in the horizontal direction, and extracts a vertical straight line from the second binary image. A characteristic image generation apparatus, wherein the second vertical image enlarged in the vertical direction is synthesized to generate the second synthesized image.
請求項1乃至3の何れか一項に記載の特徴画像生成装置であって、
前記基準画像を複数のブロックに分割する分割部を更に備え
記特徴画像生成部は、前記差分画素数が前記所定の条件を満たす前記第1切り出し画像及び第2切り出し画像を切り出した際の前記交点座標を含む前記ブロックについて前記特徴画像を生成することを特徴とする特徴画像生成装置。
It is a characteristic image generation device according to any one of claims 1 to 3,
The image processing apparatus further includes a dividing unit that divides the reference image into a plurality of blocks ,
Prior Symbol feature image generating unit, said speed difference pixels to generate the feature image for the block including the intersection coordinates at the time of cutting out the predetermined condition is satisfied the first cut-out image and the second cut-out image A feature image generation device to be characterized.
請求項4に記載の特徴画像生成装置であって、
前記基準画像が連続シートを長手方向に沿って搬送している際に当該連続シートの一部を撮影した画像である場合に、一の前記ブロックに対して一つの特徴画像を生成することを特徴とする特徴画像生成装置。
The feature image generation device according to claim 4, wherein
When the reference image is an image obtained by photographing a part of the continuous sheet while the continuous sheet is being conveyed along the longitudinal direction, one feature image is generated for one block. Characteristic image generation device.
請求項4に記載の特徴画像生成装置であって、
前記基準画像が連続シートを枚葉単位に切断したカットシートを撮影した画像である場合に、一の前記ブロックに対して二つの特徴画像を生成することを特徴とする特徴画像生成装置。
The feature image generation device according to claim 4, wherein
A feature image generating apparatus, wherein, when the reference image is an image obtained by photographing a cut sheet obtained by cutting a continuous sheet into individual sheets, two feature images are generated for one block.
請求項1乃至6の何れか一項に記載の特徴画像生成装置であって、
前記第3二値化画像における前記交点座標を基準とする検証領域内を、前記特徴画像を移動させつつ第3二値化画像と比較し、前記交点座標以外で一致する場合に、当該特徴画像を不適切な特徴画像と判定する判定部を更に備えることを特徴とする特徴画像生成装置。
The characteristic image generation device according to claim 1, wherein:
In the verification area based on the intersection coordinates in the third binary image, the feature image is compared with the third binary image while moving the feature image. A characteristic image generating apparatus, further comprising: a determining unit that determines a characteristic image as an inappropriate characteristic image.
請求項1乃至7の何れか一項に記載の特徴画像生成装置が作成した前記特徴画像を用いて被検査画像の位置補正を行い、前記基準画像と当該被検査画像の比較検査を行う検査装置であって、
前記被検査画像における前記特徴画像に対応する座標を特定し、前記交点取得部が取得した前記交点座標との差であるズレ量を算出するズレ量算出部と、
前記ズレ量に基づいて前記被検査画像の位置補正を行う位置補正部と、
前記位置補正が行われた前記被検査画像と前記基準画像とを比較する比較部と、
を備えることを特徴とする検査装置。
An inspection device that performs position correction of an inspection image using the characteristic image created by the characteristic image generation device according to any one of claims 1 to 7, and performs a comparative inspection between the reference image and the inspection image. And
A deviation amount calculation unit that specifies coordinates corresponding to the feature image in the inspection image and calculates a deviation amount that is a difference from the intersection coordinates acquired by the intersection acquisition unit.
A position correction unit that performs position correction of the image to be inspected based on the displacement amount;
A comparing unit that compares the inspected image and the reference image subjected to the position correction,
An inspection apparatus comprising:
基準画像からエッジを抽出したエッジ画像を生成するエッジ抽出工程と、
前記エッジ画像を第1の階調で二値化した第1二値化画像と、前記エッジ画像を前記第1の階調よりも低い第2の階調で二値化した第2二値化画像と、前記エッジ画像を前記第1の階調と前記第2の階調の間の第3の階調で二値化した第3二値化画像と、を生成する二値化工程と、
前記第1二値化画像における水平の直線と垂直の直線の交点座標を取得する交点取得工程と、
前記第1二値化画像及び前記第2二値化画像から前記交点座標を含む画像を切り出して、それぞれ第1切り出し画像及び第2切り出し画像を生成する切り出し画像生成工程と、
前記第1切り出し画像と第2切り出し画像の差分画素数が所定の条件を満たす場合に、前記第3二値化画像から前記交点座標を含む画像を切り出した特徴画像を生成する特徴画像生成工程と、
を含むことを特徴とする特徴画像生成方法。
An edge extraction step of generating an edge image obtained by extracting an edge from the reference image,
A first binarized image obtained by binarizing the edge image with a first gradation, and a second binarized image obtained by binarizing the edge image with a second gradation lower than the first gradation A binarization step of generating an image and a third binarized image obtained by binarizing the edge image with a third gradation between the first gradation and the second gradation;
An intersection acquisition step of acquiring intersection coordinates of a horizontal straight line and a vertical straight line in the first binarized image;
A cutout image generation step of cutting out an image including the intersection coordinates from the first binarized image and the second binarized image to generate a first cutout image and a second cutout image, respectively;
A feature image generating step of generating a feature image obtained by cutting out an image including the intersection coordinates from the third binarized image when a difference pixel number between the first cutout image and the second cutout image satisfies a predetermined condition; ,
A feature image generation method characterized by including:
コンピュータを、
基準画像からエッジを抽出したエッジ画像を生成するエッジ抽出部、
前記エッジ画像を第1の階調で二値化した第1二値化画像と、前記エッジ画像を前記第1の階調よりも低い第2の階調で二値化した第2二値化画像と、前記エッジ画像を前記第1の階調と前記第2の階調の間の第3の階調で二値化した第3二値化画像と、を生成する二値化部、
前記第1二値化画像における水平の直線と垂直の直線の交点座標を取得する交点取得部、
前記第1二値化画像及び前記第2二値化画像から前記交点座標を含む画像を切り出して、それぞれ第1切り出し画像及び第2切り出し画像を生成する切り出し画像生成部、
前記第1切り出し画像と第2切り出し画像の差分画素数が所定の条件を満たす場合に、前記第3二値化画像から前記交点座標を含む画像を切り出した特徴画像を生成する特徴画像生成部、
として機能させることを特徴とする特徴画像生成プログラム。
Computer
An edge extraction unit that generates an edge image obtained by extracting an edge from the reference image,
A first binarized image obtained by binarizing the edge image with a first gradation, and a second binarized image obtained by binarizing the edge image with a second gradation lower than the first gradation A binarization unit that generates an image and a third binarized image obtained by binarizing the edge image with a third gradation between the first gradation and the second gradation;
An intersection acquisition unit for acquiring intersection coordinates of a horizontal straight line and a vertical straight line in the first binarized image;
A cutout image generation unit that cuts out an image including the intersection coordinates from the first binarized image and the second binarized image, and generates a first cutout image and a second cutout image, respectively;
A feature image generation unit configured to generate a feature image obtained by cutting out an image including the intersection coordinates from the third binarized image when a difference pixel number between the first cutout image and the second cutout image satisfies a predetermined condition;
A feature image generation program characterized by functioning as:
JP2018158436A 2017-10-02 2018-08-27 Feature image generation device, inspection device, feature image generation method, and feature image generation program Active JP6665903B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017193033 2017-10-02
JP2017193033 2017-10-02

Publications (2)

Publication Number Publication Date
JP2019067373A JP2019067373A (en) 2019-04-25
JP6665903B2 true JP6665903B2 (en) 2020-03-13

Family

ID=66340625

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018158436A Active JP6665903B2 (en) 2017-10-02 2018-08-27 Feature image generation device, inspection device, feature image generation method, and feature image generation program

Country Status (1)

Country Link
JP (1) JP6665903B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111062941B (en) * 2019-12-31 2024-04-19 深圳爱克莱特科技股份有限公司 Point light source fault detection device and method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3313474B2 (en) * 1993-09-24 2002-08-12 株式会社東芝 Print inspection equipment
JP3018878B2 (en) * 1993-12-20 2000-03-13 凸版印刷株式会社 Picture inspection equipment
JP2006090921A (en) * 2004-09-27 2006-04-06 Sharp Corp Visual examination device, threshold determining method visual examination method and program for functionalizing computer as visual examination device
JP2007026255A (en) * 2005-07-20 2007-02-01 East Japan Railway Co Method for extracting progress of defective point inside image

Also Published As

Publication number Publication date
JP2019067373A (en) 2019-04-25

Similar Documents

Publication Publication Date Title
US6874420B2 (en) System and method for register mark recognition
JP4407588B2 (en) Inspection method and inspection system
US5652804A (en) Automatic inspection of printing plates or cylinders
JP7150530B2 (en) Automatic image sensor calibration
JP4750047B2 (en) Misalignment detection apparatus, misalignment detection method, misalignment detection program, and recording medium
JP2015189216A (en) Inspection apparatus and inspection method
US9256931B2 (en) Method for inspecting at least one copy of a printed product
JP6180674B1 (en) Image inspection method with multiple cameras
CN110293753B (en) Method for image detection of printed products by means of a computer
JP7350637B2 (en) High-speed image distortion correction for image inspection
JP2007168449A (en) Method for creating reference model designed to be used for automatically checking print quality of image on paper sheet
JP2008008841A (en) Printed matter inspection method and printed matter inspection system
JP6665903B2 (en) Feature image generation device, inspection device, feature image generation method, and feature image generation program
CN113615160B (en) Multi-camera imaging system using laser lines
US11135833B2 (en) Method for verifying a printing plate, specifically a gravure cylinder
JP7037173B2 (en) Quality inspection equipment for corrugated cardboard sheets
JP5710101B2 (en) Printed matter inspection apparatus and printed matter inspection method
JP3433331B2 (en) Image inspection method and apparatus
JP3204876B2 (en) Print inspection equipment
JP2516606B2 (en) Print quality inspection device
KR100421266B1 (en) Automatic evaluation method by optoelectronic device
JPH09226098A (en) Print check method, device therefor and monitoring device for print check device
JPH07186375A (en) Inspection method for printed matter
JP2020183889A (en) Printed matter inspection device
JP2008162109A (en) Reference image forming device and reference image forming method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180827

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190815

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190820

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191002

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200121

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200203

R150 Certificate of patent or registration of utility model

Ref document number: 6665903

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150