JPH09330412A - Picture inspecting method and its device - Google Patents

Picture inspecting method and its device

Info

Publication number
JPH09330412A
JPH09330412A JP8171629A JP17162996A JPH09330412A JP H09330412 A JPH09330412 A JP H09330412A JP 8171629 A JP8171629 A JP 8171629A JP 17162996 A JP17162996 A JP 17162996A JP H09330412 A JPH09330412 A JP H09330412A
Authority
JP
Japan
Prior art keywords
line segment
image
positional deviation
value
inspection
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.)
Pending
Application number
JP8171629A
Other languages
Japanese (ja)
Inventor
Masashi Nishida
真史 西田
Hiroshi Sato
博 佐藤
Hideto Sakata
英人 坂田
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
Priority to JP8171629A priority Critical patent/JPH09330412A/en
Publication of JPH09330412A publication Critical patent/JPH09330412A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a picture inspecting method and a device applying the method, by which a picture inspection can be performed by reliably correcting positional deviation a short time with respect to wide inspecting conditions and inspecting object. SOLUTION: As a method for evaluating the coincidence between a line segment of a reference picture and that on an inspecting objective picture, a correlation coefficient, the sum of the absolute values of differences and the sum of the square value of differences are used. An area for evaluating coincidence between a line segment on the reference picture and that on an inspecting objective picture is an area of a prescribed width with a line segment of maximum coincident in a center, which is obtained by last evaluation. In addition, the position of at least a line segment referred to in order to evaluate the coincidence of a line segment in a direction to be processed first is corrected based on the positional deviation quantity of a direction orthogonal to that of last time. In addition, in a method respectively calculating the positional deviation quantity by the combination of plural line segments and making its intermediate value a final positional deviation quantity, a positional deviation quantity.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、基準画像と検査対象画
像との位置ずれ補正を行って、両者を比較して検査する
画像検査方法および装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image inspection method and apparatus for correcting a positional shift between a reference image and an image to be inspected, and comparing and inspecting the images.

【0002】[0002]

【従来の技術】印刷物の不良には、印刷用紙の皺、異
物、汚れ等の欠陥によるもの、印刷中に発生する、イン
キ汚れ、ヒッキー、ドクター筋、濃度不良、色調不良
等、様々なものがある。従来、印刷物の検査は、人間に
よって行われる目視検査が主体であり、例えば、枚葉印
刷機、あるいは輪転印刷機の折ユニットから排出される
印刷後の印刷物においては、印刷機のオペレータが適時
抜き取って、目視による検査を行っていた。また、連続
した印刷物が印刷機より排出され抜き取りの行えない場
合は、印刷物の走行速度に同期させて瞬間発光するスト
ロボ光を印刷物に照射し、人間の目の残像を利用して静
止状態とし印刷物の目視検査を行っていた。
2. Description of the Related Art Defects in printed matter are caused by defects such as wrinkles, foreign substances, and stains on printing paper, ink stains, hickies, doctor streaks, poor density, poor color tone, etc. that occur during printing. is there. Conventionally, the inspection of the printed matter is mainly a visual inspection performed by a human.For example, in the case of the printed matter discharged from the folding unit of the sheet-fed printing press or the rotary printing press, the operator of the printing press pulls it out at a proper time. Then, a visual inspection was performed. If continuous printed matter is ejected from the printing machine and cannot be extracted, the printed matter is irradiated with strobe light that instantaneously emits light in synchronization with the running speed of the printed matter, and the afterimage of the human eye is used to stop the printed matter. Was being visually inspected.

【0003】目視検査は検査する人間に対する作業負荷
が非常に大きく、また人間が行うため不良の見逃しが避
けられないものである。そこで、印刷物検査を自動的に
行う提案がなされ様々な技術が開示されている。例え
ば、特公平1−47823には、正常な印刷物が印刷さ
れた時点で走行印刷物の絵柄から読み取った画像データ
を基準画像データとして画像メモリに記憶しておき、そ
の画像メモリから読み出した基準画像データを、印刷中
の検査対象の印刷物の絵柄から読み取った検査対象画像
データと画素単位で比較して印刷の良否判定を行う方式
の印刷物の検査装置に関する技術が開示されている。
The visual inspection imposes a very heavy work load on the person to be inspected, and since it is performed by a person, it is unavoidable to overlook defects. Therefore, various techniques have been disclosed by making a proposal for automatically inspecting a printed matter. For example, in Japanese Examined Patent Publication No. 1-47823, the image data read from the pattern of the running print at the time when the normal printed matter is printed is stored in the image memory as reference image data, and the reference image data read from the image memory is stored. There is disclosed a technique relating to a printed matter inspection apparatus of a system in which the quality of printing is determined by comparing, in pixel units, with the inspection target image data read from the pattern of the printed matter of the inspection target being printed.

【0004】ところが、基準画像データと検査対象画像
データとを画素単位で比較する場合、不良検出の精度を
高めると、印刷物から絵柄を読取る際の両データ間の位
置ずれがわずかである場合でも位置ずれを不良と誤検出
することとなる。そこで、位置ずれを不良と誤検出しな
いようにするためには不良検出の精度をやむおえず低下
させることが必要であり、ある程度の両データ間の位置
ずれを避け得ない場合には要求を満足するに充分な検査
性能が得られなかった。そこで、特公平1−20477
には、検査対象画像データまたは基準画像データを1画
素ずつ印刷物の走行方向に対して左右方向に位置ずれさ
せて、検査対象画像データと基準画像データを比較し、
両データが最も一致したときの両データ間の位置ずれ値
に基づき、位置ずれを補正した上で、検査対象画像デー
タと基準画像データを比較するという技術が開示されて
いる。
However, when the reference image data and the image data to be inspected are compared on a pixel-by-pixel basis, if the accuracy of defect detection is increased, even if there is a slight misalignment between the two data when reading the pattern from the printed matter, the position The deviation is erroneously detected as a defect. Therefore, in order to prevent the misregistration of the misregistration as a defect, it is necessary to lower the accuracy of the defect detection. If the displacement between the two data cannot be avoided to some extent, the requirement is satisfied. Insufficient inspection performance was obtained. Therefore, Japanese Patent Publication No. 1-20477
In, the inspection target image data or the reference image data is displaced by one pixel in the left-right direction with respect to the traveling direction of the printed matter, and the inspection target image data and the reference image data are compared.
A technique is disclosed in which, after the positional deviation is corrected based on the positional deviation value between the two data when the two data are most matched, the inspection target image data and the reference image data are compared.

【0005】[0005]

【発明が達成しようとする課題】しかしながら従来の自
動検査技術における画像の位置ずれ補正の方法は、検査
対象画像データと基準画像データとを比較するという、
データ量の極めて大きい画像データを処理するものであ
るために、膨大な処理時間を要してしまうという問題が
あった。また、その問題に鑑み、本発明者による特開平
7−249122には、処理時間を短くする画像の位置
ずれ補正の方法が開示されている。しかし、この方法に
おいては大きな位置ずれが天地左右方向に同時に起きる
場合や、印刷物の絵柄の内容が補正方法とミスマッチン
グするような場合においては充分な補正精度が得られな
いという問題があった。したがって本発明の目的は、位
置ずれの特殊な傾向や印刷物の絵柄に特殊な内容がある
ような場合においても、処理時間が短く信頼度の高い位
置ずれ補正を行って画像の検査を行うことのできる画像
検査方法およびその方法を適用した装置を提供すること
である。本発明の画像検査方法および装置は、幅広い検
査条件と検査対象に対して適用することができる。
However, in the conventional method for correcting the positional deviation of the image in the automatic inspection technique, the inspection target image data and the reference image data are compared.
There is a problem that an enormous amount of processing time is required because the image data having an extremely large amount of data is processed. Further, in view of the problem, Japanese Patent Laid-Open No. 7-249122 by the present inventor discloses a method for correcting an image position shift that shortens the processing time. However, this method has a problem in that sufficient correction accuracy cannot be obtained when large positional deviations occur simultaneously in the horizontal direction and in the case where the content of the design of the printed matter mismatches the correction method. Therefore, an object of the present invention is to perform an image inspection by performing a highly reliable positional deviation correction with a short processing time even when there is a special tendency of positional deviation or a special content of a printed matter. An object of the present invention is to provide a possible image inspection method and an apparatus to which the method is applied. The image inspection method and apparatus of the present invention can be applied to a wide range of inspection conditions and inspection objects.

【0006】[0006]

