JP2000082141A - Picked up image geometric distortion detection device - Google Patents

Picked up image geometric distortion detection device

Info

Publication number
JP2000082141A
JP2000082141A JP10252256A JP25225698A JP2000082141A JP 2000082141 A JP2000082141 A JP 2000082141A JP 10252256 A JP10252256 A JP 10252256A JP 25225698 A JP25225698 A JP 25225698A JP 2000082141 A JP2000082141 A JP 2000082141A
Authority
JP
Japan
Prior art keywords
template
amount
displacement
detecting
image data
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
JP10252256A
Other languages
Japanese (ja)
Inventor
Yoshito Abe
淑人 阿部
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 JP10252256A priority Critical patent/JP2000082141A/en
Publication of JP2000082141A publication Critical patent/JP2000082141A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To detect a large amount of misalignment even when an amount of misalignment of plural small compensation object areas dividing a picture is detected by arranging a temperature in a compensation object area which divides a reference picture or an inspection object picture into plural and making the template larger than the compensation object area. SOLUTION: A real template setting means 6 reads reference picture data 2 and generates a template 1 of data in a specific area of the reference picture data 2. The temperature 1 is usually a compensation object area obtained by dividing the reference picture data 2 into a rectangular small area but, in this case, the template 1 is provided in an area larger than the object compensation object area. Thus, it is possible to detect an amount of misalignment needed to compensate geometric distortion and it is possible to detect a large amount of even when a small amount of misalignment dividing the picture into plural is detected.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、基準画像と検査対
象画像とを比較する検査装置において、基準画像と検査
対象画像との間にある撮像画像の幾何歪みの補正を行っ
てから比較を行うために、撮像画像幾何歪みを検出する
技術の分野に属する。特に、画像を複数に分割した小さ
な補正対象領域の位置ずれ量を検出する場合であっても
大きい位置ずれ量を検出することができる撮像画像幾何
歪み検出装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an inspection apparatus for comparing a reference image and an image to be inspected, in which a geometrical distortion of a captured image between the reference image and the image to be inspected is corrected and then the comparison is performed. Therefore, it belongs to the field of technology for detecting geometric distortion of a captured image. In particular, the present invention relates to a captured image geometric distortion detection device capable of detecting a large displacement amount even when detecting a displacement amount of a small correction target area obtained by dividing an image into a plurality of regions.

【0002】[0002]

【従来の技術】たとえば特公平1−47823号には、
正常な印刷物が印刷された時点で走行印刷物の絵柄から
読み取った画像データを基準画像データとして画像メモ
リに記憶しておき、その画像メモリから読み出した基準
画像データを、印刷中の検査対象の印刷物から読み取っ
た検査画像データと画素単位で比較して印刷物の良否判
定を行う方式の検査装置に関する技術が記載されてい
る。
2. Description of the Related Art For example, Japanese Patent Publication No.
The image data read from the pattern of the running printed matter 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 read from the printed matter to be inspected during printing. A technique relating to an inspection apparatus of a type in which the quality of a printed matter is determined by comparing the read inspection image data with a pixel unit is described.

【0003】このように基準画像データと検査対象画像
データとを画素単位で比較する場合、不良検出の精度を
高めると両データ間の位置ずれが僅かである場合でも位
置ずれを不良と誤検出し、位置ずれを不良と誤検出しな
いようにするためには不良検出の精度を低下させること
が必要である。したがって、ある程度の位置ずれを避け
得ない場合には要求を満足するに十分な検査性能が得ら
れない。そこで、たとえば特開平7−249122号に
は、基準画像データと検査対象画像データとの間の位置
ずれを補正してから、両データを比較して検査するよう
に構成した検査装置が記載されている。
As described above, when the reference image data and the inspection target image data are compared on a pixel-by-pixel basis, if the accuracy of defect detection is increased, even if the positional deviation between the two data is slight, the positional deviation is erroneously detected as defective. In order to prevent erroneous detection of a position shift as a defect, it is necessary to lower the accuracy of the defect detection. Therefore, if a certain amount of displacement cannot be avoided, inspection performance sufficient to satisfy the requirements cannot be obtained. Therefore, for example, Japanese Patent Application Laid-Open No. 7-249122 describes an inspection apparatus configured to correct a positional shift between reference image data and inspection target image data, and then compare and inspect the two data. I have.

【0004】[0004]

【発明が解決しようとする課題】この検査装置は画像全
体の平行移動に対しては位置ずれを補正することができ
る。ところが、印刷が行われ移送されるウェブの急激な
テンション変動や蛇行、撮像カメラの振動、等が起きる
場合には、撮像して得た画像は単純な平行移動の位置ず
れだけではなく、平行移動、伸縮、スキュー、および、
射影歪みやその他の幾何歪みを有している(図8参
照)。この幾何歪みは、軟包装フィルムや建材化粧紙等
に印刷が行われる場合に特に顕著である。この幾何歪み
に対しては、従来の平行移動に対する位置ずれ補正によ
っては対応することができない。また、幾何歪みを検出
するときに、画像を複数の小領域に分割し、その小領域
ごとにそれぞれの移動ベクトル(位置ずれ量)を検出す
るテンプレート領域および探索領域を設定することが行
われる。ところが、小領域を細かくするに連れてテンプ
レートと探索範囲を小さくしないと誤った移動ベクトル
が検出されることがある。そのため、大きい変位を検出
することが困難である。
The inspection apparatus can correct a position shift with respect to a parallel movement of the entire image. However, when sudden tension fluctuations, meandering, vibration of the imaging camera, and the like of the web to be printed and transferred occur, the image obtained by imaging is not only a simple translational displacement but also a translational translation. , Stretch, skew, and,
It has projective distortion and other geometric distortions (see FIG. 8). This geometric distortion is particularly remarkable when printing is performed on a soft packaging film, building material decorative paper, or the like. This geometric distortion cannot be dealt with by the conventional displacement correction for the parallel movement. When detecting geometric distortion, an image is divided into a plurality of small regions, and a template region and a search region for detecting a movement vector (amount of displacement) are set for each of the small regions. However, an erroneous movement vector may be detected unless the template and the search range are reduced as the small area is made finer. Therefore, it is difficult to detect a large displacement.

【0005】そこで本発明の目的は、幾何歪みを補正す
るために必要とされる、歪み量を検出し、しかも、画像
を分割した複数の小さな補正対象領域の位置ずれ量を検
出する場合であっても大きい位置ずれ量を検出すること
ができる撮像画像幾何歪み検出装置を提供することにあ
る。
Accordingly, an object of the present invention is to detect the amount of distortion required for correcting geometric distortion and to detect the amount of displacement of a plurality of small correction target areas obtained by dividing an image. It is an object of the present invention to provide a captured image geometric distortion detection device capable of detecting a large positional deviation amount even when the image is detected.

【0006】[0006]

【課題を解決するための手段】上記の目的は下記の本発
明によって達成される。すなわち、本発明の第1の形態
の撮像画像幾何歪み検出装置は、ラインセンサカメラに
よる主走査とウェブの移送による副走査とを組み合わせ
て前記ウェブを撮像し、得られる画像検査のための基準
画像と検査対象画像について、テンプレートを用い前記
基準画像と前記検査対象画像との位置ずれ量を検出する
テンプレートマッチング手段を有する撮像画像伸縮歪み
検出装置であって、前記テンプレートが前記基準画像ま
たは前記検査対象画像を複数に分割した補正対象領域に
配置され、かつ、前記テンプレートが前記補正対象領域
よりも大きいようにしたものである。
The above objects are achieved by the present invention described below. In other words, the captured image geometric distortion detection apparatus according to the first embodiment of the present invention captures the web by combining main scanning by a line sensor camera and sub-scanning by transporting the web, and obtains a reference image for image inspection. And an inspection target image, the captured image expansion / contraction distortion detection device having a template matching unit that detects a positional shift amount between the reference image and the inspection target image using a template, wherein the template is the reference image or the inspection target. The image is arranged in a correction target area obtained by dividing the image into a plurality of parts, and the template is larger than the correction target area.

【0007】本発明によれば、テンプレートは基準画像
と検査対象画像を複数に分割した補正対象領域に配置さ
れ、かつ、補正対象領域よりも大きいテンプレートが用
いられる。したがって、幾何歪みを補正するために必要
とされる位置ずれ量を検出し、しかも、画像を複数に分
割した小さな補正対象領域の位置ずれ量を検出する場合
であっても大きい位置ずれ量を検出することができる撮
像画像幾何歪み検出装置が提供される。
According to the present invention, the template is arranged in the correction target area obtained by dividing the reference image and the inspection target image into a plurality of parts, and a template larger than the correction target area is used. Therefore, a large amount of positional deviation is detected even when detecting the amount of positional deviation required for correcting geometric distortion and detecting the amount of positional deviation of a small correction target area obtained by dividing an image into a plurality. There is provided an apparatus for detecting a geometric distortion of a captured image.

【0008】また、本発明の第2の形態の撮像画像幾何
歪み検出装置は、第1の形態の撮像画像幾何歪み検出装
置において、前記テンプレートマッチング手段は、前記
テンプレートの領域内でマッチング演算に適し実際に用
いる実テンプレートの詳細位置を設定する実テンプレー
ト設定手段と、天地方向の位置ずれ量を検出する天地方
向位置ずれ量検出手段と、左右方向の位置ずれ量を検出
する左右方向位置ずれ量検出手段と、全方向の位置ずれ
量を検出する全方向位置ずれ量検出手段と、から成るよ
うにしたものである。
According to a second aspect of the present invention, there is provided the captured image geometric distortion detecting apparatus according to the first aspect, wherein the template matching means is suitable for a matching operation in the area of the template. Real template setting means for setting a detailed position of an actual template to be actually used; top-and-bottom direction displacement amount detecting means for detecting a top-to-bottom position displacement amount; and left and right direction displacement amount detection for detecting a left and right direction displacement amount And an omnidirectional position shift amount detecting means for detecting an omnidirectional position shift amount.

【0009】本発明によれば、テンプレートマッチング
手段は、実テンプレート設定手段と、天地方向位置ずれ
量検出手段と、左右方向位置ずれ量検出手段と、全方向
位置ずれ量検出手段とから成り、実テンプレート設定手
段によりテンプレートの領域内でマッチング演算に適し
実際に用いる実テンプレートの詳細位置が設定され、天
地方向位置ずれ量検出手段により天地方向の位置ずれ量
が検出され、左右方向位置ずれ量検出手段により左右方
向の位置ずれ量が検出され、全方向位置ずれ量検出手段
により全方向の位置ずれ量が検出される。すなわち、マ
ッチング演算に適した実テンプレートを用い、天地方向
と左右方向の位置ずれ量を別々に演算し、最後に、その
天地方向と左右方向の位置ずれ量の近傍だけについて全
方向位置ずれ量を演算する。したがって、位置ずれ量を
良好な精度で高速に演算することができる。
According to the present invention, the template matching means comprises actual template setting means, top-bottom direction displacement amount detection means, left-right direction displacement amount detection means, and omnidirectional position displacement amount detection means. The detailed position of the actual template that is suitable for the matching calculation and is actually used in the template area is set by the template setting means, and the vertical position shift amount detecting means detects the vertical position shift amount, and the horizontal direction position shift amount detecting means , The amount of displacement in the left-right direction is detected, and the amount of displacement in all directions is detected by the omnidirectional displacement amount detecting means. That is, using the real template suitable for the matching calculation, the displacements in the top-to-bottom direction and the left-right direction are separately calculated, and finally, the omnidirectional displacements in only the vicinity of the top-bottom direction and the left-right displacement are calculated. Calculate. Therefore, the amount of displacement can be calculated at high speed with good accuracy.

【0010】また、本発明の第3の形態の撮像画像幾何
歪み検出装置は、第1または2の形態の撮像画像幾何歪
み検出装置において、前記テンプレートは交差部分を前
記補正対象領域のほぼ中央の一画素とする十文字形状を
有するようにしたものである。すなわち、補正対象領域
よりも大きいテンプレートが用いられ、しかも演算の対
象となる画素数を矩形等に比較して少なくすることがで
きる。したがって、位置ずれ量を良好な精度で高速に演
算することができる。
According to a third aspect of the present invention, there is provided a captured image geometric distortion detecting apparatus according to the first or second aspect, wherein the template has an intersection portion substantially at the center of the correction target area. It has a cross shape of one pixel. That is, a template larger than the correction target area is used, and the number of pixels to be calculated can be reduced as compared with a rectangle or the like. Therefore, the amount of displacement can be calculated at high speed with good accuracy.

【0011】[0011]

【発明の実施の形態】次に、本発明について実施の形態
により説明を行う。図1は本発明の撮像画像複合歪み検
出装置の構成を示す図である。図1において、1はテン
プレートデータ、2は基準画像データ、3は検査対象画
像データ、4は位置ずれ量データである。これらのデー
タは、一般的には記憶手段に記憶されており、必要に応
じて記憶手段から読み取られ、また記憶手段へ書き込ま
れる。もちろん、検査対象画像データ3については、記
憶手段を使用せず、撮像して得られるデータを直接的に
パイプライン処理方式等の処理手段に導入して利用する
ことができる。5はテンプレートマッチング手段であ
る。テンプレートマッチング手段5はさらに細部から構
成され、6は実テンプレート設定手段、7は天地方向位
置ずれ量検出手段、8は左右方向位置ずれ量検出手段、
9は全方向位置ずれ量検出手段である。
Next, the present invention will be described with reference to embodiments. FIG. 1 is a diagram showing a configuration of a captured image composite distortion detection device of the present invention. In FIG. 1, 1 is template data, 2 is reference image data, 3 is inspection target image data, and 4 is displacement amount data. These data are generally stored in the storage unit, and are read from the storage unit and written to the storage unit as needed. Of course, for the inspection target image data 3, data obtained by imaging can be directly introduced into a processing means such as a pipeline processing method and used without using a storage means. Reference numeral 5 denotes a template matching unit. The template matching unit 5 is further composed of details, 6 is an actual template setting unit, 7 is a vertical direction positional deviation amount detecting unit, 8 is a horizontal positional deviation amount detecting unit,
Reference numeral 9 denotes an omnidirectional positional deviation amount detecting means.

【0012】テンプレートデータ1は画像データの内の
特定の領域のデータである。画像データとしては、それ
に限定されるものではないが、通常は基準画像データが
用いられる。図2はテンプレートの一例を示す図であ
る。図2において、2はイメージで示した画像データ
(基準画像データ)、R0000〜R0911は基準画像データ
2を矩形の小領域に分割して得られる補正対象領域であ
り、T0101,T0110,T18 01,T0810はそれらの補正対
象領域よりも大きな領域に設けられたテンプレート(斜
線で示した矩形部分)である。テンプレートデータ1は
複数のテンプレートから構成され、図2に示す一例では
4つのテンプレートT0101〜T0810(テンプレートT
0101,T0110,T1801,T0810)から構成される。図2
においては、テンプレートT0101〜T0810は矩形である
が、矩形に限定されるものではなく、任意の形状とする
ことができる。ただし、本発明においては、テンプレー
トT0101〜T0810を任意の形状とした場合においても、
その任意の形状の外接矩形は、図2において線分で区切
って示す矩形の補正対象領域R0000〜R0911の寸法より
も、大きい寸法とする。なお、R0911、T0810等におけ
る添字は前の2桁が行番号を表し、後の2桁が列番号を
表す。また、矢印→はウェブの移送方向を示している。
The template data 1 is data of a specific area in the image data. Although the image data is not limited to this, usually, reference image data is used. FIG. 2 is a diagram illustrating an example of the template. In FIG. 2, reference numeral 2 denotes image data (reference image data) represented by an image, and R 0000 to R 0911 denote correction target regions obtained by dividing the reference image data 2 into small rectangular regions, and T 0101 and T 0110. , T 18 01, T 0810 is their correction target region template provided in a region larger than (rectangular portion indicated by hatching). The template data 1 is composed of a plurality of templates. In the example shown in FIG. 2, four templates T 0101 to T 0810 (template T
0101 , T 0110 , T 1801 , T 0810 ). FIG.
In the above, the templates T 0101 to T 0810 are rectangular, but are not limited to rectangles, and can be of any shape. However, in the present invention, even when the templates T 0101 to T 0810 have an arbitrary shape,
Enclosing rectangle of arbitrary shape, than the size of the rectangular region to be corrected R 0000 to R 0911 shown separated by line segments in FIG. 2, the larger size. In the subscripts of R 0911 , T 0810, etc., the first two digits represent the row number, and the last two digits represent the column number. The arrow → indicates the direction of web transport.

【0013】図2に示すように、テンプレートT0101
0810は基準画像と検査対象画像に対して天地左右方向
に、すなわち、2次元に配列されている。画像データ2
は行列配置された複数の画素データによって構成されて
おり、テンプレートT0101〜T0810の各々も行列配置さ
れた複数の画素データによって構成されている。そし
て、行または列の一連の画素の集合としての横の画素列
や縦の画素列を構成することができ、テンプレートT
0101〜T0810の各々は、それらの横の画素列や縦の画素
列を要素として含んでいる。
As shown in FIG. 2, a template T 0101-
T 0810 is arranged two-dimensionally in the top and bottom left and right directions with respect to the reference image and the inspection target image. Image data 2
Is composed of a plurality of pixel data arranged in a matrix, and each of the templates T 0101 to T 0810 is also composed of a plurality of pixel data arranged in a matrix. Then, a horizontal pixel column or a vertical pixel column as a set of a series of pixels in a row or a column can be formed.
[0101] Each of T10108 includes a horizontal pixel row and a vertical pixel row as elements.