【課題を達成するための手段】上記目的を達成するため
に本発明は、基準画像上の線分と検査対象画像上の線分
の一致度を評価する方法として、相関係数、差の絶対値
の和、差の自乗値の和を用いる。また、基準画像上の線
分と検査対象画像上の線分の一致度を評価する領域は前
回の評価によって得られ一致度が最大の線分を中心とし
た所定の幅の領域とする。また、少なくとも最初に処理
する方向の線分の一致度を評価するために参照される線
分の位置は、前回のそれと直交する方向の位置ずれ値に
基づいて修正する。また、複数の線分の組み合わせでそ
れぞれ位置ずれ値を算出し、その中位値を最終的な位置
ずれ値とする方法において、一致度の低い線分に基づく
位置ずれ値は除き、一致度の高い線分に基づく位置ずれ
値の中位値を最終的な位置ずれ値とする。
To achieve the above object, the present invention provides a method of evaluating the degree of coincidence between a line segment on a reference image and a line segment on an image to be inspected. The sum of values and the sum of squared differences are used. Further, the area for evaluating the degree of coincidence between the line segment on the reference image and the line segment on the inspection target image is an area having a predetermined width centered on the line segment having the highest degree of coincidence obtained by the previous evaluation. Further, at least the position of the line segment referred to in order to evaluate the degree of coincidence of the line segment in the first processing direction is corrected based on the position shift value in the direction orthogonal to the previous direction. Further, in the method of calculating the misregistration value for each combination of a plurality of line segments and using the median value as the final misregistration value, the misalignment value based on the line segment with a low degree of coincidence is excluded. The median value of the displacement values based on the high line segment is set as the final displacement value.

【0007】[0007]

【発明の実施の形態】次に本発明について実施の形態に
より説明する。図1は本発明による画像検査方法および
装置における画像検査の処理過程を示すフロー図であ
る。図1に基づいて画像検査の処理過程を説明する。ま
ず、ステップS1において、位置ずれを補正すべき方向
と平行方向の線分に対応する画素列の位置である線分位
置を選択する線分位置選択が行われる。また、前記線分
位置選択手段により選択される前記線分位置を複数とす
ることができる(図4参照)。そうすることにより、後
述のステップにおいてそれら各前記線分位置に対して一
致度の評価数値の高いものについて選択的に位置ずれ値
を得て、それら位置ずれ値の中の中位値の位置ずれ値に
基づいて位置ずれを補正して基準画像と比較して検査対
象画像を検査することができる。これにより位置ずれ補
正精度を向上させることができる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to embodiments. FIG. 1 is a flow chart showing an image inspection process in an image inspection method and apparatus according to the present invention. The process of image inspection will be described with reference to FIG. First, in step S1, line segment position selection is performed to select a line segment position that is a position of a pixel row corresponding to a line segment in a direction parallel to the direction in which the positional deviation is to be corrected. Further, the line segment position selected by the line segment position selecting means may be plural (see FIG. 4). By doing so, in a step described later, a positional deviation value is selectively obtained with respect to each of the line segment positions having a high evaluation value of the degree of coincidence, and the positional deviation of the middle value of the positional deviation values is performed. The inspection target image can be inspected by correcting the positional deviation based on the value and comparing it with the reference image. As a result, the positional deviation correction accuracy can be improved.

【0008】次に、ステップS2において、その線分位
置選択で選択された線分位置の基準画像上の基準画素デ
ータ列を抽出する第1データ抽出が行われる。次に、ス
テップS3において、その線分位置を含みその線分位置
から位置ずれ補正を行う方向に画素単位で位置変化させ
た複数の位置から検査対象画像上の複数の検査対象画素
データ列を抽出する第2データ抽出が行われる。この複
数の検査対象画素データ列が、前記第2データ抽出手段
により抽出される際に参照される前記の線分位置は、そ
の線分に直交する方向の前回の線分位置の位置ずれ値に
基づいて修正される線分位置とすることができる(図
2、図3参照)。位置ずれが累積して最初と今回で選択
された線分位置に大きな位置ずれが生じる場合がある
が、そうすることにより累積がなくなり位置ずれの幅は
小さくなる。したがって、後述のステップにおける位置
ずれの補正精度を向上させることができる。また、この
複数の検査対象画素データ列の範囲は、前回の線分位置
の位置ずれ値に基づいて修正された線分位置を中心とし
て所定の範囲の検査対象画素データ列とすることができ
る(図2参照)。そうすることにより、位置ずれの可能
性のある全範囲について後述の一致度の評価数値を求め
る演算を行う必要がなく、限られた範囲で済ますことが
できるため処理時間が短縮される。
Next, in step S2, the first data extraction for extracting the reference pixel data string on the reference image at the line segment position selected by the line segment position selection is performed. Next, in step S3, a plurality of inspection target pixel data strings on the inspection target image are extracted from a plurality of positions including the line segment position and changed in position in pixel units from the line segment position in the direction in which the displacement correction is performed. The second data extraction is performed. The line segment position referred to when the plurality of inspection target pixel data strings are extracted by the second data extracting means is the displacement value of the previous line segment position in the direction orthogonal to the line segment. The line segment position can be corrected based on the above (see FIGS. 2 and 3). There is a case where a large amount of misalignment occurs between the line segment positions selected at the beginning and this time due to the accumulation of misalignments, but by doing so, the accumulation disappears and the width of the misalignment becomes smaller. Therefore, it is possible to improve the accuracy of positional deviation correction in the steps described below. Further, the range of the plurality of inspection target pixel data strings can be set as an inspection target pixel data string of a predetermined range centered on the line segment position corrected based on the positional deviation value of the previous line segment position ( See FIG. 2). By doing so, it is not necessary to perform the calculation for obtaining the evaluation value of the degree of coincidence, which will be described later, for the entire range in which there is a possibility of misalignment, and the processing can be done within a limited range, thus shortening the processing time.

【0009】次に、ステップS4において、その第1デ
ータ抽出で抽出された基準画素データ列とその第2デー
タ抽出で抽出された複数の検査対象画素データ列とから
一致度を評価する評価数値を得る評価数値演算が行われ
る。この一致度の評価数値としては、相関係数、差の絶
対値の総和、差の自乗の総和のいずれかの値とすること
ができる。評価数値が相関係数の場合には評価数値が
“1”に近いほど一致度が大きく、評価数値が差の絶対
値の総和、差の自乗の総和のいずれかの場合には評価数
値が“0”に近いほど一致度が大きい。
Next, in step S4, an evaluation value for evaluating the degree of coincidence is calculated from the reference pixel data string extracted by the first data extraction and the plurality of inspection object pixel data strings extracted by the second data extraction. The evaluation numerical operation to obtain is performed. The evaluation value of the degree of coincidence may be any one of a correlation coefficient, a sum of absolute differences, and a sum of squared differences. If the evaluation value is a correlation coefficient, the closer the evaluation value is to “1”, the greater the degree of agreement. If the evaluation value is either the sum of the absolute values of the differences or the sum of the squares of the differences, the evaluation value is “ The closer to 0 ", the greater the degree of coincidence.

【0010】なお、前述の相関係数は下記の数1によっ
て演算される。
The above correlation coefficient is calculated by the following equation 1.

【数1】 また、前述の差の絶対値の総和は下記の数2によって演
算される。
[Equation 1] The sum of the absolute values of the differences described above is calculated by the following equation 2.

【数2】 また、前述の差の自乗の総和は下記の数3によって演算
される。
[Equation 2] Further, the sum of squared differences described above is calculated by the following expression 3.

【数3】 (Equation 3)

【0011】次に、ステップS5において、その評価数
値演算過程で得られた評価数値の中で一致度が最大の評
価数値を与える検査対象画素データ列の位置のデータと
前記線分位置のデータから位置ずれ値を得る位置ずれ値
演算が行われる。最後に、ステップS6において、その
位置ずれ値演算過程で得た位置ずれ値に基づいて位置ず
れを補正して基準画像と比較して検査対象画像を検査す
る位置ずれ補正比較が行われる。この画像検査の処理過
程において、二次元の位置ずれ補正を行う場合には、前
記補正すべき方向を2方向とする。第1回目の処理過程
(S1〜S5)において、その2方向の中の1方向につ
いて前記位置ずれ値を得て、その後第2回目の処理過程
(S1〜S5)において、残る1方向について前記位置
ずれ値を得て、それら各前記位置ずれ値に基づいて2方
向に位置ずれを補正して基準画像と比較して検査対象画
像を検査する(S6)ようにする。
Next, in step S5, from the data of the position of the pixel data string to be inspected and the data of the line segment position, which gives the evaluation numerical value with the highest degree of coincidence among the evaluation numerical values obtained in the evaluation numerical value calculation process. A positional deviation value calculation for obtaining the positional deviation value is performed. Finally, in step S6, a positional deviation correction comparison is performed in which the positional deviation is corrected based on the positional deviation value obtained in the positional deviation value calculation process and compared with the reference image to inspect the inspection target image. In the process of this image inspection, when two-dimensional positional deviation correction is performed, the directions to be corrected are two directions. In the first processing step (S1 to S5), the positional deviation value is obtained for one of the two directions, and then in the second processing step (S1 to S5), the position is determined for the remaining one direction. The displacement value is obtained, and the displacement is corrected in two directions based on each of the displacement values and compared with the reference image to inspect the inspection target image (S6).