【0014】前述したようにテンプレートはテンプレー
トT0101〜T0810のように矩形に限定されるものではな
い。一例とし、矩形状のテンプレートと十字形状のテン
プレートを比較して図3に示す。図3(A)は矩形状の
テンプレートを示し、図3(B)は十字形状のテンプレ
ートを示す。図3において、R0001,R0100,R0201
0405,R0505,R0605は補正対象領域、T0101は矩形
状のテンプレート、T 0505は十字形状のテンプレートで
ある。細い線分の格子によって描かれる小さな矩形は画
像データ2の画素を示しており、太い線分の格子によっ
て描かれる矩形は補正対象領域を示している。図3に示
すように、この一例では1つの補正対象領域は25(5
行×5列)の画素によって構成される。
As described above, the template is a template.
To T0101~ T0810Is not limited to a rectangle like
No. As an example, a rectangular template and a cross-shaped template
A comparison of the plates is shown in FIG. FIG. 3A shows a rectangular shape.
FIG. 3B shows a template having a cross shape.
Indicates a port number. In FIG. 3, R0001, R0100, R0201,
R0405, R0505, R0605Is the correction target area, T0101Is a rectangle
Template, T 0505Is a cross-shaped template
is there. A small rectangle drawn by a grid of thin line segments
The pixel of image data 2 is shown.
The rectangle drawn in the figure indicates the correction target area. Shown in FIG.
As described above, in this example, one correction target area is 25 (5
(Row x 5 columns).

【0015】図3(A)に示す一例では、矩形状のテン
プレートT0101は、5行×5列の画素によって構成され
る補正対象領域R0101(図示せず)を含むように設定さ
れており、7行×7列の画素によって構成される。した
がって、行の一連の画素の集合としての横の画素列には
7つの画素が存在し、その画素列が7つ存在する。ま
た、列の一連の画素の集合としての縦の画素列にも7つ
の画素が存在し、その画素列が7つ存在する。
In the example shown in FIG. 3A, the rectangular template T 0101 is set to include a correction target region R 0101 (not shown) composed of pixels of 5 rows × 5 columns. , 7 rows × 7 columns. Therefore, there are seven pixels in a horizontal pixel column as a set of a series of pixels in a row, and there are seven pixel columns. Also, seven pixels exist in a vertical pixel column as a set of a series of pixels in the column, and there are seven pixel columns.

【0016】一方、図3(B)に示す一例では、十字形
状のテンプレートT0505は、横の画素列には11の画素
が存在するが、その画素列は1つである。また、縦の画
素列も11の画素が存在するが、その画素列も1つであ
る。十字形状のテンプレートT0505では、横の画素列も
縦の画素列も1つであるが、十字形状のテンプレートT
0505の交差部分が補正対象領域R0505の内部の任意の場
所であってもよいことにすれば、実質的には、横の画素
列も縦の画素列も複数存在することとなる。したがっ
て、矩形状のテンプレートT0101と十字形状のテンプレ
ートT0505は、基本的に同様のマッチング演算(詳細は
後述する)を行うことができる。
On the other hand, in the example shown in FIG. 3B, the cross-shaped template T 0505 has 11 pixels in the horizontal pixel row, but has only one pixel row. Also, there are 11 pixels in the vertical pixel row, but there is only one pixel row. The cross-shaped template T 0505 has one horizontal pixel row and one vertical pixel row.
If the intersection of 0505 may be an arbitrary place inside the correction target region R 0505 , there are substantially a plurality of horizontal pixel columns and a plurality of vertical pixel columns. Therefore, the rectangular template T 0101 and the cross-shaped template T 0505 can perform basically the same matching calculation (details will be described later).

【0017】撮像画像の幾何歪みが局所的な場合には、
単一または少数のテンプレートによって、その幾何歪み
を検出することはできない。したがって、多数の部分領
域に画像を分割し、各々を補正対象領域とし、各々にテ
ンプレートを配置して位置ずれ量(動ベクトル)を検出
する必要がある。位置ずれ量が局所的に極端に異なる場
合には、画素ごとに位置ずれ量を求める必要が生じる場
合もある。位置ずれ量を求めるためのテンプレートを補
正対象領域と同一、または、その補正対象領域の部分領
域とした場合には、誤検出等の不都合が起きないように
するため、補正対象領域を小さくしたのに応じて探索範
囲を小さくしなければならない。しかし、探索範囲を小
さくすると、大きな位置ずれ量を検出することができな
い。図3に示すように、本発明においては、テンプレー
トを補正対象領域よりも大きくすることで探索範囲を広
げ、大きな位置ずれ量を検出することができるようにす
る。
When the geometric distortion of the captured image is local,
The geometric distortion cannot be detected by a single or a small number of templates. Therefore, it is necessary to divide the image into a large number of partial areas, each of which is used as a correction target area, and arrange a template in each of the areas to detect a positional shift amount (motion vector). If the amount of displacement is extremely different locally, it may be necessary to determine the amount of displacement for each pixel. When the template for calculating the displacement amount is the same as the correction target area or a partial area of the correction target area, the correction target area is reduced in order to prevent inconvenience such as erroneous detection. , The search range must be reduced. However, when the search range is reduced, a large displacement cannot be detected. As shown in FIG. 3, in the present invention, the search range is widened by making the template larger than the correction target area, so that a large displacement can be detected.

【0018】図3に示すテンプレートT0505のような十
字形状のテンプレートを用いることの特徴は、補正対象
領域を小さくし画素ごとに位置ずれ量を求めるような場
合に顕著である。すなわち、そのような場合には後述す
るマッチング演算において、演算過程の一部を省略する
ことができる。その省略により、テンプレートが多数で
あっても高速にマッチング演算を行うことができる。そ
の省略できる演算過程は、天地方向位置ずれ量検出手段
7による天地方向の位置ずれ量検出過程(ステップS5
1)と左右方向位置ずれ量検出手段8による左右方向の
位置ずれ量検出過程(ステップS52)である。これら
を省略して、全方向位置ずれ量検出手段9による全方向
の位置ずれ量検出過程(ステップS53)に進むことが
できる。この理由は、十字形状のテンプレートでは天地
方向の画素列(縦の画素列)と左右方向の画素列(横の
画素列)がすでに選択されていると見なすことができる
ことと、補正対象領域が小さく十字形状のテンプレート
の交差部分を変位させる範囲が小さいことによる。
The feature of using a cross-shaped template such as the template T 0505 shown in FIG. 3 is remarkable in a case where the correction target area is made small and the amount of displacement is obtained for each pixel. That is, in such a case, a part of the calculation process can be omitted in the matching calculation described later. Due to the omission, the matching operation can be performed at high speed even if there are many templates. The calculation process that can be omitted is a vertical displacement detection process by the vertical displacement detection means 7 (step S5).
1) and a left-right direction displacement amount detection process by the left-right direction displacement amount detection means 8 (step S52). By omitting these, it is possible to proceed to the omnidirectional positional deviation amount detecting process (step S53) by the omnidirectional positional deviation amount detecting means 9. The reason for this is that in the cross-shaped template, it can be considered that the pixel row in the vertical direction (vertical pixel row) and the pixel row in the horizontal direction (horizontal pixel row) have already been selected, and the correction target area is small. This is because the range in which the intersection of the cross-shaped template is displaced is small.

【0019】次に、マッチング演算について説明する。
図1に示す4つの矩形のテンプレートT0101〜T0810
設けた一例を説明するが、上述のように、本発明は補正
対象領域を小さくし、矩形とは限らない多数のテンプレ
ートを設けた場合に適用して特に好適である。図1に示
す実テンプレート設定手段6は、まず、基準画像データ
2を読込み、その基準画像データ2の内の特定の領域の
データであるテンプレートデータ1を生成する。すなわ
ち、上述のテンプレートT0101〜T0810の各々を生成す
る。さらに、実テンプレート設定手段6は、テンプレー
トT0101〜T08 10の領域内でマッチング演算に適し実際
に用いる実テンプレートの詳細位置を設定する。図4は
マッチング演算に適する実テンプレートの一例を示す図
である。図4に示す一例では、実テンプレートは縦の画
素列で示されており、これは天地方向に配列した画素の
集合である。この縦の画素列で示された実テンプレート
を用いてテンプレートマッチング手段5は天地方向の位
置ずれ量を演算する。
Next, the matching operation will be described.
An example in which the four rectangular templates T 0101 to T 0810 shown in FIG. 1 are provided will be described. As described above, the present invention reduces the correction target area and provides a large number of templates that are not necessarily rectangular. It is particularly suitable for application to The real template setting means 6 shown in FIG. 1 first reads the reference image data 2 and generates template data 1 which is data of a specific area in the reference image data 2. That is, each of the above-described templates T 0101 to T 0810 is generated. Furthermore, the actual template setting unit 6 sets the detailed position of the actual template used actually suitable for matching operation in the area of the template T 0101 ~T 08 10. FIG. 4 is a diagram illustrating an example of a real template suitable for a matching operation. In the example shown in FIG. 4, the actual template is shown by a vertical pixel row, which is a set of pixels arranged in the vertical direction. Using the actual template indicated by the vertical pixel row, the template matching means 5 calculates the amount of displacement in the vertical direction.

【0020】図4に示すように、縦の画素列aは矩形の
パターンのほぼ中央を通過する画素列である。この矩形
のパターンの左右方向のエッジの位置を検出することに
よって天地方向の位置ずれ量を演算することができる。
この矩形のパターンは左右方向の位置ずれに対して天地
方向の位置が変化しない左右方向のエッジを有してい
る。したがって、縦の画素列aは天地方向の位置ずれ量
を演算するマッチング演算に適する実テンプレートであ
る。一方、縦の画素列bは矩形のパターンの右側のエッ
ジ付近を通過する画素列であるこの画素列の場合は、左
右方向の位置ずれに対してその矩形のパターンの右側の
エッジが含まれることも含まれないこともあり得る。し
たがって、天地方向の位置ずれ量を演算するマッチング
演算に適さず、実テンプレート設定手段6は縦の画素列
bを実テンプレートとして用いることはない。
As shown in FIG. 4, a vertical pixel row a is a pixel row passing substantially at the center of a rectangular pattern. By detecting the position of the edge in the left-right direction of this rectangular pattern, the amount of displacement in the vertical direction can be calculated.
This rectangular pattern has left and right edges whose position in the top and bottom directions does not change due to displacement in the left and right directions. Therefore, the vertical pixel row a is a real template suitable for the matching calculation for calculating the amount of displacement in the vertical direction. On the other hand, the vertical pixel row b is a pixel row passing near the right edge of the rectangular pattern. In the case of this pixel row, the right edge of the rectangular pattern is included in the positional shift in the left-right direction. May not be included. Therefore, it is not suitable for the matching calculation for calculating the amount of displacement in the vertical direction, and the actual template setting means 6 does not use the vertical pixel row b as the actual template.

【0021】また、縦の画素列cは傾斜したエッジを有
するパターンのほぼ中央を通過する。左右方向の位置ず
れに対して縦の画素列cが通過するその傾斜したエッジ
の位置は天地方向に変化する。したがって、天地方向の
位置ずれ量を演算するマッチング演算に適さず、実テン
プレート設定手段6は縦の画素列cを実テンプレートと
して用いることはない。また、縦の画素列dはほぼ等間
隔で天地方向に配列する矩形パターを通過する画素列で
ある。左右方向の位置ずれに対して縦の画素列dが通過
するその矩形パターンのエッジの位置は天地方向に変化
することはない。しかし、配列の間隔と同じ、またはそ
の整数倍程度の天地方向の位置ずれが生じた場合に、位
置ずれ演算を配列の間隔と同じ、またはその整数倍程度
の大きさで誤る恐れがある。したがって、天地方向の位
置ずれ量を演算するマッチング演算に適さず、実テンプ
レート設定手段6は縦の画素列dを実テンプレートとし
て用いることはない。
The vertical pixel row c passes through substantially the center of the pattern having an inclined edge. The position of the inclined edge through which the vertical pixel row c passes in response to the positional shift in the left-right direction changes in the vertical direction. Therefore, it is not suitable for the matching calculation for calculating the amount of displacement in the vertical direction, and the actual template setting means 6 does not use the vertical pixel row c as the actual template. The vertical pixel row d is a pixel row passing through a rectangular pattern arranged at almost equal intervals in the vertical direction. The position of the edge of the rectangular pattern through which the vertical pixel row d passes with respect to the positional shift in the left-right direction does not change in the vertical direction. However, when a displacement in the vertical direction equal to or an integral multiple of the array interval occurs, there is a possibility that the misalignment calculation is erroneously performed at the same or an integral multiple of the array interval. Therefore, it is not suitable for the matching calculation for calculating the amount of displacement in the vertical direction, and the actual template setting means 6 does not use the vertical pixel row d as the actual template.

【0022】上述のように、実テンプレート設定手段6
は天地方向の位置ずれを検出するための実テンプレート
を設定する場合には、天地方向の位置ずれに対してマッ
チング演算における一致度の評価数値(後述する)の変
化が大きく、左右方向の位置ずれに対してマッチング演
算における一致度の評価数値の変化が小さい縦の画素列
を設定する。また、天地方向の位置ずれに対してマッチ
ング演算における一致度の評価数値の変化が周期性を有
する縦の画素列は避ける。なお上述において、天地方向
の位置ずれを検出するための実テンプレートの設定につ
いて説明したが、左右方向の位置ずれを検出するための
実テンプレートの設定についても同様であるから説明は
省略する。すなわち、「天地」を「左右」に、「縦」を
「横」に置き換えれば同様である。
As described above, the actual template setting means 6
In the case of setting an actual template for detecting a displacement in the vertical direction, the evaluation value (described later) of the degree of coincidence in the matching calculation greatly changes with respect to the displacement in the vertical direction, and the displacement in the horizontal direction is large. , A vertical pixel row having a small change in the evaluation value of the matching degree in the matching calculation is set. In addition, a vertical pixel row in which a change in the evaluation value of the degree of coincidence in the matching operation with respect to the displacement in the vertical direction has a periodicity is avoided. In the above description, the setting of the real template for detecting the displacement in the vertical direction has been described. However, the same applies to the setting of the real template for detecting the displacement in the left-right direction, and the description thereof will be omitted. That is, the same applies if “top and bottom” is replaced with “left and right” and “vertical” is replaced with “horizontal”.

【0023】図5は実テンプレートとして設定する画素
列を選択する過程の一例を示すフロー図である。まず、
ステップS1において、位置ずれを補正しようとする方
向に対して、基準画像データの内の特定の領域であるテ
ンプレートの輪郭強度を算出し、所定の強度以上の輪郭
強度を有する画素の数を、その方向の画素列の各々に対
して計数して画素数を求め、その画素数が所定の数以上
ある画素列は実テンプレートとして選択可能な画素列と
する。この処理により、基準画像と検査画像の位置ずれ
を補正に適用する画素列には、必ず輪郭部位の画素が含
まれ、しかもその輪郭は所定の強度を有することとな
る。したがって、一致度の評価数値の変化が大きく、正
確な位置ずれの補正量を検出することができる。
FIG. 5 is a flowchart showing an example of a process of selecting a pixel column to be set as an actual template. First,
In step S1, the contour strength of the template, which is a specific area in the reference image data, is calculated for the direction in which the displacement is to be corrected, and the number of pixels having a contour strength equal to or higher than a predetermined strength is calculated. The number of pixels is obtained by counting each of the pixel rows in the direction, and a pixel row having a predetermined number of pixels or more is a pixel row that can be selected as an actual template. As a result of this processing, a pixel row to be applied to the correction of the positional deviation between the reference image and the inspection image always includes the pixels of the contour part, and the contour has a predetermined strength. Therefore, a change in the evaluation value of the degree of coincidence is large, and an accurate correction amount of the positional deviation can be detected.

【0024】次のステップS2において、位置ずれを補
正する方向の基準画像の複数の画素列に対して、その内
の一つの対象画素列と、その対象画素列を所定の画素分
ずらした画素列との画素ごとの差の絶対値を算出し、そ
の差の絶対値と基準画像の輪郭から成る輪郭画像の対応
する画素の画素値とを比較する。その差の絶対値が輪郭
画像の画素の画素値を越える画素を有することから、そ
の対象画素列が絵柄が繰返し成分だけではない画素列で
あると判定し、基準画像の各画素列の内でそのような画
素列は選択可能画素列とする。この処理により、同じ絵
柄が繰返す部分すなわち周期絵柄の部分だけを含む画素
列を位置ずれの補正値の検出に適用する画素列として選
択するようなことがなくなる。したがって、繰返し周期
の倍数だけ離れた補正値が検出される恐れが無く、正確
な位置ずれの補正値を検出することができる。
In the next step S2, one target pixel column among the plurality of pixel columns of the reference image in the direction in which the displacement is to be corrected, and a pixel column obtained by shifting the target pixel column by a predetermined pixel. , The absolute value of the difference for each pixel is calculated, and the absolute value of the difference is compared with the pixel value of the corresponding pixel of the contour image composed of the contour of the reference image. Since the absolute value of the difference has a pixel exceeding the pixel value of the pixel of the contour image, it is determined that the target pixel row is a pixel row whose picture is not only a repetitive component, and within each pixel row of the reference image, Such a pixel column is a selectable pixel column. By this processing, a pixel row including only a portion where the same picture repeats, that is, only a portion of the periodic picture, is not selected as a pixel row to be applied to the detection of the displacement correction value. Accordingly, there is no possibility that a correction value separated by a multiple of the repetition period is detected, and an accurate correction value of the positional deviation can be detected.