【0012】図2は位置ずれ値に基づいて修正される線
分位置と、その線分位置を中心とした位置ずれ値を検出
するために一致度を評価する所定の範囲を示す図であ
る。図2において、n,n+1,n+2,n+3,n+
4,n+5は、検査の順番を示している。n番目からn
+5番目の検査における状態が順番を付した下の各図に
より示されている。順番を付した下の各図は画素データ
列を示しており、各図の左側に付された数字は画素のア
ドレスを(相対アドレスとして)示している。また、黒
丸●は線分位置選択が行われる場合において選択される
線分位置(中心位置)を示している。黒丸●の位置が検
査の順番を追って変化しているのは、前回のその線分の
方向と平行する方向の位置ずれ補正値に基づいて選択さ
れる線分位置が補正されていることを示す。
FIG. 2 is a diagram showing a line segment position corrected based on the position shift value and a predetermined range in which the degree of coincidence is evaluated to detect the position shift value centered on the line segment position. In FIG. 2, n, n + 1, n + 2, n + 3, n +
4, n + 5 indicate the order of inspection. nth to n
The status at the + 5th test is illustrated by the figures below, in order. The respective figures in the order given below show pixel data strings, and the numbers attached to the left side of each figure show the addresses of pixels (as relative addresses). A black circle indicates a line segment position (center position) selected when the line segment position is selected. The fact that the position of the black circle changes in the order of inspection indicates that the line segment position selected based on the position shift correction value in the direction parallel to the direction of the previous line segment has been corrected. .

【0013】図2において、黒丸●の位置を中心として
所定の範囲が点線によって示されている。この範囲が位
置ずれ値を検出するために一致度を評価する範囲であ
る。位置ずれの可能性のある範囲は、図2において−3
2〜+32(画像データ列に付された画素のアドレス)
の範囲であり、前回の位置ずれ補正値に基づいて黒丸●
で示す選択される線分位置の補正が行われない場合に
は、位置ずれが累積して最大の位置ずれはこの範囲の境
界となる。しかし、前回の位置ずれ補正値に基づいて黒
丸●で示す選択される線分位置の補正が行われる場合に
は、一度の検査のサイクルで大幅に位置ずれすることは
ないから、一致度を評価する範囲を小幅にするこができ
る。図2に示す画像データ列に対して平行する方向の、
黒丸●の位置を中心とした複数の線分に対する一致度の
評価は、このようにして評価する線分の数を減らすこと
ができ、評価数値演算の処理時間が短縮される。
In FIG. 2, a predetermined range centering on the position of the black circle is indicated by a dotted line. This range is the range in which the degree of coincidence is evaluated to detect the displacement value. The range in which there is a possibility of displacement is -3 in FIG.
2 to +32 (address of pixel attached to image data string)
The black circle is based on the previous misregistration correction value.
If the selected line segment position is not corrected, the positional deviation is accumulated and the maximum positional deviation becomes the boundary of this range. However, if the selected line segment position indicated by the black circle ● is corrected based on the previous misalignment correction value, there is no significant misalignment in one inspection cycle, so the degree of coincidence is evaluated. The range can be narrowed. In the direction parallel to the image data string shown in FIG.
In the evaluation of the degree of coincidence with respect to a plurality of line segments centering on the position of the black circle, it is possible to reduce the number of line segments to be evaluated in this way, and the processing time of the evaluation numerical value calculation is shortened.

【0014】図3は位置ずれ値に基づいて修正される線
分位置と、その線分位置を中心とした検査対象画素デー
タ列について示す図である。天地方向ラインのアドレス
は、一つ前の検査画像における左右方向位置ずれ値によ
って修正する。天地方向のラインアドレスの修正によ
り、紙面が蛇行してもライン上の輝度データ列がある程
度保たれ、位置ずれ補正精度を向上させることができ
る。図2、図3とも主として天地方向(ウェブ移送方向
と平行方向)に適用されるが、特に限定されるものでは
ない。天地方向の位置ずれは版胴最終ユニットとカメラ
位置とのウェブ経路長の変動によって引き起こされ、比
較的位置ずれ値が大きいから図2の方式が有効となる。
また、位置ずれ値の大きい天地方向の位置ずれ補正を左
右補正よりも先に行うため、画像に左右方向の位置ずれ
がある場合、天地方向の位置ずれ補正が不安定となる。
したがって図3の方式が有効となる。左右方向位置ずれ
補正を行うときには、あらかじめ天地方向の位置ずれ値
が判っているのでそれによって検査対象画像の左右方向
線分のアドレスを修正する。したがって図3の方式は必
要ない。なお、図2と図3の方式は選択的に適用する必
要はなく、同時に適用することができる。
FIG. 3 is a diagram showing a line segment position corrected on the basis of the positional deviation value and an inspection target pixel data string centered on the line segment position. The address of the vertical direction line is corrected by the lateral displacement value in the previous inspection image. By correcting the line address in the vertical direction, the luminance data string on the line is maintained to some extent even if the paper surface meanders, and the positional deviation correction accuracy can be improved. 2 and 3 are mainly applied in the vertical direction (the direction parallel to the web transfer direction), but are not particularly limited. The positional deviation in the vertical direction is caused by the variation of the web path length between the plate cylinder final unit and the camera position, and the positional deviation value is relatively large, so the method of FIG. 2 is effective.
In addition, since the top-bottom direction position shift correction with a large position shift value is performed before the left-right correction, when the image has a left-right position shift, the top-bottom direction position shift correction becomes unstable.
Therefore, the method of FIG. 3 is effective. When performing the lateral displacement correction, since the positional displacement value in the vertical direction is known in advance, the address of the lateral line segment of the inspection target image is corrected accordingly. Therefore, the method of FIG. 3 is not necessary. The methods of FIGS. 2 and 3 do not have to be selectively applied and can be applied simultaneously.

【0015】次に、複数組の線分位置で位置ずれ補正を
行う場合について説明する。一方向の位置ずれ補正を行
う場合に、複数組の線分位置を選択しそれぞれに位置ず
れ補正値を演算し、その中位値に基づいて位置ずれ補正
を行うことが行われる。しかし、その場合は一致度が低
い評価数値であるにも係わらず演算が行われて得た不適
性な位置ずれ補正値がその中位値に反映され、位置ずれ
補正精度がその分だけ低下することとなる。本発明にお
いては、一致度の評価数値として、相関係数(正規化相
互相関係数)、差の絶対値の総和、差の自乗の総和にい
ずれかを用いるため、一致度の絶対的な評価数値を得る
ことができる。そこで、一致度の高い評価数値を与える
所定数の線分位置に基づいて演算される位置ずれ補正値
の中位値を、実際の位置ずれ補正に用いる位置ずれ補正
値とする。
Next, a case will be described in which the positional deviation is corrected at a plurality of sets of line segment positions. When performing the positional deviation correction in one direction, a plurality of sets of line segment positions are selected, the positional deviation correction value is calculated for each, and the positional deviation correction is performed based on the median value. However, in that case, an inappropriate misregistration correction value obtained by the calculation is reflected in the middle value despite the evaluation value having a low degree of coincidence, and the misregistration correction accuracy is reduced accordingly. It will be. In the present invention, since any one of the correlation coefficient (normalized cross-correlation coefficient), the sum of the absolute values of the differences, and the sum of the squares of the differences is used as the evaluation value of the coincidence, the absolute evaluation of the coincidence is performed. You can get the numerical value. Therefore, the median value of the positional deviation correction value calculated based on the predetermined number of line segment positions that give the evaluation numerical value with a high degree of coincidence is set as the positional deviation correction value used for the actual positional deviation correction.