【0025】次に、ステップS3において、位置ずれを
補正する方向と平行する方向の基準画像に属する画素列
の集合の要素の一つである対象画素列と、その対象画素
列の左右両側方向に画素単位で所定の範囲で離れて隣接
する複数の画素列の各々について、画素列の位置関係を
その列方向に変化した場合の一致度の評価数値から位置
ずれの補正値を検出する。そして、その補正値がゼロと
なる画素列の数を対象画素列の右側方向と左側方向につ
いて求め、少ない方の数をその対象画素列の度数とす
る。基準画像に属する画素列の集合のすべてを対象画素
列として度数を求め、その度数が最大または十分大きい
画素列は選択可能画素列とする。この処理により、その
対象画素列の度数以下の範囲の位置ずれであれば、位置
ずれを補正する方向と直交する方向に位置ずれがある場
合においても、適正な位置ずれの補正値を検出すること
ができる。
Next, in step S3, a target pixel row, which is one of the elements of a set of pixel rows belonging to the reference image in a direction parallel to the direction in which the displacement is corrected, For each of a plurality of adjacent pixel columns separated by a predetermined range in pixel units, a correction value of the positional deviation is detected from the evaluation value of the degree of coincidence when the positional relationship of the pixel columns is changed in the column direction. Then, the number of pixel rows for which the correction value is zero is obtained for the right and left directions of the target pixel row, and the smaller number is set as the frequency of the target pixel row. The frequency is determined using all the sets of the pixel rows belonging to the reference image as the target pixel rows, and the pixel row having the maximum or sufficiently large frequency is set as the selectable pixel row. By this processing, if the positional deviation is within the range of the frequency of the target pixel column or less, even if there is a positional deviation in a direction orthogonal to the direction of correcting the positional deviation, an appropriate positional deviation correction value can be detected. Can be.

【0026】次にステップS4において、上述のステッ
プS1の選択可能画素列であり、かつ、ステップS2の
選択可能画素列であり、かつ、ステップS3の選択可能
画素列である画素列から位置ずれの補正値を検出に適用
する実テンプレートとして設定する画素列を選択する。
特定の実テンプレートに対し複数の画素列を選択するこ
とができ、1つに限定されない。たとえば、隣接する複
数の画素列を選択することができる。実テンプレート設
定手段6は、上述のようにして、すべてのテンプレート
の各々について、天地方向と左右方向の実テンプレート
を設定する。すなわち、図2に示す一例において、4つ
のテンプレートT0101〜T0810の各々について、天地方
向の4つの実テンプレートと左右方向の4つの実テンプ
レートを設定する。
Next, in step S4, the positional shift from the pixel row that is the selectable pixel row in step S1 described above, the selectable pixel row in step S2, and the selectable pixel row in step S3 is performed. A pixel row to be set as an actual template for applying the correction value to the detection is selected.
A plurality of pixel columns can be selected for a specific real template, and is not limited to one. For example, a plurality of adjacent pixel columns can be selected. The real template setting means 6 sets the real template in the top-to-bottom direction and the left-right direction for each of all the templates as described above. That is, in the example shown in FIG. 2, four real templates in the vertical direction and four real templates in the left-right direction are set for each of the four templates T 0101 to T 0810 .

【0027】図1に示す天地方向位置ずれ量検出手段7
は検査対象画像データ3を読込み、天地方向の位置ずれ
を検出するための実テンプレートを用いて天地方向の位
置ずれ量を演算する。天地方向位置ずれ量検出手段7は
基準画像データ2の画素列であるその実テンプレート
と、同じ位置(読込んだ画像データのアドレスが同じ)
の検査対象画像データ3の画素列とを、天地方向に位置
をずらしながら評価演算を行い評価数値を求め、一致度
が最も高い評価数値の位置によって天地方向位置ずれ量
を求める。
The vertical position deviation amount detecting means 7 shown in FIG.
Reads the inspection target image data 3 and calculates the amount of displacement in the up-down direction using an actual template for detecting the displacement in the up-down direction. The top-bottom direction positional deviation amount detecting means 7 has the same position (the address of the read image data is the same) as the actual template which is the pixel row of the reference image data 2
The evaluation calculation is performed by shifting the pixel row of the inspection target image data 3 in the vertical direction while shifting the position in the vertical direction, and the evaluation value is obtained.

【0028】一致度の評価数値としては、相関係数、対
応画素の差の絶対値の総和、対応画素の差の自乗の総
和、等を用いることができる。一致度の高い評価値は、
相関係数では極大値(relative maximum)であるが、差
の絶対値の総和と対応画素の差の自乗の総和では極小値
(relative minimum)である。以下の数1に相関係数の
計算式を、数2に差の絶対値の総和の計算式を、数3に
差の自乗の総和の計算式を示す。
As the evaluation value of the coincidence, a correlation coefficient, a sum of absolute values of differences between corresponding pixels, a sum of squares of differences between corresponding pixels, and the like can be used. An evaluation value with a high degree of matching is
The correlation coefficient is a relative maximum, but the sum of the absolute value of the difference and the sum of the squares of the difference of the corresponding pixels is a relative minimum. Equation 1 below shows the equation for calculating the correlation coefficient, Equation 2 shows the equation for calculating the sum of the absolute values of the differences, and Equation 3 shows the equation for calculating the sum of the squares of the differences.

【数1】 (Equation 1)

【数2】 (Equation 2)

【数3】 (Equation 3)

【0029】図1に示す左右方向位置ずれ量検出手段8
は検査対象画像データ3を読込み、左右方向の位置ずれ
を検出するための実テンプレートを用いて左右方向の位
置ずれ量を演算する。左右方向位置ずれ量検出手段7は
基準画像データ2の画素列であるその実テンプレート
と、同じ位置(読込んだ画像データのアドレスが同じ)
の検査対象画像データ3の画素列とを、左右方向に位置
をずらしながら評価演算して評価数値を求め、一致度が
最も高い評価数値の位置によって左右方向位置ずれ量を
求める。
A lateral displacement detecting means 8 shown in FIG.
Reads the image data 3 to be inspected and calculates the amount of displacement in the left-right direction using an actual template for detecting the displacement in the left-right direction. The horizontal position shift amount detecting means 7 has the same position (the address of the read image data is the same) as the actual template which is the pixel row of the reference image data 2
The evaluation value is obtained by performing an evaluation operation on the pixel row of the inspection target image data 3 while shifting the position in the left-right direction, and the left-right positional shift amount is obtained based on the position of the evaluation value having the highest matching degree.

【0030】図1に示す全方向位置ずれ量検出手段9は
検査対象画像データ3を読込み、全方向の位置ずれを検
出するための実テンプレートを用いて全方向の位置ずれ
量を演算する。全方向の位置ずれを検出するための実テ
ンプレートは、前述の天地方向の位置ずれを検出するた
めの実テンプレートと、前述の左右方向の位置ずれを検
出するための実テンプレートとを合わせた合体画素列で
ある。補正対象領域が小さい場合には、前述した十字形
状のテンプレート(図3参照)はこの合体画素列と同様
のテンプレートと見なすことができる。全方向位置ずれ
量検出手段7は基準画像データ2の画素列であるその実
テンプレートと、検査対象画像データ3の画素列とを、
全方向(天地左右方向)に位置をずらしながら評価演算
して評価数値を求め、一致度が最も高い評価数値の位置
によって全方向位置ずれ量を求める。
The omnidirectional displacement amount detecting means 9 shown in FIG. 1 reads the inspection target image data 3 and calculates the omnidirectional displacement amount using an actual template for detecting the omnidirectional displacement. The real template for detecting the misalignment in all directions is a combined pixel obtained by combining the real template for detecting the misalignment in the vertical direction described above and the real template for detecting the misalignment in the horizontal direction described above. Column. When the correction target area is small, the above-described cross-shaped template (see FIG. 3) can be regarded as a template similar to the united pixel row. The omnidirectional displacement amount detecting means 7 compares the actual template, which is the pixel row of the reference image data 2, with the pixel row of the inspection target image data 3,
An evaluation value is obtained by performing an evaluation operation while shifting the position in all directions (horizontal and vertical directions), and an omnidirectional positional shift amount is obtained from the position of the evaluation value having the highest degree of coincidence.

【0031】その全方向(天地左右方向)に位置をずら
す場合に、検査対象画像データ3の画素列の最初の位置
(中心位置)は、天地方向位置ずれ量検出手段7によっ
て得られた位置ずれ量を補正した天地方向の位置、およ
び、左右方向位置ずれ量検出手段8によって得られ位置
ずれ量を補正した左右方向の位置とする。この位置から
所定の範囲(2次元の領域)に位置をずらしながら評価
演算して評価数値を求め、一致度が最も高い評価数値の
位置によって全方向(天地左右方向)位置ずれ量を求め
る。このようにすることにより、実テンプレートとして
合体画素列が用いられ、しかも、所定の範囲を絞り込む
(小さくする)ことができるから、精密に位置ずれ量を
演算できるとともに演算時間を短縮することができる。
When the position is shifted in all directions (vertical and horizontal directions), the first position (center position) of the pixel row of the inspection target image data 3 is determined by the positional deviation obtained by the vertical positional deviation amount detecting means 7. The position in the vertical direction in which the amount has been corrected and the position in the horizontal direction in which the positional deviation obtained by the lateral positional deviation detecting means 8 have been corrected. An evaluation numerical value is obtained by performing an evaluation calculation while shifting the position from this position to a predetermined range (two-dimensional area), and a position shift amount in all directions (top and bottom right and left directions) is obtained from the position of the evaluation numerical value having the highest coincidence. By doing so, a united pixel row is used as an actual template, and a predetermined range can be narrowed (reduced), so that it is possible to accurately calculate the amount of displacement and to shorten the calculation time. .

【0032】上述の位置ずれ量の演算について、演算の
順を追って整理して説明する。図6は位置ずれ量を演算
する過程を示す絵図である。図6に示す一例では、特定
の実テンプレートに対し、隣接する複数の画素列が選択
されていることが絵図に示されている。このように、隣
接する複数の画素列が選択されている場合に、画素列の
一方から順に得られる位置ずれ量を初期値として探索範
囲を狭めれば、処理量を大幅に減らすことができる。通
常、隣接する画素列では位置ずれ量の変化は大きくはな
いから、探索範囲を狭めても問題は生じない。
The calculation of the above-mentioned positional deviation amount will be described in the order of calculation. FIG. 6 is a pictorial diagram showing a process of calculating the displacement amount. In the example shown in FIG. 6, the pictorial diagram shows that a plurality of adjacent pixel columns are selected for a specific real template. As described above, when a plurality of adjacent pixel columns are selected, the processing amount can be significantly reduced by narrowing the search range by using the positional deviation amounts sequentially obtained from one of the pixel columns as an initial value. Usually, since the change in the displacement amount is not large in adjacent pixel rows, no problem occurs even if the search range is narrowed.

【0033】まず、図6のステップS61において、天
地方向位置ずれ量検出手段7は天地方向位置ずれ量を演
算する。次に、ステップS62において、左右方向位置
ずれ量検出手段8は左右方向位置ずれ量を演算する。次
に、ステップS63において、全方向位置ずれ量演算手
段9は、ステップS61とステップS62において得ら
れた天地左右方向の位置ずれ量を補正した位置から所定
の範囲に位置をずらしながら全方向(天地左右方向)位
置ずれ量を求める。全方向位置ずれ量演算手段9によっ
て得られる全方向(天地左右方向)位置ずれ量は、ステ
ップS61とステップS62において得られた天地左右
方向の位置ずれ量よりも、高い精度が得られる。
First, in step S61 of FIG. 6, the vertical direction positional deviation amount detecting means 7 calculates the vertical direction positional deviation amount. Next, in step S62, the left / right positional deviation amount detection means 8 calculates the left / right positional deviation amount. Next, in step S63, the omnidirectional position shift amount calculating means 9 shifts the position in the predetermined direction from the position corrected in step S61 and step S62 for the position shift amount in the vertical and horizontal directions, and shifts the position to a predetermined range. (Right and left direction) Determine the amount of displacement. The omnidirectional (vertical left / right) positional deviation obtained by the omnidirectional positional deviation calculating means 9 is higher in accuracy than the vertical / horizontal positional deviation obtained in steps S61 and S62.

【0034】天地方向位置ずれ量検出手段7、左右方向
位置ずれ量検出手段8、および、全方向位置ずれ量演算
手段9は、上述のようにして、すべてのテンプレートの
各々について、全方向の位置ずれ量を演算する。すなわ
ち、図2に示す一例において、4つのテンプレートT
0101〜T0810の各々について、天地方向の位置ずれ量と
左右方向の位置ずれ量との2つづつ、合計8つの位置ず
れ量を演算する。
As described above, the top-to-bottom direction position shift amount detecting means 7, the left-right direction position shift amount detecting means 8, and the omnidirectional position shift amount calculating means 9 determine the position in all directions for all the templates. Calculate the shift amount. That is, in the example shown in FIG.
[0101] For each of T 0810 to T 0810 , a total of eight positional shift amounts are calculated, two each for the vertical position shift amount and the horizontal position shift amount.

【0035】これら複数の位置ずれ量は、撮像して得ら
れる検査対象画像データ3を、記憶手段を使用せず、直
接的にパイプライン処理方式等の処理手段に導入して演
算することができる。その場合には各テンプレートT
0101〜T0810の各々について、複数のプロセッサを用い
て同時並行処理を行うことができ、処理速度を高速にす
ることができる。
The plurality of displacement amounts can be calculated by directly introducing the inspection target image data 3 obtained by imaging into processing means such as a pipeline processing method without using storage means. . In that case, each template T
[0101] For each of T101 to T0810 , simultaneous parallel processing can be performed using a plurality of processors, and the processing speed can be increased.

【0036】これら、合計8つの位置ずれ量に基づい
て、図8に示すような、(a)平行移動、(b)伸縮、
(c)スキュー、(d)射影、(e)回転等の歪みを検
出することができる。すなわち、4つのテンプレートT
0101〜T0810の各々について、天地方向の位置ずれ量が
一致しており、また、左右方向の位置ずれ量も一致して
いる場合には、基準画像データに対して検査対象画像デ
ータが平行移動している(平行移動歪みを有する)こと
になる。
Based on these eight displacements, (a) translation, (b) expansion and contraction, and
Distortions such as (c) skew, (d) projection, and (e) rotation can be detected. That is, four templates T
[0101] If the amount of displacement in the vertical direction matches the amount of displacement in the horizontal direction for each of T101 to T0810, the image data to be inspected moves in parallel with respect to the reference image data. (Having translation distortion).

【0037】また、4つのテンプレートの内、テンプレ
ートT0101,T0110の2つと、テンプレートT0801,T
0810の2つについて、天地方向に間隔が広がる位置ずれ
量を有しており、一方、テンプレートT0101,T0110
2つと、テンプレートT0110,T0810の2つについて、
左右方向に間隔が狭まる位置ずれ量を有している場合に
は、基準画像データに対して検査対象画像データが天地
方向に伸び、左右方向に縮んでいる(天地伸び左右縮み
歪みを有する)ことになる。また、4つのテンプレート
の内、テンプレートT0101,T0110の2つと、テンプレ
ートT0801,T0810の2つについて、天地方向に間隔が
狭まる位置ずれ量を有しており、一方、テンプレートT
0101,T0801の2つと、テンプレートT0110,T0810
2つについて、左右方向に間隔が広がる位置ずれ量を有
している場合には、基準画像データに対して検査対象画
像データが天地方向に縮み、左右方向に伸びている(天
地縮み左右伸び歪みを有する)ことになる。
Of the four templates, two of the templates T 0101 and T 0110 and the templates T 0801 and T 0801
For two of 0810, has a positional deviation amount spreading interval in the circumferential direction, while the two and the template T 0101, T 0110, the two templates T 0110, T 0810,
In the case where there is a positional shift amount in which the interval is narrowed in the left-right direction, the image data to be inspected expands in the up-down direction and contracts in the left-right direction with respect to the reference image data (has distortion in the up-down direction and left-right contraction). become. Further, of the four templates, two of the templates T 0101 and T 0110 and two of the templates T 0801 and T 0810 have positional shift amounts whose intervals are narrowed in the vertical direction.
In the case where two of the templates T 0110 and T 0801 and the two templates T 0110 and T 0810 have positional deviation amounts that increase in the horizontal direction, the image data to be inspected with respect to the reference image data And expands in the left-right direction (shrinks up and down and has left-right elongation distortion).

【0038】また、4つのテンプレートT0101〜T0810
の各々について、天地方向の位置ずれ量は一致してお
り、一方、テンプレートT0101,T0110の2つと、テン
プレートT0801,T0810の2つについて、左右方向の位
置ずれ量が異なっている場合には、基準画像データに対
して検査対象画像データがスキュー歪みを有することに
なる。また、4つのテンプレートT0101〜T0810の各々
について、天地方向の位置ずれ量と、左右方向の位置ず
れ量がともに異なっている場合には、基準画像データに
対して検査対象画像データが射影歪みを有することにな
る。
Also, four templates T 0101 to T 0810
Are the same in the top and bottom directions, while the two templates T 0101 and T 0110 and the two templates T 0801 and T 0810 have different left and right displacements. In this case, the inspection target image data has skew distortion with respect to the reference image data. If the amount of displacement in the up-down direction and the amount of displacement in the left-right direction are different for each of the four templates T 0101 to T 0810 , the image data to be inspected is distorted relative to the reference image data. Will have.