【0016】図4は複数組の線分位置についての一致度
の評価数値と位置ずれ補正値を表として示す図である。
図4においてラインNo.1〜5は5組の線分位置の各
々につけた番号である。また、補正値(位置ずれ補正
値)と正規化相関値(相関係数)は各線分位置において
演算された位置ずれ補正値と一致度の評価数値である。
図4に示す一例では、No.2とNo.5のラインは一
致度が低い評価数値であり、不適性であると判定され
る。相関係数の高いものから3つを採用すると、選ばれ
る線分位置はNo.1,No.3,No.4となり、位
置ずれ補正値の中位値は−1であるから、それが実際の
位置ずれ補正に用いる位置ずれ補正値となる。なお、位
置ずれ補正値の中位値の代わりに、一致度が最大の評価
数値を与える位置ずれ補正値を実際の位置ずれ補正に用
いる位置ずれ補正値としても同様の作用効果が得られ
る。
FIG. 4 is a table showing the evaluation values of the degree of coincidence and the positional deviation correction values for a plurality of sets of line segment positions.
In FIG. 4, the line No. 1 to 5 are numbers given to each of the five line segment positions. Further, the correction value (positional deviation correction value) and the normalized correlation value (correlation coefficient) are evaluation numerical values of the positional deviation correction value and the degree of coincidence calculated at each line segment position.
In the example shown in FIG. 2 and No. The line of 5 is an evaluation value with a low degree of coincidence and is determined to be unsuitable. If three of the highest correlation coefficients are adopted, the line segment position selected is No. 1, No. 3, No. Since the median value of the positional deviation correction value is -1, it becomes the positional deviation correction value used for the actual positional deviation correction. Note that, instead of the median value of the misregistration correction value, a similar miscellaneous effect can be obtained by using a misregistration correction value that gives an evaluation numerical value with the highest degree of coincidence as an actual misalignment correction value.

【0017】なお、上述においては基準画像上の線分
が、それに対応する検査対象画像の所定範囲の複数の線
分を順次対比して、所定範囲の全体にわたって一致度の
評価を行うように説明を行ったが、基準画像と検査対象
画像との関係を入れ換えても、位置ずれ補正という意味
においては何ら変わるとことがない。したがって、請求
項を含めて上述における“基準”と“検査対象”との言
葉の入替えを行っても同等の作用効果が得られる。説明
の便宜上、上述のように限定して説明を行ったが本発明
においては、基準画像と検査対象画像との関係は入れ換
えることができ、いずれの場合も本発明に含まれる。た
だし、厳密な意味では全く同等ということではない。そ
の理由は、基準画像上の線分上の画素データには、変化
があることが保証されているが(そのような交点を選択
する)、検査対象画像上の線分上の画素データには、位
置ずれのため変化の存在が保証されていない。したがっ
て、その点においては第1データ抽出における線分位置
は基準画像上で指定するほうが良い。
In the above description, a line segment on the reference image is sequentially compared with a plurality of line segments in a predetermined range of the image to be inspected, and the degree of coincidence is evaluated over the entire predetermined range. However, even if the relationship between the reference image and the image to be inspected is exchanged, there is no change in the meaning of positional deviation correction. Therefore, even if the terms “reference” and “inspection target” are replaced with each other including the claims, the same effect can be obtained. For convenience of description, the description has been limited to the above, but in the present invention, the relationship between the reference image and the inspection target image can be interchanged, and any case is included in the present invention. However, in a strict sense, they are not the same. The reason is that the pixel data on the line segment on the reference image is guaranteed to have a change (select such an intersection), but the pixel data on the line segment on the inspection target image does not change. However, the existence of the change is not guaranteed due to the displacement. Therefore, at that point, it is better to specify the line segment position in the first data extraction on the reference image.

【0018】[0018]

【実施例】図5は、本発明の装置構成の概要を示す模式
図である。図5において、1は印刷ユニット、2は印刷
物、3はガイドローラ、4は照明用の光源、5は撮像用
のカメラユニット、6はカメラユニットを制御するカメ
ラ制御部、7は印刷ユニットの機械的位置(版胴の回転
位置)を検出するロータリーエンコーダ、8はカメラユ
ニットによる撮像で得た画像データの処理を行う印刷物
検査装置の本体である。印刷用紙は印刷ユニット1を通
過し、そこにおいて印刷が行われれて印刷物1となり、
ガイドローラ3によって導かれて、光源4によって照明
される位置に達する。その位置には通常ガイドローラ3
があって、印刷物2の位置が規定されている。その位置
において印刷物2はカメラユニット5によって撮像され
る。カメラユニット5は図5の例では一次元の走査によ
って画像を撮像するリニアセンサーカメラである。
EXAMPLE FIG. 5 is a schematic diagram showing an outline of the apparatus configuration of the present invention. In FIG. 5, 1 is a printing unit, 2 is a printed matter, 3 is a guide roller, 4 is a light source for illumination, 5 is a camera unit for imaging, 6 is a camera control unit for controlling the camera unit, and 7 is a machine of the printing unit. A rotary encoder for detecting a target position (rotational position of the plate cylinder), and 8 is a main body of a printed matter inspection apparatus for processing image data obtained by imaging by a camera unit. The printing paper passes through the printing unit 1, where printing is performed and becomes printed matter 1,
It is guided by the guide roller 3 and reaches a position illuminated by the light source 4. The guide roller 3 is usually in that position.
Therefore, the position of the printed matter 2 is defined. The printed matter 2 is imaged by the camera unit 5 at that position. The camera unit 5 is a linear sensor camera that captures an image by one-dimensional scanning in the example of FIG.

【0019】印刷ユニット1の版胴もしくは版胴と同期
して回転する部分にはロータリーエンコーダ7が設置さ
れており印刷の周期に同期したパルス信号を出力する。
このパルス信号はカメラ制御部6に入力され、カメラ制
御部6は、印刷の周期に同期して印刷物2が所定量走行
する毎にカメラユニット5に撮像開始信号を出力し、カ
メラユニット5の撮像データ、すなわちアナログデータ
を入力し、A/D(analog to digital )変換を行って
ディジタルデータに変換して、印刷物検査装置本体8に
データ転送を行う。このように印刷の周期に同期し、タ
イミングをとって二次元の走査が行われディジタル画像
データが印刷物検査装置本体8に読み込まれる また、このように印刷の周期に同期して撮像されるか
ら、外乱要因、誤差要因がなければ、各印刷の周期で読
み取られる撮像データは、同じ周期タイミングの撮像デ
ータであれば常に同じ印刷絵柄位置の撮像データにな
る。
A rotary encoder 7 is installed in the plate cylinder of the printing unit 1 or in a portion which rotates in synchronization with the plate cylinder, and outputs a pulse signal in synchronization with a printing cycle.
This pulse signal is input to the camera control unit 6, and the camera control unit 6 outputs an imaging start signal to the camera unit 5 every time the printed matter 2 travels a predetermined amount in synchronization with the printing cycle, and the camera unit 5 captures an image. Data, that is, analog data is input, A / D (analog to digital) conversion is performed to convert it into digital data, and the data is transferred to the printed matter inspection apparatus main body 8. In this way, two-dimensional scanning is performed at a timing synchronized with the printing cycle, and digital image data is read into the printed matter inspection apparatus main body 8. Further, since the image is captured in synchronization with the printing cycle in this manner, If there is no disturbance factor or error factor, the imaging data read in each printing cycle will always be the imaging data at the same print pattern position if the imaging data is at the same cycle timing.

【0020】ディジタル画像信号を入力した前記印刷物
検査装置本体8は、良品が印刷されたときの印刷物1の
ディジタル画像データを基準画像としてメモリに格納す
る。そして、それ以降入力されるディジタル画像データ
を検査対象画像データとして、印刷物1の不良が発生し
たか否かの判定を行う。
The printed matter inspection apparatus main body 8 to which the digital image signal is input stores the digital image data of the printed matter 1 when a non-defective product is printed in the memory as a reference image. Then, it is determined whether or not a defect of the printed material 1 has occurred by using the digital image data input thereafter as the inspection target image data.