【0039】また、4つのテンプレートT0101〜T0810
の内のT0101について天地方向の位置ずれ量と、左右方
向の位置ずれ量がともに正(または負)となっており、
08 10について天地方向の位置ずれ量と、左右方向の位
置ずれ量がともに負(または正)となっている場合に
は、基準データに対して検査対象画像データが回転歪み
を有することとなる。
Further, four templates T 0101 to T 0810
The position shift amount in the vertical direction and the position shift amount in the horizontal direction are both positive (or negative) for T 0101 in
A positional deviation amount in the circumferential direction about the T 08 10, when the positional deviation amount in the lateral direction are both a negative (or positive), the inspection target image data for the reference data is to have a rotational distortion .

【0040】基準画像データに対する検査対象画像デー
タの平行移動歪みだけを検出するだけならば、テンプレ
ートはすくなくとも1つあればよい。一方、基準画像デ
ータに対する検査対象画像データの平行移動歪み、伸縮
歪み、スキュー歪み、射影歪みを検出する場合には、テ
ンプレートはすくなくとも4つ必要である。図2に一例
を示したような、4角に設けた4つのテンプレートT
0101〜T0810だけでなく、自由な位置により多くのテン
プレートを用いることができる。その場合には、位置ず
れ量として、(何らかの原因で誤検出があった)極端
な値のものを除いて位置ずれ量を判定する、位置ずれ
量の平均値を演算する、等の操作を行うことができる。
すなわち、位置ずれ量を総合的に評価して精度や信頼性
をより高めることができる。また、より複雑な部分伸縮
などを受けた複雑複合歪みにも対応可能となる。
If only the translational distortion of the image data to be inspected with respect to the reference image data is to be detected, at least one template is required. On the other hand, when detecting translational distortion, expansion / contraction distortion, skew distortion, and projection distortion of the inspection target image data with respect to the reference image data, at least four templates are required. Four templates T provided at four corners as shown in FIG.
[0101] Not only T1010 but also more templates can be used at arbitrary positions. In this case, operations such as judging the amount of misregistration except for an extreme value (for which erroneous detection was performed for some reason) and calculating an average value of the misregistration amounts are performed. be able to.
That is, the accuracy and reliability can be further improved by comprehensively evaluating the displacement amount. In addition, it is possible to cope with complex composite distortions that have undergone more complicated partial expansion and contraction.

【0041】図7は本発明の撮像画像複合歪み検出装置
を印刷物の検査装置に適用した一例を示す図である。図
7において、71はカメラユニット、72はカメラ制御
部、73は印刷物検査装置本体、74は検査対象画像デ
ータメモリ、75は基準画像データメモリ、76は基準
入力司令入力部、77は複合歪み検出手段、78は複合
歪み補正比較部、79はパラメータ入力部である。基準
画像データメモリ75および検査対象画像データメモリ
74は、いずれも、印刷物1単位分(印刷ユニットで行
われる1周期分の印刷画面)をすくなくとも記憶できる
記憶容量を有している。
FIG. 7 is a diagram showing an example in which the captured image composite distortion detecting apparatus of the present invention is applied to a printed matter inspection apparatus. 7, reference numeral 71 denotes a camera unit, 72 denotes a camera control unit, 73 denotes a main body of a printed matter inspection apparatus, 74 denotes an image data memory to be inspected, 75 denotes a reference image data memory, 76 denotes a reference input command input unit, and 77 denotes a composite distortion detection. Means, 78 is a composite distortion correction comparing unit, and 79 is a parameter input unit. Each of the reference image data memory 75 and the inspection target image data memory 74 has a storage capacity capable of storing at least one unit of a printed material (a print screen for one cycle performed by the printing unit).

【0042】また、基準入力司令入力部76は、画像検
査を始めるにあたって行う基準画像を撮影し基準画像デ
ータメモリ75へデータ入力を行う司令、そして続いて
行う検査対象画像を撮影し検査対象画像データメモリ7
4へ入力を行う司令を行う。この司令によりセレクタの
切替えが行われる。基準入力司令入力部76で基準画像
データの入力が司令されると、図2のセレクタは基準画
像データメモリ75に撮像データの入力接続を行うが、
このときは複合歪み検出手段77、および、複合歪み補
正比較部78は動作しない。一方、基準入力司令入力部
76にて検査対象画像データの入力が司令されると、セ
レクタは検査対象画像データメモリ74に撮像データの
入力接続を行う。
The reference input command input unit 76 takes a reference image for starting the image inspection, inputs a command to the reference image data memory 75, and then takes a target image to be inspected and stores the target image data. Memory 7
Command to input to 4 is performed. This command switches the selector. When the input of the reference image data is commanded by the reference input command input unit 76, the selector of FIG. 2 connects the input of the imaging data to the reference image data memory 75,
At this time, the composite distortion detecting means 77 and the composite distortion correction comparing section 78 do not operate. On the other hand, when the input of the image data to be inspected is commanded by the reference input command input unit 76, the selector makes an input connection of the image data to the image data memory 74 for inspection.

【0043】そして、複合歪み検出手段77は検査対象
画像と基準画像の平行移動歪み、伸縮歪み、スキュー歪
み、複合歪み、または、それを示す位置ずれ量の検出を
行い、その結果の平行移動歪み、伸縮歪み、スキュー歪
み、射影歪み、等の複合歪み補正量、または、それを示
す位置ずれ量の補正量を歪み補正比較部78に送る。そ
して、その複合歪み補正量、または、それを示す位置ず
れ量の補正量を受け取った複合歪み補正比較部78は、
その補正量を考慮して検査対象画像データと基準画像デ
ータとの比較を行う。また、パラメータ入力部79は、
複合歪み検出手段77、および複合歪み補正比較部78
で用いられるパラメータを設定するための入力を行う。
パラメータとしては、たとえば、射影歪み補正比較部7
8で検査対象画像データと基準画像データとの比較を行
って、良否判定する場合の閾値を入力する。
The composite distortion detecting means 77 detects the translational distortion, the expansion / contraction distortion, the skew distortion, the composite distortion, or the amount of the positional deviation indicating the translational distortion between the inspection object image and the reference image. The correction amount of the composite distortion such as the expansion / contraction distortion, the skew distortion, the projection distortion, or the like, or the correction amount of the positional deviation amount indicating the same is sent to the distortion correction comparing unit 78. Then, the composite distortion correction comparing unit 78, which has received the composite distortion correction amount or the correction amount of the positional deviation amount indicating the same,
The inspection target image data and the reference image data are compared in consideration of the correction amount. Also, the parameter input unit 79
Composite distortion detecting means 77 and composite distortion correction comparing section 78
Input for setting the parameters used in.
As the parameter, for example, the projection distortion correction comparing unit 7
In step 8, a comparison is made between the image data to be inspected and the reference image data, and a threshold for judging pass / fail is input.

【0044】[0044]

【発明の効果】以上のように本発明によれば、幾何歪み
を補正するために必要とされる位置ずれ量を検出し、し
かも、画像を複数に分割した小さな補正対象領域の位置
ずれ量を検出する場合であっても大きい位置ずれ量を検
出することができる撮像画像幾何歪み検出装置が提供さ
れる。また、本発明の第2の形態の撮像画像幾何歪み検
出装置によれば、マッチング演算に適した実テンプレー
トを用い、天地方向と左右方向の位置ずれ量を別々に演
算し、最後に、その天地方向と左右方向の位置ずれ量の
近傍だけについて全方向位置ずれ量を演算するから、位
置ずれ量を良好な精度で高速に演算することができる。
また、本発明の第3の形態の撮像画像幾何歪み検出装置
によれば、補正対象領域よりも大きいテンプレートが用
いられ、しかも演算の対象となる画素数を矩形等に比較
して少なくすることができるから、位置ずれ量を良好な
精度で高速に演算することができる。
As described above, according to the present invention, the amount of positional deviation required for correcting geometric distortion is detected, and the amount of positional deviation of a small correction target area obtained by dividing an image into a plurality of parts is detected. Provided is a captured image geometric distortion detection device capable of detecting a large positional deviation amount even in the case of performing detection. Further, according to the captured image geometric distortion detection device of the second aspect of the present invention, the real-time template suitable for the matching calculation is used to separately calculate the vertical and horizontal displacements. Since the directional displacement is calculated only in the vicinity of the displacement in the left and right directions, the displacement can be calculated at high speed with good accuracy.
Further, according to the captured image geometric distortion detection device of the third aspect of the present invention, a template larger than the correction target area is used, and the number of pixels to be calculated is reduced as compared with a rectangle or the like. Therefore, the amount of displacement can be calculated at high speed with good accuracy.

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