【0021】図6は、印刷物検査装置本体の構成を示す
ブロック図である。図6において、8は印刷物検査装置
本体、5はカメラユニット、6はカメラ制御部、9は基
準画像データメモリ、10は検査対象画像データメモ
リ、11は基準入力司令入力部、12は位置ずれ検出
部、13は位置ずれ補正比較部、14はパラメータ入力
部である。基準画像データメモリ9および検査対象画像
データメモリ10は、いずれも、印刷物1単位分(印刷
ユニットで行われる1周期分の印刷画面)を少なくとも
記憶できる記憶容量を有している。また基準入力司令入
力部11は、画像検査を始めるにあたって行う基準画像
を撮影し基準画像データメモリ9へデータ入力を行う司
令、そして続いて行う検査対象画像を撮影し検査対象画
像データメモリ10へデータ入力を行う司令の切り換え
を行う。
FIG. 6 is a block diagram showing the structure of the main body of the printed matter inspection apparatus. In FIG. 6, 8 is a printed matter inspection apparatus main body, 5 is a camera unit, 6 is a camera control unit, 9 is a reference image data memory, 10 is an inspection target image data memory, 11 is a reference input command input unit, and 12 is a misregistration detection. Reference numeral 13 is a positional deviation correction comparison unit, and 14 is a parameter input unit. Each of the reference image data memory 9 and the inspection target image data memory 10 has a storage capacity capable of storing at least one unit of printed matter (a printing screen for one cycle performed by the printing unit). Further, the reference input command input unit 11 is a command for taking a reference image to start the image inspection and inputting data to the reference image data memory 9, and then taking an inspection target image to be stored in the inspection target image data memory 10. Switch the command to input.

【0022】基準入力司令入力部11で基準画像データ
の入力が司令されると、図4のセレクタは基準画像デー
タメモリ9に撮像データの入力接続を行うが、このとき
は位置ずれ検出部12、および位置ずれ補正比較部13
は動作しない。一方、基準入力司令入力部11にて検査
対象画像データの入力が司令されると、セレクタは検査
対象画像データメモリへ10に撮像データの入力接続を
行う。そして、位置ずれ検出部12は検査対象画像と基
準画像の位置ずれ検出を行い、その結果の位置ずれ補正
値を位置ずれ補正比較部13へ送る。そして、位置ずれ
補正値を受け取った位置ずれ補正比較部13は、位置ず
れ補正値を考慮して検査対象画像データと基準画像デー
タとの照合比較検査を行う。また、パラメータ入力部1
4は、位置ずれ検出部12、および位置ずれ補正比較部
13で用いられるパラメータを設定するための入力を行
う。パラメータとしては、例えば前記位置ずれ補正比較
部13で検査対象画像データと基準画像データとの比較
を行って、良否判定を行う場合の閾値を入力する。
When the reference input command input unit 11 commands the input of the reference image data, the selector of FIG. 4 connects the image data to the reference image data memory 9, and at this time, the misregistration detection unit 12, And misregistration correction comparison unit 13
Does not work. On the other hand, when the input of the inspection target image data is commanded by the reference input command input unit 11, the selector makes an input connection of the imaging data to the inspection target image data memory 10. Then, the positional deviation detecting unit 12 detects the positional deviation between the inspection target image and the reference image, and sends the resulting positional deviation correction value to the positional deviation correction comparing unit 13. Then, the misregistration correction comparison unit 13 that has received the misregistration correction value performs a collation comparison inspection of the inspection target image data and the reference image data in consideration of the misregistration correction value. In addition, the parameter input unit 1
Reference numeral 4 is an input for setting parameters used in the positional deviation detecting unit 12 and the positional deviation correction comparing unit 13. As a parameter, for example, a threshold value for performing a pass / fail judgment by comparing the inspection target image data with the reference image data in the positional deviation correction comparing unit 13 is input.

【0023】図7は、位置ずれ検出部の構成を示すブロ
ック部である。図5において、12は位置ずれ検出部、
9は基準画像データメモリ、10は検査対象画像データ
メモリ、11は基準入力司令入力部、13は位置ずれ補
正比較部、15は線分位置選択部、16は第1データ抽
出部、17は第2データ抽出部、18は第1画素データ
列メモリ、19は第2画素データ列メモリ、20は評価
数値算出部、21は中位値算出部である。また、図8は
位置ずれ検出部12におけるデータ処理の流れを示すフ
ローチャートである。
FIG. 7 is a block section showing the structure of the positional deviation detecting section. In FIG. 5, reference numeral 12 denotes a positional deviation detection unit,
Reference numeral 9 is a reference image data memory, 10 is an inspection target image data memory, 11 is a reference input command input unit, 13 is a positional deviation correction comparing unit, 15 is a line segment position selecting unit, 16 is a first data extracting unit, and 17 is a first data extracting unit. 2 is a data extraction unit, 18 is a first pixel data string memory, 19 is a second pixel data string memory, 20 is an evaluation numerical value calculation unit, and 21 is a middle value calculation unit. Further, FIG. 8 is a flowchart showing a flow of data processing in the positional deviation detecting unit 12.

【0024】図7、図8において、まず線分位置選択部
15は基準画像データメモリ9の基準画像データを参照
して天地方向の線分位置を5つ選択する(S1)。第1
のデータ抽出部16は、その線分位置を入力し基準画像
データメモリ9より天地方向の各線分位置の基準画素デ
ータ列を抽出する(S2)。また第2のデータ抽出部1
7は、その線分位置を入力し検査対象画像データメモリ
10より天地方向の各線分位置の検査対象画素データ列
を複数抽出する(S3)。
In FIGS. 7 and 8, the line segment position selection unit 15 first selects five line segment positions in the vertical direction by referring to the reference image data in the reference image data memory 9 (S1). First
The data extraction unit 16 of (1) inputs the line segment position and extracts the reference pixel data string of each line segment position in the vertical direction from the reference image data memory 9 (S2). In addition, the second data extraction unit 1
7 inputs the line segment position and extracts a plurality of inspection target pixel data strings at each line segment position in the vertical direction from the inspection target image data memory 10 (S3).

【0025】第1のデータ抽出部16によって抽出され
た基準画素データ列から一つが第1画像データ列メモリ
18に格納される。また第2のデータ抽出部17によっ
て抽出された検査対象画素データ列から一つが第2画像
データ列メモリ19に格納される。評価数値算出部20
は第1画像データ列メモリ18と第2画像データ列メモ
リ19に格納された基準画素データ列と検査対象画素デ
ータ列との評価数値を演算する。このような評価数値の
演算は各基準画素データ列に対応する複数の検査対象画
素データ列について複数回繰り返されて、複数の評価数
値が求められる(S4)。
One of the reference pixel data strings extracted by the first data extracting section 16 is stored in the first image data string memory 18. Further, one of the inspection target pixel data strings extracted by the second data extracting unit 17 is stored in the second image data string memory 19. Evaluation numerical value calculation unit 20
Calculates the evaluation numerical values of the reference pixel data string and the inspection pixel data string stored in the first image data string memory 18 and the second image data string memory 19. Such calculation of evaluation numerical values is repeated a plurality of times for a plurality of inspection target pixel data strings corresponding to each reference pixel data string to obtain a plurality of evaluation numerical values (S4).

【0026】中位値算出部21は、評価数値算出部20
で算出された複数の評価数値の中、各線分位置について
一致度が最大の評価数値を与える検査対象画素データ列
を求め、その評価数値とともに保存する(S5)。また
中位値算出部21は、評価数値算出部20で求められた
各線分位置についての評価数値から、所定値を越える各
線分位置に基づいて位置ずれ値を求め、さらにその位置
ずれ値の中位値を求めて天地方向の位置ずれ値とする。
この天地方向の位置ずれ値は位置ずれ補正比較部13に
出力される(S6)。以上のS1〜S6で説明した天地
方向についての位置ずれ値を求めるステップは、左右方
向についても全く同様に行うことができる。従って左右
方向についての位置ずれ値を求めるステップS7〜S1
2の説明は省略する。ただし、上記のように左右補正を
行うときには、あらかじめ天地方向の位置ずれ値が判っ
ているのでそれによって左右方向の線分アドレスはステ
ップS8において修正される。
The median value calculator 21 includes an evaluation value calculator 20.
Among the plurality of evaluation numerical values calculated in step S1, the inspection target pixel data string that gives the evaluation numerical value with the highest degree of coincidence for each line segment position is obtained and stored together with the evaluation numerical value (S5). Further, the median value calculation unit 21 obtains a positional deviation value based on each line segment position exceeding a predetermined value from the evaluation numerical values for each line segment position obtained by the evaluation numerical value calculation unit 20, and further calculates the positional deviation value. Obtain the unit value and use it as the displacement value in the vertical direction.
The position shift value in the vertical direction is output to the position shift correction comparison unit 13 (S6). The steps of obtaining the positional deviation value in the vertical direction described in S1 to S6 can be performed in the same manner in the horizontal direction. Therefore, steps S7 to S1 for obtaining the displacement value in the left-right direction
The description of 2 is omitted. However, when performing the horizontal correction as described above, the positional deviation value in the vertical direction is known in advance, so that the line segment address in the horizontal direction is corrected in step S8.