【図1】本発明の撮像画像複合歪み検出装置の構成を示
す図である。
FIG. 1 is a diagram showing a configuration of a captured image composite distortion detection device of the present invention.

【図2】テンプレートの一例を示す図である。FIG. 2 is a diagram illustrating an example of a template.

【図3】矩形状のテンプレートと十字形状のテンプレー
トを比較して示す図である。
FIG. 3 is a diagram showing a comparison between a rectangular template and a cross template.

【図4】マッチング演算に適する実テンプレートの一例
を示す図である。
FIG. 4 is a diagram showing an example of a real template suitable for a matching operation.

【図5】実テンプレートとして設定する画素列を選択す
る過程の一例を示すフロー図である。
FIG. 5 is a flowchart illustrating an example of a process of selecting a pixel column to be set as an actual template.

【図6】位置ずれ量を演算する過程を示す絵図である。FIG. 6 is a pictorial diagram showing a process of calculating a displacement amount.

【図7】本発明の撮像画像複合歪み検出装置を印刷物の
検査装置に適用した一例を示す図である。
FIG. 7 is a diagram showing an example in which the captured image composite distortion detection device of the present invention is applied to a printed matter inspection device.

【図8】平行移動、伸縮、スキュー、射影の各歪みを示
す図である。
FIG. 8 is a diagram illustrating each distortion of translation, expansion, contraction, skew, and projection.

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

1 テンプレートデータ 2 基準画像データ 3 検査対象画像データ 4 位置ずれ量 5 テンプレートマッチング手段 6 実テンプレート設定手段 7 天地方向位置ずれ量検出手段 8 左右方向位置ずれ量検出手段 9 全方向位置ずれ量検出手段 61 カメラユニット 62 カメラ制御部 63 印刷物検査装置本体 64 検査対象画像データメモリ 65 基準画像データメモリ 66 基準入力司令入力部 67 複合歪み検出手段 68 複合歪み補正比較部 69 パラメータ入力部 REFERENCE SIGNS LIST 1 template data 2 reference image data 3 inspection target image data 4 positional shift amount 5 template matching means 6 actual template setting means 7 vertical position shift amount detecting means 8 lateral position shift amount detecting means 9 omnidirectional position shift amount detecting means 61 Camera unit 62 Camera control unit 63 Printed matter inspection device main body 64 Inspection object image data memory 65 Reference image data memory 66 Reference input command input unit 67 Composite distortion detection means 68 Composite distortion correction comparison unit 69 Parameter input unit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】ラインセンサカメラによる主走査とウェブ
の移送による副走査とを組み合わせて前記ウェブを撮像
し、得られる画像検査のための基準画像と検査対象画像
について、テンプレートを用い前記基準画像と前記検査
対象画像との位置ずれ量を検出するテンプレートマッチ
ング手段を有する撮像画像幾何歪み検出装置であって、 前記テンプレートが前記基準画像または前記検査対象画
像を複数に分割した補正対象領域に配置され、かつ、前
記テンプレートが前記補正対象領域よりも大きいことを
特徴とする撮像画像幾何歪み検出装置。
An image of the web is taken by combining a main scan by a line sensor camera and a sub-scan by transporting the web, and a reference image for image inspection and an image to be inspected are obtained using a template. A captured image geometric distortion detection device having a template matching unit that detects a positional shift amount with respect to the inspection target image, wherein the template is arranged in a correction target region obtained by dividing the reference image or the inspection target image into a plurality of parts, The captured image geometric distortion detecting device is characterized in that the template is larger than the correction target area.
【請求項2】請求項1記載の撮像画像幾何歪み検出装置
において、前記テンプレートマッチング手段は、 前記テンプレートの領域内でマッチング演算に適し実際
に用いる実テンプレートの詳細位置を設定する実テンプ
レート設定手段と、 天地方向の位置ずれ量を検出する天地方向位置ずれ量検
出手段と、 左右方向の位置ずれ量を検出する左右方向位置ずれ量検
出手段と、 全方向の位置ずれ量を検出する全方向位置ずれ量検出手
段と、 から成ることを特徴とする撮像画像幾何歪み検出装置。
2. A captured image geometric distortion detecting apparatus according to claim 1, wherein said template matching means includes: a real template setting means for setting a detailed position of a real template to be used for matching operation and actually used within a region of the template; , A vertical position shift amount detecting means for detecting a vertical position shift amount, a horizontal position shift amount detecting means for detecting a horizontal position shift amount, and an omnidirectional position shift detecting an omnidirectional position shift amount. An amount detection means, comprising: a captured image geometric distortion detection device;
【請求項3】請求項1または2記載の撮像画像幾何歪み
検出装置において、前記テンプレートは交差部分を前記
補正対象領域のほぼ中央の1画素とする十文字形状を有
することを特徴とする撮像画像幾何歪み検出装置。
3. The captured image geometric distortion detecting apparatus according to claim 1, wherein the template has a cross-shaped shape in which an intersecting portion is substantially one pixel at the center of the correction target area. Strain detector.
JP10252256A 1998-09-07 1998-09-07 Picked up image geometric distortion detection device Pending JP2000082141A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10252256A JP2000082141A (en) 1998-09-07 1998-09-07 Picked up image geometric distortion detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10252256A JP2000082141A (en) 1998-09-07 1998-09-07 Picked up image geometric distortion detection device

Publications (1)

Publication Number Publication Date
JP2000082141A true JP2000082141A (en) 2000-03-21

Family

ID=17234707

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10252256A Pending JP2000082141A (en) 1998-09-07 1998-09-07 Picked up image geometric distortion detection device

Country Status (1)

Country Link
JP (1) JP2000082141A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001325587A (en) * 2000-05-16 2001-11-22 Dainippon Printing Co Ltd Outward appearance inspecting device
JP2006221461A (en) * 2005-02-10 2006-08-24 Toyo Noki Kk Speed sensor and speed sensor program
JP2014041608A (en) * 2012-08-21 2014-03-06 Ricoh Co Ltd System having function for verifying matching with expected print output and method for verifying the same
WO2014045508A1 (en) * 2012-09-18 2014-03-27 日本電気株式会社 Inspection device, inspection method, and inspection program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001325587A (en) * 2000-05-16 2001-11-22 Dainippon Printing Co Ltd Outward appearance inspecting device
JP2006221461A (en) * 2005-02-10 2006-08-24 Toyo Noki Kk Speed sensor and speed sensor program
JP4699773B2 (en) * 2005-02-10 2011-06-15 東洋農機株式会社 Speed sensor, speed sensor program, and mobile body equipped with these
JP2014041608A (en) * 2012-08-21 2014-03-06 Ricoh Co Ltd System having function for verifying matching with expected print output and method for verifying the same
WO2014045508A1 (en) * 2012-09-18 2014-03-27 日本電気株式会社 Inspection device, inspection method, and inspection program

Similar Documents

Publication Publication Date Title
JP6142882B2 (en) Image forming apparatus
US4870505A (en) Method of and apparatus for connecting output image signals from a plurality of line image sensors using a correction read pattern
US7019713B2 (en) Methods and measurement engine for aligning multi-projector display systems
JP3851384B2 (en) Image composition apparatus and method
TWI519801B (en) System, method, and program storage device for inspecting wafer area using a reference wafer area
US5764793A (en) Method of and apparatus for inspecting pattern defects
TWI605529B (en) A system, a method and a computer program product for cad-based registration
JP3693508B2 (en) Pattern comparison method and visual inspection apparatus
US20080037860A1 (en) Pattern inspection apparatus, image alignment method, displacement amount estimation method, and computer-readable recording medium with program recorded thereon
JP2009198440A (en) Correction pattern image generation device, pattern inspection apparatus, and correction pattern image generation method
JP7017207B2 (en) Image inspection device and its image inspection method
JP2008147976A (en) Image inclination correction device and image inclination correcting method
CN102265628A (en) Method for detecting and correcting bad pixels in image sensor
JPH06325162A (en) Image processor
JP2000082141A (en) Picked up image geometric distortion detection device
JP2009031006A (en) Visual inspection device and method
JP4121605B2 (en) Captured image composite distortion detector
KR20140113449A (en) Drawing data generating method, drawing method, drawing data generating apparatus and drawing apparatus
JPH11257927A (en) Pick-up image expansion-contraction distortion detector
US11644426B2 (en) Methods and systems for generating calibration data for wafer analysis
JP2000082135A (en) Picked up image geometric distortion detection device
JPH1139492A (en) Printed mateter inspection device
JP2005346393A (en) Stereo image recognition device and its method
JP2000105828A (en) Position shift correcting device
JP3031286B2 (en) Inspection method of printed matter

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050831

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081010

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081028

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090304