【0027】このようにこの例では、天地方向の位置ず
れ補正を行った後に、左右方向の位置ずれ補正を行う。
印刷物の検査においては、印刷物の走行による挙動状態
が、蛇行による左右方向の位置ずれよりも、印刷物を撮
影するカメラユニットが、印刷ユニットより離れた位置
に設置されるため、テンション変動等による天地方向の
位置ずれの方が普通は大きい。従って、この例のよう
に、天地方向の位置ずれ補正を先に行う方が、信頼性の
高い位置ずれ補正が可能となる。
As described above, in this example, the positional deviation in the horizontal direction is corrected after the positional deviation in the vertical direction is corrected.
When inspecting printed matter, the behavioral state of the printed matter due to running is more than the positional displacement in the left-right direction due to meandering. The displacement of is usually larger. Therefore, as in this example, it is possible to perform the positional deviation correction with higher reliability by performing the positional deviation correction in the vertical direction first.

【0028】また、この例では、天地方向、左右方向と
も、線分位置の数を5本とした。これら5本分の位置ず
れ補正値の中位値を、最終的な位置ずれ補正値とするの
で、5本中2本までの、結果に誤りを生じても正しい補
正値を得ることができる。このように、線分位置を複数
とすることで、位置ずれ補正の信頼性を向上させること
ができる。線分位置選択部15によるこのような線分位
置の選択は、基準画像データから、左右方向の位置ずれ
時にデータ変化が少ない天地方向線分、および天地方向
の位置ずれ時にデータ変化が少ない左右方向線分を選択
する。この線分の選択方法は、本発明者が出願した特開
平7−249122号に記載されている方法を適用する
ことができる。
In this example, the number of line segment positions is 5 in both the vertical direction and the horizontal direction. Since the median value of these five misregistration correction values is used as the final misregistration correction value, a correct correction value can be obtained even if an error occurs in up to two of the five results. In this way, by using a plurality of line segment positions, it is possible to improve the reliability of positional deviation correction. The selection of such a line segment position by the line segment position selection unit 15 is performed in the vertical direction line segment in which there is little data change when the position shifts in the left and right directions from the reference image data, and in the left and right direction where the data change is little when the position shifts in the up and down direction. Select a line segment. As a method for selecting this line segment, the method described in Japanese Patent Application Laid-Open No. 7-249122 filed by the present inventor can be applied.

【0029】図9は、位置ずれ補正比較部の構成を示す
ブロック図である。図9において、13は位置ずれ補正
比較部、6はカメラ制御部、9は基準画像データメモ
リ、10は検査対象画像データメモリ、12は位置ずれ
検出部、22は膨張処理回路、23は縮退処理回路、2
4は上限閾値設定回路、25は下限閾値設定回路、26
は上限閾値画像バッファ、27は下限閾値画像バッフ
ァ、28は画像ずらし回路、29は上限閾値比較回路、
30は下限閾値比較回路である。以上の構成において、
画像ずらし回路28は、検査対象画像データメモリ10
の画像を位置ずれ検出部によって求められた位置ずれ補
正値に従って、ずらす処理を行う。
FIG. 9 is a block diagram showing the configuration of the positional deviation correction comparison unit. In FIG. 9, 13 is a positional deviation correction comparison section, 6 is a camera control section, 9 is a reference image data memory, 10 is an inspection target image data memory, 12 is a positional deviation detection section, 22 is an expansion processing circuit, and 23 is degeneration processing. Circuit, 2
4 is an upper threshold setting circuit, 25 is a lower threshold setting circuit, 26
Is an upper threshold image buffer, 27 is a lower threshold image buffer, 28 is an image shift circuit, 29 is an upper threshold comparison circuit,
Reference numeral 30 is a lower threshold comparison circuit. In the above configuration,
The image shifting circuit 28 includes the inspection target image data memory 10
The image is shifted according to the positional deviation correction value obtained by the positional deviation detection unit.

【0030】縮退処理回路23は、基準画像データメモ
リ9に書き込まれた画像データの輝度の明るい領域に相
当する領域を細らせる処理を行なうものである。逆に、
膨張処理回路22は、明るい領域を太らせる処理を行な
う。実際の処理の一例は縮退処理回路23は以下の数
4、膨張処理回路22以下の数5で示される。
The degeneracy processing circuit 23 performs a process of narrowing an area corresponding to a bright area of the image data written in the reference image data memory 9. vice versa,
The expansion processing circuit 22 performs processing for thickening a bright area. As an example of the actual processing, the degeneration processing circuit 23 is expressed by the following expression 4 and the expansion processing circuit 22 and the following expression 5 are shown.

【数4】f(x,y)=min{f(x−1,y−
1),f(x,y−1),f(x+1,y−1),f
(x−1,y),f(x,y),f(x+1,y),f
(x−1,y+1),f(x,y+1),f(x+1,
y+1)} ただし、上記関数min{}は、列挙した変数のうちの
最小値をとることを示している。
## EQU00004 ## f (x, y) = min {f (x-1, y-
1), f (x, y-1), f (x + 1, y-1), f
(X-1, y), f (x, y), f (x + 1, y), f
(X-1, y + 1), f (x, y + 1), f (x + 1,
y + 1)} However, the function min {} indicates that the minimum value of the listed variables is taken.

【数5】f(x,y)=max{f(x−1,y−
1),f(x,y−1),f(x+1,y−1),f
(x−1,y),f(x,y),f(x+1,y),f
(x−1,y+1),f(x,y+1),f(x+1,
y+1)} ただし、上記関数max{}は、列挙した変数のうちの
最大値を取ることを示している。
## EQU00005 ## f (x, y) = max {f (x-1, y-
1), f (x, y-1), f (x + 1, y-1), f
(X-1, y), f (x, y), f (x + 1, y), f
(X-1, y + 1), f (x, y + 1), f (x + 1,
y + 1)} However, the function max {} indicates that the maximum value among the listed variables is taken.

【0031】数4は、対象画素とその8近傍の画素の輝
度の中から、最も暗い輝度値を新たに対象画素の輝度と
することを表している。また、数5は、対象画素とその
8近傍の画素の輝度の中から、最も明るい輝度値を新た
に対象画素の輝度とすることを表している。下限閾値設
定回路25には、予めパラメータ入力部14より輝度変
動の下限値が設定されていて、縮退処理回路23の出力
より、その下限値が減算され、下限閾値画像バッファ2
7に書き込まれる。同様に上限閾値設定回路24には、
予めパラメータ入力部14より輝度変動の上限値が設定
されていて、膨張処理回路22の出力に、その上限値が
加算され、上限閾値画像バッファ26に書き込まれる。
Expression 4 represents that the darkest brightness value is newly set as the brightness of the target pixel from the brightness of the target pixel and the pixels in the vicinity of the target pixel. Expression 5 represents that the brightest luminance value is newly set as the luminance of the target pixel from among the luminances of the target pixel and pixels in the vicinity of the target pixel. The lower limit threshold setting circuit 25 has a lower limit value of the brightness variation set in advance by the parameter input unit 14, and the lower limit value is subtracted from the output of the degeneration processing circuit 23.
7 is written. Similarly, the upper limit threshold setting circuit 24
The upper limit value of the brightness variation is set in advance by the parameter input unit 14, and the upper limit value is added to the output of the expansion processing circuit 22 and written in the upper threshold image buffer 26.

【0032】下限閾値比較回路30では、下限閾値画像
バッファ27の輝度値と検査対象画像データメモリ10
の輝度値を対応する画素毎に比較し、検査対象画像デー
タメモリ10の輝度値が、下限閾値画像バッファ27の
輝度値より低い場合に、欠陥が発生したと判定する。ま
た、上限閾値比較回路29では、上限閾値画像バッファ
26の輝度値と検査対象画像データメモリ10の輝度値
を対応する画素毎に比較し、検査対象画像データメモリ
の輝度値が、上限閾値画像バッファ26の輝度値より高
い場合に、欠陥が発生したと判定する。
In the lower threshold comparison circuit 30, the luminance value of the lower threshold image buffer 27 and the inspection target image data memory 10 are compared.
Are compared for each corresponding pixel, and when the brightness value of the inspection target image data memory 10 is lower than the brightness value of the lower limit threshold image buffer 27, it is determined that a defect has occurred. Further, the upper threshold comparison circuit 29 compares the luminance value of the upper threshold image buffer 26 and the luminance value of the inspection target image data memory 10 for each corresponding pixel, and the luminance value of the inspection target image data memory indicates the upper threshold image buffer. If the brightness value is higher than 26, it is determined that a defect has occurred.

【0033】なお、本発明の位置ずれ補正処理は、1画
素単位の補正であるから、補正処理を行っても1画素以
下の位置ずれは補正しきれない。そこで位置ずれ補正比
較部13で、縮退処理回路23および膨張処理回路22
を備えて、画像中の輝度変化が激しいエッジ部分での誤
検出を許容した。また、本願発明の位置ずれ補正比較部
13の構成はこの実施例に限定されるものではなく、基
準画像メモリの各画素の輝度と、被検査画像の各画素の
輝度を、位置ずれ値に従って単純に比較するものでもよ
い。
Since the positional deviation correction processing of the present invention is correction for each pixel, the positional deviation of less than one pixel cannot be corrected even if the correction processing is performed. Therefore, in the misregistration correction comparison unit 13, the degeneration processing circuit 23 and the expansion processing circuit 22.
With this feature, erroneous detection was allowed in the edge part where the brightness change in the image is drastic. The configuration of the misregistration correction comparing unit 13 of the present invention is not limited to this embodiment, and the brightness of each pixel of the reference image memory and the brightness of each pixel of the image to be inspected can be simply calculated according to the misregistration value. It may be compared to.

【0034】[0034]

【発明の効果】以上のように本発明によれば、位置ずれ
の特殊な傾向や印刷物の絵柄に特殊な内容があるような
場合においても、処理時間が短く信頼度の高い位置ずれ
補正を行って画像の検査を行うことのできる画像検査方
法およびその方法を適用した装置が提供される。また、
線分位置選択が行われる場合において選択される線分位
置を、その線分に直交する方向の前回の線分位置の位置
ずれ値に基づいて修正される線分位置とする本発明によ
れば、検査画像の位置ずれ値は一つ前の検査画像と比較
してそれほど大きくはないので、位置ずれ演算範囲の全
範囲で評価を行う必要がなく、処理時間が短縮化され
る。また、一つ前の検査画像における左右方向位置ずれ
値によって天地方向ラインのアドレスを修正することに
より、ウェブ(印刷用紙)が蛇行してもライン上の輝度
データ列がある程度保たれ、位置ずれ補正精度を向上さ
せることができる。また、線分位置選択手段により選択
される線分位置を複数とする本発明によれば、それら線
分位置に対して一致度の評価数値の高いものについて選
択的に位置ずれ値を得て、それら位置ずれ値の中の中位
値の位置ずれ値に基づいて位置ずれを補正して基準画像
と比較して検査対象画像を検査することができる。これ
により位置ずれ補正精度を向上させることができる。
As described above, according to the present invention, even when there is a special tendency of misregistration or a special content of the pattern of the printed matter, the misregistration correction with a short processing time and high reliability is performed. Provided are an image inspection method and an apparatus to which the method is applied, which can inspect an image. Also,
According to the present invention, the line segment position selected when the line segment position is selected is the line segment position that is corrected based on the displacement value of the previous line segment position in the direction orthogonal to the line segment. Since the displacement value of the inspection image is not so large as compared with the previous inspection image, it is not necessary to evaluate the entire displacement calculation range, and the processing time is shortened. Also, by correcting the address of the vertical line based on the horizontal displacement value in the previous inspection image, the brightness data string on the line is maintained to some extent even if the web (printing paper) meanders, and the displacement correction is performed. The accuracy can be improved. Further, according to the present invention having a plurality of line segment positions selected by the line segment position selection means, selectively obtain a positional deviation value for those having a high evaluation numerical value of the degree of coincidence with respect to these line segment positions, The image to be inspected can be inspected by correcting the positional deviation based on the median value of the positional deviation values and comparing it with the reference image. As a result, the positional deviation correction accuracy can be improved.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明による画像検査方法および装置における
画像検査の処理過程を示すフロー図である。
FIG. 1 is a flow chart showing an image inspection process in an image inspection method and apparatus according to the present invention.

【図2】位置ずれ値に基づいて修正される線分位置と、
その線分位置を中心とした位置ずれ値を検出するために
一致度を評価する所定の範囲を示す図である。
FIG. 2 is a line segment position corrected based on a displacement value,
It is a figure which shows the predetermined range which evaluates a coincidence degree in order to detect the position shift value centering on the line segment position.

【図3】位置ずれ値に基づいて修正される線分位置と、
その線分位置を中心とした検査対象画素データ列につい
て示す図である。
FIG. 3 is a line segment position corrected based on a displacement value,
It is a figure which shows the inspection object pixel data string centering on the line segment position.

【図4】複数組の線分位置についての一致度の評価数値
と位置ずれ補正値を表として示す図である。印刷物検査
装置本体の構成を示すブロック図である。
FIG. 4 is a diagram showing a table of evaluation values of coincidence and misalignment correction values for a plurality of sets of line segment positions. It is a block diagram showing the composition of the printed matter inspection device body.

【図5】本発明の装置構成の概要を示す模式図である。FIG. 5 is a schematic diagram showing an outline of a device configuration of the present invention.

【図6】印刷物検査装置本体の構成を示すブロック図で
ある。
FIG. 6 is a block diagram showing a configuration of a printed matter inspection apparatus main body.

【図7】位置ずれ検出部の構成を示すブロック部であ
る。
FIG. 7 is a block unit showing a configuration of a position shift detection unit.

【図8】位置ずれ検出部12におけるデータ処理の流れ
を示すフローチャートである。
FIG. 8 is a flowchart showing a flow of data processing in the positional deviation detection unit 12.

【図9】位置ずれ補正比較部の構成を示すブロック図で
ある。
FIG. 9 is a block diagram showing a configuration of a positional deviation correction comparison unit.

【符号の説明】[Explanation of symbols]

1印刷ユニット 2印刷物 3ガイドローラ 4光源 5カメラユニット 6カメラ制御部 7ロータリーエンコーダ 8印刷物検査装置本体 9基準画像データメモリ 10検査対象画像データメモリ 11基準入力司令入力部 12位置ずれ検出部 13位置ずれ補正比較部 14パラメータ入力部 15線分位置選択部 16第1データ抽出部 17第2データ抽出部 18第1画像データ列メモリ 19第2画像データ列メモリ 20評価数値算出部 21中位値算出部 22膨張処理回路 23縮退処理回路 24上限閾値設定回路 25下限閾値設定回路 26上限閾値画像バッファ 27下限閾値画像バッファ 28画像ずらし回路 29上限閾値比較回路 30下限閾値比較回路 1 printing unit 2 printed matter 3 guide roller 4 light source 5 camera unit 6 camera control unit 7 rotary encoder 8 printed matter inspection apparatus main body 9 reference image data memory 10 inspection target image data memory 11 reference input command input unit 12 position shift detection unit 13 position shift Correction comparison unit 14 Parameter input unit 15 Line segment position selection unit 16 First data extraction unit 17 Second data extraction unit 18 First image data string memory 19 Second image data string memory 20 Evaluation numerical value calculation unit 21 Medium value calculation unit 22 Expansion Processing Circuit 23 Degeneration Processing Circuit 24 Upper Threshold Setting Circuit 25 Lower Threshold Setting Circuit 26 Upper Threshold Image Buffer 27 Lower Threshold Image Buffer 28 Image Shifting Circuit 29 Upper Threshold Comparison Circuit 30 Lower Threshold Comparison Circuit

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】基準画像と比較して検査対象画像を検査す
る画像検査方法において、 位置ずれを補正すべき方向と平行方向の線分に対応する
画素列の位置である線分位置を選択する線分位置選択過
程と、 その線分位置選択過程で選択された線分位置の基準画像
上の基準画素データ列を抽出する第1データ抽出過程
と、 その線分位置およびその線分位置から画素単位で線分方
向に位置変化させた複数の位置から検査対象画像上の複
数の検査対象画素データ列を抽出する第2データ抽出過
程と、 その第1データ抽出過程で抽出された基準画素データ列
とその第2データ抽出過程で抽出された複数の検査対象
画素データ列とから一致度を評価する評価数値を得る評
価数値演算過程と、 その評価数値演算過程で得られた評価数値の中で一致度
が最大の評価数値を与える検査対象画素データ列の位置
のデータと前記線分位置のデータから位置ずれ値を得る
位置ずれ値演算過程と、 その位置ずれ値演算過程で得た位置ずれ値に基づいて位
置ずれを補正して基準画像と比較して検査対象画像を検
査する位置ずれ補正比較過程と、 を含むことを特徴とする画像検査方法。
1. An image inspecting method for inspecting an image to be inspected by comparing with a reference image, wherein a line segment position which is a position of a pixel row corresponding to a line segment in a direction parallel to a direction in which positional deviation is to be corrected is selected. A line segment position selection process, a first data extraction process of extracting a reference pixel data string on the reference image at the line segment position selected in the line segment position selection process, the line segment position, and pixels from the line segment position A second data extracting step of extracting a plurality of inspection object pixel data strings on an inspection object image from a plurality of positions whose positions are changed in units of line segments, and a reference pixel data string extracted in the first data extracting step And an evaluation numerical value calculation process for obtaining an evaluation numerical value for evaluating the degree of coincidence from the plurality of inspection target pixel data strings extracted in the second data extraction process, and the evaluation numerical value calculation process obtained in the evaluation numerical value calculation process. Maximum degree A position shift value calculation process for obtaining a position shift value from the position data of the inspection target pixel data string giving the evaluation value and the line segment position data, and the position shift based on the position shift value obtained in the position shift value calculation process. And an image inspection method for inspecting an image to be inspected by comparing with the reference image.
【請求項2】基準画像と比較して検査対象画像を検査す
る画像検査方法において、 位置ずれを補正すべき方向と平行方向の線分に対応する
画素列の位置である線分位置を選択する線分位置選択手
段と、 その線分位置選択手段で選択された線分位置の基準画像
上の基準画素データ列を抽出する第1データ抽出手段
と、 その線分位置およびその線分位置から画素単位で線分方
向に位置変化させた複数の位置から検査対象画像上の複
数の検査対象画素データ列を抽出する第2データ抽出手
段と、 その第1データ抽出手段で抽出された基準画素データ列
とその第2データ抽出手段で抽出された複数の検査対象
画素データ列とから一致度を評価する評価数値を得る評
価数値演算手段と、 その評価数値演算手段で得られた評価数値の中で一致度
が最大の評価数値を与える検査対象画素データ列の位置
のデータと前記線分位置のデータから位置ずれ値を得る
位置ずれ値演算手段と、 その位置ずれ値演算手段で得た位置ずれ値に基づいて位
置ずれを補正して基準画像と比較して検査対象画像を検
査する位置ずれ補正比較手段と、 を含むことを特徴とする画像検査装置。
2. An image inspection method for inspecting an image to be inspected by comparing with a reference image, wherein a line segment position, which is a position of a pixel row corresponding to a line segment in a direction parallel to a direction in which positional deviation is to be corrected, is selected. Line segment position selecting means, first data extracting means for extracting a reference pixel data string on the reference image at the line segment position selected by the line segment position selecting means, the line segment position and pixels from the line segment position Second data extracting means for extracting a plurality of inspection object pixel data strings on the inspection object image from a plurality of positions whose positions have been changed in the direction of the line segment, and reference pixel data strings extracted by the first data extracting means And an evaluation numerical value calculating means for obtaining an evaluation numerical value for evaluating the degree of coincidence from the plurality of inspection object pixel data strings extracted by the second data extracting means, and the evaluation numerical value matching means obtained by the evaluation numerical value calculating means. Maximum degree A positional deviation value calculating means for obtaining a positional deviation value from the data of the position of the inspection target pixel data string giving the evaluation numerical value and the data of the line segment position, and the positional deviation based on the positional deviation value obtained by the positional deviation value calculating means. An image inspection apparatus, comprising: a positional deviation correction comparing unit that corrects the image and compares the image with the reference image to inspect the inspection target image.
【請求項3】前記補正すべき方向は2方向であって、そ
の2方向の中の1方向について前記位置ずれ値を得て、
その後残る1方向について前記位置ずれ値を得て、それ
ら各前記位置ずれ値に基づいて2方向に位置ずれを補正
して基準画像と比較して検査対象画像を検査することを
特徴とする請求項2記載の画像検査装置。
3. The directions to be corrected are two directions, and the positional deviation value is obtained for one of the two directions,
7. The inspecting target image is inspected by obtaining the misalignment value for the remaining one direction, correcting the misalignment in two directions based on each of the misalignment values, and comparing with the reference image. 2. The image inspection device according to 2.
【請求項4】前記評価数値は相関係数であることを特徴
とする請求項2または3記載の画像検査装置。
4. The image inspection apparatus according to claim 2, wherein the evaluation numerical value is a correlation coefficient.
【請求項5】前記評価数値は差の絶対値の総和であるこ
とを特徴とする請求項2または3記載の画像検査装置。
5. The image inspection apparatus according to claim 2, wherein the evaluation numerical value is a sum of absolute values of differences.
【請求項6】前記評価数値は差の自乗の総和であること
を特徴とする請求項2または3記載の画像検査装置。
6. The image inspection apparatus according to claim 2, wherein the evaluation value is a sum of squared differences.
【請求項7】前記第2データ抽出手段により複数の検査
対象画像データ列が抽出される際に参照される線分位置
は、その線分に直交する方向の前回の線分位置の位置ず
れ値に基づいて修正された線分位置であることを特徴と
する請求項2〜6のいずれか記載の画像検査装置。
7. A line segment position referred to when a plurality of inspection object image data strings are extracted by the second data extracting means is a displacement value of a previous line segment position in a direction orthogonal to the line segment. 7. The image inspection apparatus according to claim 2, wherein the line segment position is corrected based on the above.
【請求項8】前記線分位置選択手段により選択される前
記線分位置は複数であって、それら各前記線分位置に対
して一致度の評価数値の高いものについて選択的に位置
ずれ値を得て、それら位置ずれ値の中の中位値の位置ず
れ値に基づいて位置ずれを補正して基準画像と比較して
検査対象画像を検査することを特徴とる請求項2〜7記
載の画像検査装置。
8. A plurality of line segment positions selected by the line segment position selecting means are provided, and a position shift value is selectively selected with respect to each of the line segment positions having a high evaluation value of the degree of coincidence. 8. The image according to claim 2, wherein the image to be inspected is obtained by correcting the positional deviation based on the positional deviation value of the median of the positional deviation values and comparing it with the reference image. Inspection device.
JP8171629A 1996-06-12 1996-06-12 Picture inspecting method and its device Pending JPH09330412A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8171629A JPH09330412A (en) 1996-06-12 1996-06-12 Picture inspecting method and its device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8171629A JPH09330412A (en) 1996-06-12 1996-06-12 Picture inspecting method and its device

Publications (1)

Publication Number Publication Date
JPH09330412A true JPH09330412A (en) 1997-12-22

Family

ID=15926737

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8171629A Pending JPH09330412A (en) 1996-06-12 1996-06-12 Picture inspecting method and its device

Country Status (1)

Country Link
JP (1) JPH09330412A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015031531A (en) * 2013-07-31 2015-02-16 株式会社リコー Image inspection device and image forming apparatus
JP2015169978A (en) * 2014-03-05 2015-09-28 富士ゼロックス株式会社 Image processor and image processing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015031531A (en) * 2013-07-31 2015-02-16 株式会社リコー Image inspection device and image forming apparatus
JP2015169978A (en) * 2014-03-05 2015-09-28 富士ゼロックス株式会社 Image processor and image processing program

Similar Documents

Publication Publication Date Title
JP6692052B2 (en) Image loss detection device and image loss detection method
JP2006303491A (en) Method of inspecting wafer
JPH11248641A (en) Device and method for inspecting surface defect
JP2002005846A (en) Defect inspecting apparatus
JP3433331B2 (en) Image inspection method and apparatus
EP0443062B1 (en) Device for inspecting quality of printed matter and method thereof
JP3204876B2 (en) Print inspection equipment
JPH09330412A (en) Picture inspecting method and its device
JP2003329601A (en) Apparatus and method for inspecting defect
JP2556894B2 (en) Print quality inspection device and method
JP2516606B2 (en) Print quality inspection device
JP2002008029A (en) Image inspection device
JPH07101048A (en) Printing inspecting method and apparatus
JP3853429B2 (en) Image inspection method and apparatus
JPH09330411A (en) Picture inspecting method and its device
JPH0147823B2 (en)
JP6776815B2 (en) Laminate inspection equipment, methods and programs
JP2876999B2 (en) Printing defect inspection equipment
JPH07186375A (en) Inspection method for printed matter
JP3875403B2 (en) Printed matter inspection method and apparatus
JP2002303588A (en) Pattern defect inspection device
JP2019215348A (en) Image inspection robot
JP4585109B2 (en) Steel plate surface flaw detection device, detection method, and storage medium
JP3841889B2 (en) Image inspection method and apparatus
JP3374297B2 (en) Color image inspection method and color image inspection apparatus

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060425

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060530

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070308