JPH09113225A - Image processing device and method and device for visual inspection of object - Google Patents

Image processing device and method and device for visual inspection of object

Info

Publication number
JPH09113225A
JPH09113225A JP7292236A JP29223695A JPH09113225A JP H09113225 A JPH09113225 A JP H09113225A JP 7292236 A JP7292236 A JP 7292236A JP 29223695 A JP29223695 A JP 29223695A JP H09113225 A JPH09113225 A JP H09113225A
Authority
JP
Japan
Prior art keywords
image
area
rotation
inspection
deviation
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
JP7292236A
Other languages
Japanese (ja)
Inventor
Koji Suzuki
孝司 鈴木
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP7292236A priority Critical patent/JPH09113225A/en
Publication of JPH09113225A publication Critical patent/JPH09113225A/en
Pending legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform the visual inspection of a circular object in high accuracy by using a picture wherein the circular object having a concentric repeating pattern is arranged at unfixed position and rotational angle. SOLUTION: In a model preparation section 4, a correction model for positional displacement as a picture of an area including the peripheral part of a reference object, a correction model for rotational displacement as a picture of an area including an optional unit pattern, and an inspection model as a picture of inspection area are prepared in advance by using a reference picture, and an area corresponding to the correction model for positional displacement is extracted from a picture to be inspected through a part 7 for correcting positional displacement, then the positional displacement quantity of an object to be inspected is obtained according to the position of the extracted area, for correction of positional displacement. In addition, an area corresponding to the correction model for rotational displacement is extracted by a part 8 for correcting rotational displacement, and the rotational displacement quantity is obtained according to the position of the extracted area, for correction of positional displacement, then an inspection execution part 9 performs the visual inspection by comparing the picture of the inspection area in the corrected picture to be inspected with the inspection model.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、同心円状に配置さ
れた複数の特徴的な単位パターン(以下この複数の単位
パターンを、単に同心円状繰り返しパターンと称する)
を有する円形物体の画像において、画像上の位置および
回転角が不特定である前記円形物体を画像上の所定位置
かつ所定回転位置に配置する画像処理装置および方法、
ならびに前記画像を用いて前記円形物体の外観上の欠陥
の有無を検査する物体外観検査装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a plurality of characteristic unit patterns arranged concentrically (hereinafter, the plurality of unit patterns are simply referred to as concentric circular repeating patterns).
An image processing device and method for arranging the circular object whose position and rotation angle on the image are unspecified at a predetermined position and a predetermined rotation position on the image,
In addition, the present invention relates to an object appearance inspection device for inspecting the presence or absence of a defect on the appearance of the circular object using the image.

【0002】[0002]

【従来の技術】同心円状繰り返しパターンを有する円形
の製品(検査対象物体)の外観上の欠陥の有無を検査す
る物体外観検査装置は、基準となる欠陥の無い製品(基
準物体)の画像(モデル)を予め登録しておき、検査対
象物体の画像(検査対象画像)と、前記モデルとを比較
し(パターンマッチング処理)、その一致度によって欠
陥の有無を判定するものである。
2. Description of the Related Art An object appearance inspection apparatus for inspecting a circular product (object to be inspected) having a concentric repeating pattern for appearance defects is an image (model) of a product (reference object) having no defect as a reference. ) Is registered in advance, the image of the object to be inspected (inspection image) is compared with the model (pattern matching process), and the presence or absence of a defect is determined by the degree of coincidence.

【0003】ところで検査対象物体を撮像するカメラ
は、通常製造ラインの製品搬出側に配置され、検査対象
物体は搬送装置上に不規則に置かれて移動してくるた
め、この検査対象物体を撮像して得られた検査対象画像
においては、検査対象物体の位置および回転角は不特定
である。
By the way, a camera for picking up an image of an object to be inspected is usually arranged on the product unloading side of a manufacturing line, and the object to be inspected is randomly placed on a carrier and moves, so that the object to be inspected is picked up. In the image to be inspected obtained in this way, the position and rotation angle of the object to be inspected are unspecified.

【0004】そこで、従来の物体外観検査装置の一例と
して以下に示すものがある。
Therefore, the following is an example of a conventional object appearance inspection apparatus.

【0005】基準物体を撮像することにより得られた基
準画像(その画角は検査対象画像と同じ)から基準物体
の画像を切り出して基準モデルとし、さらにこの基準モ
デルにおいて、基準物体を所定角刻みで回転させた各画
像を作成して回転モデルとし、これらのモデルを登録し
ておき、検査対象画像における任意の領域(その画角は
モデルと同じ)と、各モデルとのパターンマッチング処
理を順次行い、一致度がある値以上である検査対象画像
の領域とモデルの組み合わせが存在すれば、検査対象物
体の外観上の欠陥は無いものと判断する。
An image of the reference object is cut out from a reference image obtained by picking up an image of the reference object (the angle of view of which is the same as the image to be inspected) to obtain a reference model. Create each rotated image by using as a rotation model, register these models, and perform pattern matching processing with each area in the image to be inspected (the angle of view is the same as the model) in sequence. If there is a combination of the region of the image to be inspected and the model whose degree of coincidence is a certain value or more, it is determined that there is no defect in the appearance of the object to be inspected.

【0006】尚、上記の回転モデルは、単位パターンの
個数がN個である場合は、±(360/(2N))°の
範囲で作成される。
The above rotation model is created within a range of ± (360 / (2N)) ° when the number of unit patterns is N.

【0007】しかし、上記従来の物体外観検査装置にお
いては、円形物体全体である大きな画像からなる複数個
のモデル(基準モデルおよび回転モデル)を記憶しなけ
ればならないので、膨大なメモリ容量を必要とし、また
この大きなモデルを用いて検査対象画像の任意の領域と
のパターンマッチング処理を行わなければならないの
で、この処理に時間がかかり過ぎてしまい、実用的でな
いという問題があった。
However, in the above-mentioned conventional object appearance inspection apparatus, since a plurality of models (reference model and rotation model) consisting of a large image of the entire circular object must be stored, a huge memory capacity is required. Moreover, since the pattern matching process with an arbitrary region of the image to be inspected must be performed using this large model, this process takes too much time, which is not practical.

【0008】そこで、このような問題に対応した従来の
物体外観検査装置の一例として、以下に示すものがあ
る。
Therefore, the following is an example of a conventional object appearance inspection apparatus which copes with such a problem.

【0009】基準画像において基準物体のある単位パタ
ーンを含む第一の領域と、他の単位パターンを含む第二
の領域を設定し、第一および第二の領域の画像を切り出
して、それぞれ第一および第二の補正用基準モデルと
し、第一および第二の補正用基準モデルに対してそれぞ
れ±(360/(2N))°の範囲で補正用回転モデル
を作成し、これらの第一および第二の補正用モデルを登
録しておき、検査対象画像の任意の領域と、第一および
第二の各補正用モデルとのパターンマッチング処理を行
うことにより、検査対象画像において、前記第一および
第二の領域の対応する領域をそれぞれ抽出し、抽出され
た二つの領域の位置関係に基づいて、検査対象物体の位
置および回転角を算出し、基準位置からの位置ずれ量お
よび基準回転角からの回転ずれ量を求め、これらのずれ
量を補正するための画像処理を検査対象画像に施す。
In the reference image, a first area including a unit pattern of the reference object and a second area including another unit pattern are set, and the images of the first and second areas are cut out to obtain the first area and the first area, respectively. And a second reference model for correction, and a rotation model for correction is created in a range of ± (360 / (2N)) ° with respect to the first and second reference models for correction. By registering the second correction model and performing pattern matching processing between an arbitrary region of the inspection target image and each of the first and second correction models, in the inspection target image, the first and the second correction models are registered. Extract the corresponding areas of the two areas, respectively, based on the positional relationship between the two extracted areas, calculate the position and rotation angle of the object to be inspected, the amount of displacement from the reference position and the reference rotation angle The amount of rotation deviation is obtained, and image processing for correcting these deviations is performed on the inspection target image.

【0010】このずれ量補正された検査対象画像におい
ては、同心円状繰り返しパターンは所定位置に配置さ
れ、従って検査対象物体は基準位置かつ基準回転位置に
配置されるので、検査対象物体を含む所定領域を検査領
域として予め設定しておき、また基準画像から基準物体
を含む領域の画像を切り出して検査用モデルとして登録
しておき(回転モデルは不要)、この検査用モデルとず
れ量補正された検査対象画像における検査領域の画像と
のパターンマッチング処理を行う。
In the inspection object image whose displacement amount has been corrected, the concentric repeating pattern is arranged at a predetermined position, and therefore the inspection object is arranged at the reference position and the reference rotation position, so that the predetermined area including the inspection object is located. Is set as an inspection area in advance, and an image of an area including a reference object is cut out from the reference image and registered as an inspection model (a rotation model is not necessary). A pattern matching process with the image of the inspection area in the target image is performed.

【0011】[0011]

【発明が解決しようとする課題】しかしながらこのよう
な従来の物体外観検査装置においては、検査対象物体に
おける単位パターン個数が多い場合は、ずれ量の補正精
度が悪くなり、そのため検査対象物体の欠陥の検出精度
が悪くなるという問題があった。
However, in such a conventional object appearance inspection apparatus, when the number of unit patterns in the object to be inspected is large, the correction accuracy of the deviation amount is deteriorated, so that the defect of the object to be inspected There was a problem that the detection accuracy deteriorates.

【0012】例えば、円形物体の単位パターン個数が2
0個であり、基準画像において、ある単位パターンを含
む領域を第一の領域に設定し、この第一の領域の単位パ
ターンから数えて10個目の単位パターンを含む領域を
第二の領域に設定したとすると、検査対象画像におい
て、抽出された第一の領域に対応する領域の単位パター
ンから数えて9個目あるいは11個目の単位パターンを
含む領域が、第二の領域に対応する領域として誤って抽
出されることがあり、算出されたずれ量に誤差が含ま
れ、そのため検査対象物体の同心円状繰り返しパターン
は所定位置に補正されない。
For example, if the number of unit patterns of a circular object is 2
In the reference image, the area including a certain unit pattern is set as the first area in the reference image, and the area including the tenth unit pattern counted from the unit pattern of the first area is set as the second area. If set, in the image to be inspected, the area including the ninth or eleventh unit pattern counted from the extracted unit pattern of the area corresponding to the first area is the area corresponding to the second area. May be erroneously extracted, and the calculated deviation amount includes an error, so that the concentric repeating pattern of the inspection object is not corrected to a predetermined position.

【0013】本発明はこのような従来の問題点を解決す
るものであり、同心円状繰り返しパターンを有する円形
物体の画像において、位置および回転角が不特定である
前記円形物体を所定位置かつ所定回転位置に高精度に配
置することができる画像処理装置および方法、ならびに
前記円形物体が不特定な位置および回転角に配置されて
いる画像を用いて、前記円形物体の外観上の欠陥の有無
を高精度に検査することができる物体外観検査装置を提
供することを目的とするものである。
The present invention solves such a conventional problem, and in an image of a circular object having a concentric circular repeating pattern, the circular object whose position and rotation angle are not specified is rotated at a predetermined position and a predetermined rotation. By using an image processing device and method capable of arranging the circular object with high accuracy, and an image in which the circular object is arranged at an unspecified position and rotation angle, it is possible to determine whether or not there is a defect in the appearance of the circular object. It is an object of the present invention to provide an object appearance inspection device that can inspect accurately.

【0014】[0014]

【課題を解決するための手段】上記の目的を達成するた
めに本発明の請求項1記載の画像処理方法は、複数の特
徴的な単位パターンが同心円状に配置された円形物体に
関して、基準物体を撮像して得られた基準画像に基づい
て物体の基準位置および基準回転位置を算出して予め記
憶しておき、処理対象物体を撮像して得られた処理対象
画像において、前記処理対象物体を前記基準位置および
基準回転位置に配置する方法であって、前記基準画像上
に設定した、前記基準物体の周縁部を含む少なくとも一
つの位置ずれ補正用領域の位置に基づいて前記基準物体
の固有点座標を算出し、この固有点座標を前記基準位置
として記憶するとともに、前記位置ずれ補正用領域の画
像を前記基準画像から切り出し、位置ずれ補正用モデル
として予め記憶しておき、前記基準画像上に設定した、
任意の前記単位パターンを含む回転ずれ補正用領域と前
記基準位置との位置関係に基づいて前記基準物体の回転
角を算出し、この回転角を前記基準回転位置として記憶
するとともに、前記回転ずれ補正用領域の画像を前記基
準画像から切り出し、回転ずれ補正用モデルとして予め
記憶しておき、前記処理対象画像において、前記位置ず
れ補正用モデルに対応する領域を抽出し、抽出した領域
の位置に基づいて前記処理対象物体の固有点座標を算出
し、この処理対象物体の固有点座標と前記基準位置との
差から前記処理対象物体の位置ずれ量を求め、前記処理
対象画像に対して所定のスクロール処理を施すことによ
り、前記位置ずれ量を補正し、この位置ずれ補正した処
理対象画像において、前記回転ずれ補正用モデルに対応
する領域を抽出し、抽出した領域と前記基準位置との位
置関係に基づいて前記処理対象物体の回転角を算出し、
この処理対象物体の回転角と前記基準回転位置との差か
ら前記処理対象物体の回転ずれ量を求め、前記位置ずれ
補正した処理対象画像に対して所定のアフィン変換処理
を施すことにより、前記回転ずれ量を補正することを特
徴とする方法である。
In order to achieve the above object, the image processing method according to claim 1 of the present invention is a reference object for a circular object in which a plurality of characteristic unit patterns are concentrically arranged. The reference position and the reference rotation position of the object are calculated based on the reference image obtained by capturing and are stored in advance, and the processing target image is obtained by capturing the processing target object. A method of arranging at the reference position and the reference rotation position, wherein the eigenpoint of the reference object is set based on the position of at least one misregistration correction region including the peripheral portion of the reference object, which is set on the reference image. The coordinates are calculated, and the eigenpoint coordinates are stored as the reference position, and the image of the misregistration correction area is cut out from the reference image and stored in advance as a misregistration correction model. Place was set on the reference image,
The rotation angle of the reference object is calculated based on the positional relationship between the rotation deviation correction area including the arbitrary unit pattern and the reference position, and the rotation angle is stored as the reference rotation position, and the rotation deviation correction is performed. The image of the working area is cut out from the reference image and stored in advance as a rotation deviation correction model, and in the processing target image, an area corresponding to the position deviation correction model is extracted, and based on the position of the extracted area. Calculate the eigenpoint coordinates of the object to be processed, determine the amount of displacement of the object to be processed from the difference between the coordinates of the eigenpoint of the object to be processed and the reference position, and scroll predetermined to the image to be processed By performing the processing, the positional deviation amount is corrected, and the region corresponding to the rotational deviation correction model is extracted from the processing target image subjected to the positional deviation correction. Calculating a rotation angle of the object to be treated on the basis of the extracted region with the positional relationship between the reference position,
From the difference between the rotation angle of the object to be processed and the reference rotational position, the amount of rotation deviation of the object to be processed is obtained, and the predetermined image is subjected to a predetermined affine transformation process to obtain the rotation. This is a method characterized by correcting the amount of deviation.

【0015】また本発明の請求項2記載の画像処理方法
は、上記の請求項1記載の画像処理方法において、前記
回転ずれ補正用領域を含み、かつこの領域に隣接する二
つの単位パターンの隣接側半分ずつを含む、前記基準画
像上に設定したサーチ領域を予め記憶しておき、前記位
置ずれ量補正した処理対象画像における前記サーチ領域
において、前記回転ずれ補正用モデルに対応する領域を
抽出することを特徴とする方法である。
An image processing method according to a second aspect of the present invention is the image processing method according to the first aspect, in which two unit patterns that include the rotation deviation correction area and are adjacent to this area are adjacent to each other. A search area set on the reference image, which includes each of the side halves, is stored in advance, and an area corresponding to the rotation deviation correction model is extracted from the search area in the processing target image having the positional deviation amount corrected. It is a method characterized by that.

【0016】次に本発明の請求項3記載の画像処理装置
は、複数の特徴的な単位パターンが同心円状に配置され
た円形物体に関して、基準物体を撮像して得られた基準
画像に基づいて物体の基準位置および基準回転位置を算
出して予め記憶しておき、処理対象物体を撮像して得ら
れた処理対象画像において、前記処理対象物体を前記基
準位置および基準回転位置に配置するものであって、前
記基準画像上に、前記基準物体の周縁部を含む少なくと
も一つの位置ずれ補正用領域を設定し、また任意の前記
単位パターンを含む回転ずれ補正用領域を設定するため
の操作手段と、前記位置ずれ補正用領域の位置に基づい
て前記基準物体の固有点座標を前記基準位置として算出
し、また前記回転ずれ補正用領域と前記基準位置との位
置関係に基づいて前記基準物体の回転角を前記基準回転
位置として算出する基準値算出手段と、前記基準画像か
ら、前記位置ずれ補正用領域の画像を切り出すことによ
り位置ずれ補正用モデルを作成し、また前記回転ずれ補
正用領域の画像を切り出すことにより回転ずれ補正用モ
デルを作成するモデル作成手段と、前記位置ずれ補正用
モデルおよび回転ずれ補正用モデルを記憶するモデル記
憶手段と、前記基準位置および基準回転位置を記憶する
基準値記憶手段と、前記処理対象画像において、前記位
置ずれ補正用モデルに対応する領域をそれぞれ抽出し、
抽出した領域の位置に基づいて前記処理対象物体の固有
点座標を算出し、この固有点座標と前記基準位置との差
から前記処理対象物体の位置ずれ量を求める位置ずれ量
算出手段と、前記処理対象画像に対して所定のスクロー
ル処理を施すことにより、前記位置ずれ量を補正する位
置ずれ補正手段と、前記位置ずれ補正された処理対象画
像において、前記回転ずれ補正用モデルに対応する領域
を抽出し、抽出した領域と前記基準位置との位置関係に
基づいて前記処理対象物体の回転角を算出し、この回転
角と前記基準回転位置との差から前記処理対象物体の回
転ずれ量を求める回転ずれ量算出手段と、前記位置ずれ
補正された処理対象画像に対して所定のアフィン変換処
理を施すことにより、前記処理対象物体の回転ずれ量を
補正する回転ずれ補正手段とを具備することを特徴とす
るものである。
Next, the image processing apparatus according to claim 3 of the present invention is based on a reference image obtained by imaging a reference object for a circular object in which a plurality of characteristic unit patterns are concentrically arranged. A reference position and a reference rotation position of an object are calculated and stored in advance, and in the processing target image obtained by imaging the processing target object, the processing target object is arranged at the reference position and the reference rotation position. And an operation unit for setting at least one position deviation correction area including the peripheral portion of the reference object on the reference image, and setting a rotation deviation correction area including any unit pattern. , Calculating the eigenpoint coordinates of the reference object as the reference position based on the position of the misregistration correction region, and based on the positional relationship between the rotation misregistration correction region and the reference position A reference value calculating unit that calculates the rotation angle of the reference object as the reference rotation position, and a position deviation correction model is created by cutting out the image of the position deviation correction region from the reference image, and the rotation deviation is also generated. A model creating unit that creates a rotation deviation correction model by cutting out an image of the correction area, a model storage unit that stores the position deviation correction model and the rotation deviation correction model, and the reference position and the reference rotation position are stored. A reference value storage unit to be stored, and in the processing target image, an area corresponding to the misregistration correction model is extracted,
Position deviation amount calculating means for calculating the eigenpoint coordinates of the processing target object based on the position of the extracted region, and for calculating the position deviation amount of the processing target object from the difference between the eigenpoint coordinates and the reference position; By performing a predetermined scrolling process on the processing target image, a positional shift correction unit that corrects the positional shift amount and an area corresponding to the rotational shift correction model in the positional shift corrected processing target image are generated. The rotation angle of the object to be processed is calculated based on the positional relationship between the extracted area and the reference position, and the amount of rotational deviation of the object to be processed is calculated from the difference between the rotation angle and the reference rotational position. A rotation deviation amount calculating means and a rotation deviation for correcting the rotation deviation amount of the object to be processed by performing a predetermined affine transformation process on the position deviation-corrected processing object image. It is characterized in that it comprises a positive means.

【0017】また本発明の請求項4記載の画像処理装置
は、上記の請求項3記載の画像処理装置において、前記
回転ずれ補正用領域を含み、かつこの回転ずれ補正用領
域に隣接する二つの単位パターンの隣接側半分ずつを含
むサーチ領域を前記基準画像上に設定するための前記操
作手段と、前記サーチ領域を記憶する領域記憶手段と、
前記位置ずれ補正された処理対象画像における前記サー
チ領域において、前記回転ずれ補正用モデルに対応する
領域を抽出する前記回転ずれ量算出手段とを具備するこ
とを特徴とするものである。
An image processing apparatus according to a fourth aspect of the present invention is the image processing apparatus according to the third aspect, wherein the image processing apparatus includes two areas that include the rotation deviation correction area and that are adjacent to the rotation deviation correction area. The operation means for setting a search area including the adjacent halves of the unit pattern on the reference image, and area storage means for storing the search area,
The rotation deviation amount calculation means for extracting an area corresponding to the rotation deviation correction model in the search area in the position deviation corrected image to be processed is provided.

【0018】次に本発明の請求項5記載の物体外観検査
装置は、複数の特徴的な単位パターンが同心円状に配置
された円形物体に関して、検査対象物体の画像を、予め
記憶している基準物体の画像と比較することにより、前
記検査対象物体の外観上の欠陥の有無を検査するもので
あって、前記基準物体を撮像して得られた基準画像上
に、前記基準物体の周縁部を含む少なくとも一つの位置
ずれ補正用領域を設定し、また任意の前記単位パターン
を含む回転ずれ補正用領域を設定し、さらに前記基準物
体の全部あるいは一部を含む少なくとも一つの検査領域
を設定するための操作手段と、前記位置ずれ補正用領域
の位置に基づいて前記基準物体の固有点座標を基準位置
として算出し、また前記回転ずれ補正用領域と前記基準
位置との位置関係に基づいて前記基準物体の回転角を基
準回転位置として算出する基準値算出手段と、前記基準
画像から、前記位置ずれ補正用領域の画像を切り出すこ
とにより位置ずれ補正用モデルを作成し、また前記回転
ずれ補正用領域の画像を切り出すことにより回転ずれ補
正用モデルを作成し、さらに前記検査領域の画像を切り
出すことにより検査用モデルを作成するモデル作成手段
と、前記検査領域を記憶する領域記憶手段と、前記位置
ずれ補正用モデル、回転ずれ補正用モデル、および検査
用モデルを記憶するモデル記憶手段と、前記基準位置お
よび基準回転位置を記憶する基準値記憶手段と、前記検
査対象物体を撮像して得られた検査対象画像において、
前記位置ずれ補正用モデルに対応する領域を抽出し、抽
出した領域の位置に基づいて前記検査対象物体の固有点
座標を算出し、この固有点座標と前記基準位置との差か
ら前記検査対象物体の位置ずれ量を求める位置ずれ量算
出手段と、前記検査対象画像に対して所定のスクロール
処理を施すことにより、前記位置ずれ量を補正する位置
ずれ補正手段と、前記位置ずれ補正された検査対象画像
において、前記回転ずれ補正用モデルに対応する領域を
抽出し、抽出した領域と前記基準位置との位置関係に基
づいて前記検査対象物体の回転角を算出し、この回転角
と前記基準回転位置との差から前記検査対象物体の回転
ずれ量を求める回転ずれ量算出手段と、前記位置ずれ補
正された検査対象画像に対して所定のアフィン変換処理
を施すことにより、前記回転ずれ量を補正する回転ずれ
補正手段と、前記位置ずれおよび回転ずれが補正された
検査対象画像における前記検査領域の画像と、前記検査
用モデルとを比較することにより、前記検査対象物体の
外観上の欠陥の有無を検査する検査実行手段とを具備す
ることを特徴とするものである。
Next, in the object appearance inspection apparatus according to the fifth aspect of the present invention, with respect to a circular object in which a plurality of characteristic unit patterns are concentrically arranged, an image of the object to be inspected is stored in advance as a reference. By comparing with an image of the object, the presence or absence of a defect on the appearance of the inspection target object is inspected, and a peripheral portion of the reference object is set on a reference image obtained by imaging the reference object. To set at least one position deviation correction area including the unit, and to set a rotation deviation correction region including any unit pattern, and to set at least one inspection area including all or part of the reference object. Of the operation means and the position of the misregistration correction area to calculate the eigenpoint coordinates of the reference object as a reference position, and the positional relationship between the rotation misregistration correction area and the reference position is calculated. Then, a reference value calculating means for calculating the rotation angle of the reference object as a reference rotational position, and a position deviation correction model is created by cutting out the image of the position deviation correction region from the reference image, and the rotation is also changed. A model creating unit that creates a rotation misalignment correction model by cutting out an image of the misregistration correction region, and further creates an inspection model by cutting out the image of the inspection region, and an area storage unit that stores the inspection region. A model storage unit that stores the positional deviation correction model, the rotational deviation correction model, and the inspection model; a reference value storage unit that stores the reference position and the reference rotational position; and an image of the inspection target object. In the obtained inspection target image,
An area corresponding to the misalignment correction model is extracted, eigenpoint coordinates of the inspection object are calculated based on the position of the extracted area, and the inspection object is calculated from the difference between the eigenpoint coordinates and the reference position. Position deviation amount calculating means for calculating the position deviation amount, position deviation correcting means for correcting the position deviation amount by performing a predetermined scrolling process on the inspection object image, and the position deviation corrected inspection object In the image, a region corresponding to the rotation deviation correction model is extracted, the rotation angle of the inspection target object is calculated based on the positional relationship between the extracted region and the reference position, and the rotation angle and the reference rotation position are calculated. By performing a predetermined affine transformation process on the inspection target image whose positional deviation has been corrected, By comparing a rotation deviation correction unit that corrects the rotation deviation amount, an image of the inspection region in the inspection target image in which the positional deviation and the rotation deviation have been corrected, and the inspection model, the inspection target object An inspection execution means for inspecting the presence or absence of a defect in appearance is provided.

【0019】また本発明の請求項6記載の物体外観検査
装置は、上記の請求項5記載の物体外観検査装置におい
て、前記回転ずれ補正用領域を含み、かつこの回転ずれ
補正用領域に隣接する二つの単位パターンの隣接側半分
ずつを含むサーチ領域を前記基準画像上に設定するため
の前記操作手段と、前記サーチ領域を記憶する前記領域
記憶手段と、前記位置ずれ補正された検査対象画像にお
ける前記サーチ領域において、前記回転ずれ補正用モデ
ルに対応する領域を抽出する前記回転ずれ量算出手段と
を具備することを特徴とするものである。
An object appearance inspection apparatus according to a sixth aspect of the present invention is the object appearance inspection apparatus according to the fifth aspect, which includes the rotation deviation correction area and is adjacent to the rotation deviation correction area. The operation means for setting a search area including two adjacent side halves of two unit patterns on the reference image, the area storage means for storing the search area, and the position-corrected inspection target image The rotation deviation amount calculating means for extracting an area corresponding to the rotation deviation correction model in the search area is provided.

【0020】従って本発明の請求項1記載の画像処理方
法および請求項3記載の画像処理装置によれば、操作手
段によって基準画像上に設定した、基準物体の周縁部を
含む少なくとも一つの位置ずれ補正用領域の位置に基づ
いて、基準値算出手段によって前記基準物体の固有点座
標を算出し、この固有点座標を基準位置として基準値記
憶手段に記憶するとともに、モデル作成手段によって前
記位置ずれ補正用領域の画像を基準画像から切り出すこ
とにより位置ずれ補正用モデルを作成して予めモデル記
憶手段に記憶しておき、また操作手段によって基準画像
上に設定した、任意の単位パターンを含む回転ずれ補正
用領域と、前記基準位置との位置関係に基づいて、基準
値算出手段によって基準物体の回転角を算出し、この回
転角を基準回転位置として基準値記憶手段に記憶すると
ともに、モデル作成手段によって前記回転ずれ補正用領
域の画像を基準画像から切り出すことにより回転ずれ補
正用モデルを作成して予めモデル記憶手段に記憶してお
き、位置ずれ量算出手段によって、処理対象画像におい
て、前記位置ずれ補正用モデルと対応する領域を抽出
し、抽出した領域の位置に基づいて処理対象物体の固有
点座標を算出し、この処理対象物体の固有点座標と前記
基準位置との差から処理対象物体の位置ずれ量を求め、
位置ずれ補正手段によって処理対象画像に対して所定の
スクロール処理を施すことにより、前記位置ずれ量を補
正し、回転ずれ量算出手段によって、前記位置ずれ補正
した処理対象画像において、前記回転ずれ補正用モデル
に対応する領域を抽出し、抽出した領域と前記基準位置
との位置関係に基づいて処理対象物体の回転角を算出
し、この処理対象物体の回転角と前記基準回転位置との
差から処理対象物体の回転ずれ量を求め、回転ずれ補正
手段によって前記位置ずれ補正した処理対象画像に対し
て所定のアフィン変換処理を施すことにより、前記回転
ずれ量を補正することによって、同心円状繰り返しパタ
ーンを有する円形物体の画像において、位置および回転
角が不特定である前記円形物体を所定位置かつ所定回転
位置に高精度に配置することができる。
Therefore, according to the image processing method of the first aspect and the image processing apparatus of the third aspect of the present invention, at least one positional deviation including the peripheral portion of the reference object set on the reference image by the operating means. Based on the position of the correction area, the eigenpoint coordinates of the reference object are calculated by the reference value calculating means, the eigenpoint coordinates are stored as the reference position in the reference value storing means, and the positional deviation is corrected by the model creating means. A position misalignment correction model is created by cutting out the image of the working area from the reference image and stored in advance in the model storage means, and rotation misregistration correction including an arbitrary unit pattern set on the reference image by the operation means is performed. The rotation angle of the reference object is calculated by the reference value calculation means based on the positional relationship between the working area and the reference position, and this rotation angle is used as the reference rotation position. Is stored in the reference value storage means, and a model for the rotation deviation correction is cut out from the reference image by the model creation means to create a rotation deviation correction model and stored in advance in the model storage means. A region corresponding to the displacement correction model is extracted from the image to be processed by the amount calculation means, the eigenpoint coordinates of the object to be processed are calculated based on the position of the extracted region, and the eigenpoint of the object to be processed is calculated. From the difference between the coordinates and the reference position, obtain the amount of positional deviation of the object to be processed,
By performing a predetermined scrolling process on the processing target image by the positional deviation correction means, the positional deviation amount is corrected, and by the rotational deviation amount calculation means, the positional deviation correction is performed on the processing target image. A region corresponding to the model is extracted, the rotation angle of the processing target object is calculated based on the positional relationship between the extracted region and the reference position, and processing is performed from the difference between the rotation angle of the processing target object and the reference rotation position. By obtaining the amount of rotation deviation of the target object and performing a predetermined affine transformation process on the processing target image whose position deviation has been corrected by the rotation deviation correction means, the amount of rotation deviation is corrected to form a concentric circular repeating pattern. Arrangement of the circular object, whose position and rotation angle are unspecified, at a predetermined position and a predetermined rotation position with high accuracy in the image of the circular object Rukoto can.

【0021】また本発明の請求項2記載の画像処理方法
および請求項4記載の画像処理装置によれば、本発明の
請求項1記載の画像処理方法および請求項3記載の画像
処理装置において、操作手段によって基準画像上に設定
した、前記回転ずれ補正用領域を含み、かつこの領域に
隣接する二つの単位パターンの隣接側半分ずつを含むサ
ーチ領域を領域記憶手段に予め記憶しておき、回転ずれ
量算出手段によって、前記位置ずれ量補正した処理対象
画像における前記サーチ領域において、前記回転ずれ補
正用モデルに対応する領域を抽出することによって、同
心円状繰り返しパターンを有する円形物体を短時間で所
定位置かつ所定回転位置に高精度に配置することができ
る。
According to the image processing method according to claim 2 and the image processing device according to claim 4 of the present invention, in the image processing method according to claim 1 and the image processing device according to claim 3 of the present invention, A search area, which is set on the reference image by the operation means, includes the rotation deviation correction area and includes two adjacent side halves of two unit patterns adjacent to this area, is stored in advance in the area storage means, and is rotated. A circular object having a concentric circular repeating pattern is determined in a short time by extracting a region corresponding to the rotational displacement correction model in the search region in the processing target image whose positional displacement amount has been corrected by the displacement amount calculating means. It is possible to highly accurately dispose the position and the predetermined rotation position.

【0022】次に本発明の請求項5記載の物体外観検査
装置によれば、操作手段によって、基準画像上に、基準
物体の周縁部を含む少なくとも一つの位置ずれ補正用領
域を設定し、また任意の単位パターンを含む回転ずれ補
正用領域を設定し、さらに前記基準物体の全部あるいは
一部を含む少なくとも一つの検査領域を設定して、この
検査領域を領域記憶手段に予め記憶しておき、基準値算
出手段によって、前記位置ずれ補正用領域の位置に基づ
いて前記基準物体の固有点座標を基準位置として算出
し、また前記回転ずれ補正用領域と前記基準位置との位
置関係に基づいて前記基準物体の回転角を基準回転位置
として算出し、算出した基準位置および基準回転位置を
基準値記憶手段に予め記憶しておき、モデル作成手段に
よって、基準画像から、前記位置ずれ補正用領域の画像
を切り出すことにより位置ずれ補正用モデルを作成し、
また前記回転ずれ補正用領域の画像を切り出すことによ
り回転ずれ補正用モデルを作成し、さらに前記検査領域
の画像を切り出すことにより検査用モデルを作成し、作
成した位置ずれ補正用モデル、回転ずれ補正用モデル、
および検査用モデルをモデル記憶手段に予め記憶してお
き、位置ずれ量算出手段によって、検査対象画像におい
て、前記位置ずれ補正用モデルに対応する領域を抽出
し、抽出した領域の位置に基づいて検査対象物体の固有
点座標を算出し、この固有点座標と前記基準位置との差
から検査対象物体の位置ずれ量を求め、位置ずれ補正手
段によって検査対象画像に対して所定のスクロール処理
を施すことにより、前記位置ずれ量を補正し、回転ずれ
量算出手段によって、前記位置ずれ補正された検査対象
画像において、前記回転ずれ補正用モデルに対応する領
域を抽出し、抽出した領域と前記基準位置との位置関係
に基づいて検査対象物体の回転角を算出し、この回転角
と前記基準回転位置との差から検査対象物体の回転ずれ
量を求め、回転ずれ補正手段によって前記位置ずれ補正
された検査対象画像に対して所定のアフィン変換処理を
施すことにより、前記回転ずれ量を補正し、検査実行手
段によって、前記位置ずれおよび回転ずれが補正された
検査対象画像における前記検査領域の画像と、前記検査
用モデルとを比較することにより、検査対象物体の外観
上の欠陥の有無を検査することによって、同心円状繰り
返しパターンを有する円形物体が不特定な位置および回
転角に配置されている画像を用いて、前記円形物体の外
観上の欠陥の有無を高精度に検査することができる。
Next, according to the object appearance inspection apparatus of the fifth aspect of the present invention, at least one misregistration correction area including the peripheral portion of the reference object is set on the reference image by the operating means, and A rotation deviation correction area including an arbitrary unit pattern is set, at least one inspection area including all or a part of the reference object is set, and the inspection area is stored in advance in the area storage means. The reference value calculating means calculates the eigenpoint coordinates of the reference object as a reference position on the basis of the position of the position deviation correction area, and further, based on the positional relationship between the rotation deviation correction area and the reference position, The rotation angle of the reference object is calculated as the reference rotation position, the calculated reference position and the reference rotation position are stored in the reference value storage means in advance, and the reference image is stored by the model creating means. Creates a positional deviation correction model by cutting the image of the positional deviation correction region,
Also, a rotation deviation correction model is created by cutting out the image of the rotation deviation correction area, and an inspection model is created by cutting out the image of the inspection area, and the created position deviation correction model and rotation deviation correction model are created. For model,
Further, the inspection model is stored in advance in the model storage means, and the position shift amount calculation means extracts a region corresponding to the position shift correction model in the inspection target image, and the inspection is performed based on the position of the extracted region. The eigenpoint coordinates of the target object are calculated, the displacement amount of the inspection target object is obtained from the difference between the eigenpoint coordinates and the reference position, and the predetermined displacement process is performed on the inspection target image by the displacement correction means. The positional deviation amount is corrected by the rotational deviation amount calculating means, and the region corresponding to the rotational deviation correction model is extracted from the inspection target image subjected to the positional deviation correction by the rotational deviation amount calculating means. The rotation angle of the object to be inspected is calculated based on the positional relationship between the object and the rotation deviation of the object to be inspected from the difference between this rotation angle and the reference rotation position The inspection target image in which the positional deviation is corrected by the corrector is subjected to a predetermined affine transformation process to correct the rotational deviation amount, and the inspection execution means corrects the positional deviation and the rotational deviation. By comparing the image of the inspection region in the image with the inspection model, the presence or absence of a defect on the appearance of the inspection target object is inspected, so that the circular object having the concentric circular repeating pattern has an unspecified position and By using the images arranged at the rotation angle, it is possible to inspect the appearance of the circular object with high accuracy.

【0023】また本発明の請求項6記載の物体外観検査
装置によれば、請求項5記載の物体外観検査装置におい
て、操作手段によって基準画像上に設定した、前記回転
ずれ補正用領域を含み、かつこの領域に隣接する二つの
単位パターンの隣接側半分ずつを含むサーチ領域を領域
記憶手段に予め記憶しておき、回転ずれ量算出手段によ
って、前記位置ずれ量補正した処理対象画像における前
記サーチ領域において、前記回転ずれ補正用モデルに対
応する領域を抽出することによって、円形物体が不特定
な位置および回転角に配置されている画像を用いて、同
心円状繰り返しパターンを有する円形物体の外観上の欠
陥の有無を短時間で高精度に検査することができる。
According to a sixth aspect of the present invention, there is provided the object visual inspection apparatus according to the fifth aspect, which includes the rotation deviation correction area set on the reference image by the operating means. Further, a search area including two adjacent side halves of two unit patterns adjacent to this area is stored in advance in the area storage means, and the search area in the processing target image whose position deviation amount is corrected by the rotation deviation amount calculation means. In, by extracting a region corresponding to the rotation deviation correction model, by using an image in which the circular object is arranged at an unspecified position and a rotation angle, on the appearance of the circular object having a concentric repeating pattern The presence or absence of defects can be inspected in a short time with high accuracy.

【0024】[0024]

【発明の実施の形態】図1は本発明の物体外観検査装置
の実施形態の構成を示すブロック図である。
1 is a block diagram showing the configuration of an embodiment of an object appearance inspection apparatus of the present invention.

【0025】図1において、1はビデオカメラ等を有
し、同心円状繰り返しパターンを有する円形物体の外観
検査において、比較基準となる基準物体を撮像すること
により基準画像を得、また検査の対象となる検査対象物
体を撮像することにより検査対象画像を得る撮像装置で
ある。
In FIG. 1, reference numeral 1 has a video camera or the like, and in a visual inspection of a circular object having a concentric repeating pattern, a reference object is obtained by imaging a reference object as a comparison reference, and an object to be inspected. Is an imaging device that obtains an inspection target image by capturing an image of the inspection target object.

【0026】2は画像メモリ等を有し、基準画像および
検査対象画像を記憶するとともに、基準画像を切り出す
ことにより作成されたモデル、ずれ補正された検査対象
画像等の各種画像を記憶する画像記憶部である。
An image memory 2 has an image memory and the like, and stores the reference image and the inspection target image, and also stores various images such as a model created by cutting out the reference image and the displacement-corrected inspection target image. It is a department.

【0027】3はキーボード、マウス等を有し、操作者
が、基準画像上において、基準物体の周縁部を含む位置
ずれ補正用モデル領域、基準物体の単位パターンの任意
の一つを含む回転ずれ補正用モデル領域、この回転ずれ
補正用モデル領域を含み、かつこの回転ずれ補正用モデ
ル領域に隣接する二つの単位パターンの隣接側半分ずつ
を含むサーチ領域、基準物体の全部あるいは一部を含む
少なくとも一つの検査領域をそれぞれ設定し、また動作
モードを指定し、さらに各種の命令を入力するための操
作部である。
Reference numeral 3 denotes a keyboard, a mouse, etc., on which the operator shifts a rotation displacement including any one of a displacement correction model region including the peripheral portion of the reference object and a unit pattern of the reference object. A correction model area, a search area including the rotational deviation correction model area, and a search area including two adjacent side halves of two unit patterns adjacent to the rotation deviation correction model area, and at least the whole or a part of the reference object It is an operation unit for setting one inspection area, specifying an operation mode, and inputting various commands.

【0028】4は基準画像から、各位置ずれ補正用モデ
ル領域の画像を切り出すことにより位置ずれ補正用モデ
ルを作成し、また前記回転ずれ補正用モデル領域の画像
を切り出すことにより回転ずれ補正用モデルを作成し、
さらに前記検査領域の画像を切り出すことにより検査用
モデルを作成するモデル作成部である。
Reference numeral 4 indicates a model for position deviation correction by cutting out an image of each position deviation correction model region from the reference image, and a model for position deviation correction by cutting out an image of the rotation position correction model region. Create
Further, the model creating unit creates an inspection model by cutting out the image of the inspection region.

【0029】5は位置ずれ補正用モデル領域の位置に基
づいて基準物体の固有点座標を基準位置として算出し、
また回転ずれ補正用モデル領域と基準位置との位置関係
に基づいて基準物体の回転角を基準回転位置として算出
する基準値算出部である。
Reference numeral 5 calculates the eigenpoint coordinates of the reference object as the reference position on the basis of the position of the displacement correction model area,
The reference value calculation unit calculates the rotation angle of the reference object as the reference rotation position based on the positional relationship between the rotation deviation correction model area and the reference position.

【0030】6は基準位置、基準回転位置、サーチ領
域、検査領域、検査結果等の各種データを記憶するデー
タ記憶部である。
Reference numeral 6 is a data storage unit for storing various data such as a reference position, a reference rotational position, a search area, an inspection area, and an inspection result.

【0031】7は検査対象画像において、位置ずれ補正
用モデルとパターンマッチングする領域を抽出し、抽出
した領域の位置に基づいて検査対象物体の固有点座標を
算出し、この固有点座標と上記の基準位置との差から検
査対象物体の位置ずれ量を求め、検査対象画像に対して
所定のスクロール処理を施すことにより、位置ずれ量を
補正する位置ずれ補正部である。
In the image to be inspected, 7 extracts an area that is pattern-matched with the model for positional deviation correction, calculates the eigenpoint coordinates of the object to be inspected based on the position of the extracted area, and the eigenpoint coordinates and the above-mentioned This is a position shift correction unit that corrects the position shift amount by obtaining the position shift amount of the inspection target object from the difference from the reference position and performing a predetermined scrolling process on the inspection target image.

【0032】8は上記の位置ずれ補正された検査対象画
像上のサーチ領域において、回転ずれ補正用モデルとパ
ターンマッチングする領域を抽出し、抽出した領域と基
準位置との位置関係に基づいて検査対象物体の回転角を
算出し、この回転角と基準回転位置との差から検査対象
物体の回転ずれ量を求め、前記位置ずれ補正された検査
対象画像に対して所定のアフィン変換処理を施すことに
より、回転ずれ量を補正する回転ずれ補正部である。
Reference numeral 8 denotes an area to be pattern-matched with the rotational deviation correction model in the search area on the image to be inspected whose positional deviation has been corrected, and the object to be inspected based on the positional relationship between the extracted area and the reference position. By calculating the rotation angle of the object, obtaining the amount of rotation deviation of the inspection object from the difference between this rotation angle and the reference rotation position, and applying a predetermined affine transformation process to the inspection object image whose position deviation has been corrected. A rotation deviation correction unit that corrects the rotation deviation amount.

【0033】9は上記の位置ずれおよび回転ずれが補正
された検査対象画像における検査領域の画像と、検査用
モデルとを比較することにより、検査対象物体の外観上
の欠陥の有無を検査する検査実行部である。
Reference numeral 9 is an inspection for inspecting the presence or absence of a defect on the appearance of the inspection object by comparing the image of the inspection area in the inspection image in which the positional deviation and the rotational deviation have been corrected with the inspection model. It is an execution unit.

【0034】10はディスプレイ等を有し、基準画像、
検査対象画像、モデル等の各種の画像や、基準位置、基
準回転位置、各領域設定データ、位置ずれ量、回転ずれ
量、検査結果等の各種データを表示する表示部である。
Reference numeral 10 denotes a reference image, which has a display and the like.
The display unit displays various images such as an image to be inspected, a model, and the like, and reference position, reference rotational position, area setting data, displacement amount, rotation displacement amount, inspection result, and the like.

【0035】11は撮像装置1、画像記憶部2、モデル
作成部4、基準値算出部5、データ記憶部6、位置ずれ
補正部7、回転ずれ補正部8、検査実行部9、および表
示部10を統括制御する制御部である。
Reference numeral 11 denotes the image pickup device 1, the image storage unit 2, the model creation unit 4, the reference value calculation unit 5, the data storage unit 6, the positional deviation correction unit 7, the rotational deviation correction unit 8, the inspection execution unit 9, and the display unit. It is a control unit that integrally controls 10.

【0036】尚、画像記憶部2はモデル記憶手段に該当
し、操作部3は操作手段に該当し、モデル作成部4およ
び制御部11はモデル作成手段を構成する。
The image storage unit 2 corresponds to a model storage unit, the operation unit 3 corresponds to an operation unit, and the model creating unit 4 and the control unit 11 form a model creating unit.

【0037】基準値算出部5および制御部11は基準値
算出手段を構成し、データ記憶部6は基準値記憶手段お
よび領域記憶手段に該当する。
The reference value calculation section 5 and the control section 11 constitute a reference value calculation means, and the data storage section 6 corresponds to the reference value storage means and the area storage means.

【0038】位置ずれ補正部7および制御部11は位置
ずれ量算出手段および位置ずれ補正手段を構成し、回転
ずれ補正部8および制御部11は回転ずれ量算出手段お
よび回転ずれ補正手段を構成する。
The positional deviation correcting section 7 and the control section 11 constitute a positional deviation amount calculating means and a positional deviation correcting means, and the rotational deviation correcting section 8 and the control section 11 constitute a rotational deviation amount calculating means and a rotational deviation correcting means. .

【0039】検査実行部9および制御部11は検査実行
手段を構成する。
The inspection execution unit 9 and the control unit 11 constitute inspection execution means.

【0040】図2は物体外観検査装置において外観検査
される、同心円状繰り返しパターンを有する円形物体の
一例を示す外観図である。
FIG. 2 is an external view showing an example of a circular object having a concentric circular repeating pattern, which is inspected by an object appearance inspection apparatus.

【0041】図2において、21は上記の円形物体、2
2は円形物体21上に形成された同心円状繰り返しパタ
ーンを示しており、22−1等は同心円状繰り返しパタ
ーン22の単位パターンを示している。
In FIG. 2, reference numeral 21 denotes the circular object, 2
Reference numeral 2 denotes a concentric circular repeating pattern formed on the circular object 21, and 22-1 and the like denote unit patterns of the concentric circular repeating pattern 22.

【0042】次に図2に示す円形物体21の外観上の欠
陥の有無を検査する場合の、図1に示す本発明の物体外
観検査装置の動作について説明する。
Next, the operation of the object appearance inspection apparatus of the present invention shown in FIG. 1 when inspecting the circular object 21 shown in FIG.

【0043】検査実行に先だって、各モデル、基準位
置、基準回転位置、各領域のデータ設定を行う必要があ
り、まずこのデータ設定手順について説明する。
Prior to the inspection, it is necessary to set data for each model, reference position, reference rotation position, and each area. First, this data setting procedure will be described.

【0044】操作者は操作部3を操作して、動作モード
としてデータ設定モードを選択する。
The operator operates the operation unit 3 to select the data setting mode as the operation mode.

【0045】図3は本発明の物体外観検査装置のデータ
設定モードにおける処理手順を示すフローチャートであ
る。
FIG. 3 is a flow chart showing the processing procedure in the data setting mode of the object appearance inspection apparatus of the present invention.

【0046】図3のステップ31において、操作者は操
作部3を操作して、制御部11を介して撮像装置1を動
作させて、比較基準となる基準物体を撮像する。
In step 31 of FIG. 3, the operator operates the operation section 3 to operate the image pickup apparatus 1 via the control section 11 to pick up an image of a reference object as a comparison reference.

【0047】制御部11はこの基準物体を撮像すること
により得られた基準画像を、画像記憶部2に一時的に記
憶するとともに、表示部10に表示させる。
The control unit 11 temporarily stores the reference image obtained by picking up the image of the reference object in the image storage unit 2 and causes the display unit 10 to display the reference image.

【0048】次にステップ32において操作者は、表示
部10に表示された基準画像を見ながら操作部3を操作
して、基準画像上に、基準物体の周縁部を含むの位置ず
れ補正用モデル領域、および基準物体の単位パターンの
任意の一つを含む回転ずれ補正用モデル領域を設定す
る。
Next, in step 32, the operator operates the operation unit 3 while looking at the reference image displayed on the display unit 10, and the misregistration correction model including the peripheral portion of the reference object is displayed on the reference image. A rotation deviation correction model area including any one of the area and the unit pattern of the reference object is set.

【0049】上記の領域設定は、各領域の座標データを
キーボードから入力するか、あるいは表示された基準画
像上において各領域をマウスによってクリックすること
によって行われる。
The above area setting is performed by inputting coordinate data of each area from the keyboard or by clicking each area on the displayed reference image with a mouse.

【0050】制御部11は、設定された位置ずれ補正用
モデル領域および回転ずれ補正用モデル領域の対角線上
の二つの頂点座標をデータ記憶部6に一時的に記憶す
る。
The control unit 11 temporarily stores in the data storage unit 6 the two vertex coordinates on the diagonal line of the set positional deviation correction model area and rotational deviation correction model area.

【0051】位置ずれ補正用モデル領域は、所望する位
置ずれ補正精度の応じて、一つあるいは複数個設定す
る。
One or a plurality of misregistration correction model regions are set according to the desired misregistration correction accuracy.

【0052】ここでは位置ずれ補正用モデル領域を二つ
設定するものとし、基準物体画像の左側または右側の周
縁部を含む領域を第一基準物体画像の位置ずれ補正用モ
デル領域として設定し、また上側または下側の周縁部を
含む領域を第二の位置ずれ補正用モデル領域として設定
する。
Here, it is assumed that two misregistration correction model areas are set, an area including the left or right peripheral portion of the reference object image is set as the misregistration correction model area, and An area including the upper or lower peripheral portion is set as the second misregistration correction model area.

【0053】このように位置ずれ補正用モデル領域の個
数を二つとする場合は、基準物体画像の左側または右側
の周縁部を含む領域と、上側または下側の周縁部を含む
領域を設定することが位置ずれ補正精度上望ましい。
When the number of misregistration correction model areas is two as described above, the area including the left or right peripheral portion and the area including the upper or lower peripheral portion of the reference object image should be set. Is desirable in terms of positional deviation correction accuracy.

【0054】図4は上記の位置ずれ補正用モデル領域お
よび回転ずれ補正用モデル領域の設定例を示すものであ
る。
FIG. 4 shows an example of setting the above-mentioned misregistration correction model area and rotation deviation correction model area.

【0055】図4において、41は基準画像を示し、ま
た42は基準物体の画像、43は基準物体上の単位パタ
ーンの画像をそれぞれ示している。
In FIG. 4, 41 is a reference image, 42 is an image of a reference object, and 43 is an image of a unit pattern on the reference object.

【0056】また44は第一の位置ずれ補正用モデル領
域の設定例、45は第二の位置ずれ補正用モデル領域の
設定例をそれぞれ示しており、46は回転ずれ補正用モ
デル領域の設定例を示している。
Reference numeral 44 shows a setting example of the first misregistration correction model area, 45 shows a setting example of the second misregistration correction model area, and 46 shows a setting example of the rotation deviation correction model area. Is shown.

【0057】図3に戻りステップ33において制御部1
1は、モデル作成部4を動作させて、位置ずれ補正用モ
デルおよび回転ずれ補正用モデルを作成する。
Returning to FIG. 3, in step 33, the control unit 1
1 operates the model creating unit 4 to create a positional deviation correction model and a rotational deviation correction model.

【0058】すなわちモデル作成部4は、基準画像か
ら、第一および第二の位置ずれ補正用モデル領域の画像
を切り出すことにより、第一および第二の位置ずれ補正
用モデルを作成し、また回転ずれ補正用モデル領域の画
像を切り出すことにより回転ずれ補正用モデルを作成
し、この各位置ずれ補正用モデルおよび回転ずれ補正用
モデルを画像記憶部2に記憶する。
That is, the model creating section 4 creates the first and second misregistration correction models by cutting out the images of the first and second misregistration correction model areas from the reference image, and rotates them. A rotation deviation correction model is created by cutting out an image in the deviation correction model area, and the position deviation correction model and the rotation deviation correction model are stored in the image storage unit 2.

【0059】続いてステップ34において制御部11
は、基準値算出部5を動作させて、基準位置および基準
回転位置を算出する。
Subsequently, at step 34, the control unit 11
Operates the reference value calculation unit 5 to calculate the reference position and the reference rotational position.

【0060】すなわち基準値算出部5は、各領域におい
てその対角線の交点座標をその領域の中心点座標とし、
第一の位置ずれ補正用モデル領域の中心点座標を
(X1 ,Y1 )、第二の位置ずれ補正用モデル領域の中
心点座標を(X2 ,Y2 )とすると、直線x=X1 とy
=Y2 の交点座標を基準物体の固有点座標として求め、
この固有点座標を基準位置(X0 ,Y0 )とする。
That is, the reference value calculation section 5 sets the intersection point coordinates of the diagonal lines in each area as the center point coordinates of the area,
If the center point coordinates of the first misregistration correction model area are (X 1 , Y 1 ) and the center point coordinates of the second misregistration correction model area are (X 2 , Y 2 ), a straight line x = X 1 and y
= Y 2 intersection point coordinates are obtained as the eigenpoint coordinates of the reference object,
This unique point coordinate is set as a reference position (X 0 , Y 0 ).

【0061】上記の場合は基準位置(X0 ,Y0 )=
(X1 ,Y2 )である。
In the above case, the reference position (X 0 , Y 0 ) =
(X 1 , Y 2 ).

【0062】また回転ずれ補正用モデル領域の中心点座
標を(X3 ,Y3 )とすると、この中心点座標(X3
3 )および基準位置(X0 ,Y0 )の二点を通る直線
と、直線y=Y0 とのなす角を基準物体の回転角として
求め、この回転角を基準回転位置θ0 とし、算出した基
準位置および基準回転位置をデータ記憶部6に記憶させ
る。
If the center point coordinates of the rotational displacement correction model area are (X 3 , Y 3 ), the center point coordinates (X 3 ,
Y 3 ) and a reference position (X 0 , Y 0 ) and a straight line y = Y 0 form an angle formed by the reference object as a rotation angle of the reference object, and this rotation angle is set as a reference rotation position θ 0 . The calculated reference position and reference rotational position are stored in the data storage unit 6.

【0063】尚、基準位置としては、二つの位置ずれ補
正用モデル領域の中心点座標を端点とする線分の中点座
標を用いても良い。
As the reference position, the midpoint coordinates of a line segment whose end points are the central point coordinates of the two misregistration correction model areas may be used.

【0064】図5は上記の基準位置および基準回転位置
の算出を説明するものである。
FIG. 5 illustrates the calculation of the reference position and the reference rotational position.

【0065】図5において、41は基準画像を示し、ま
た42は基準物体の画像を示している。
In FIG. 5, reference numeral 41 shows a reference image, and 42 shows an image of the reference object.

【0066】また44は第一の位置ずれ補正用モデル領
域、45は第二の位置ずれ補正用モデル領域、46は回
転ずれ補正用モデル領域をそれぞれ示している。
Reference numeral 44 denotes a first misregistration correction model area, 45 denotes a second misregistration correction model area, and 46 denotes a rotation deviation correction model area.

【0067】第一の位置ずれ補正用モデル領域44の中
心点座標(対角線の交点座標)は(X1 ,Y1 )、第二
の位置ずれ補正用モデル領域45の中心点座標は
(X2 ,Y 2 )であり、直線x=X1 とy=Y2 の交点
座標(X1 ,Y2 )が基準物体の固有点座標であり、従
って基準位置(X0 ,Y0 )となる。
In the first misregistration correction model area 44
The center point coordinates (diagonal intersection coordinates) are (X1, Y1),second
The center point coordinates of the misregistration correction model area 45 are
(XTwo, Y Two), And the straight line x = X1And y = YTwoIntersection of
Coordinates (X1, YTwo) Is the eigenpoint coordinate of the reference object,
The reference position (X0, Y0).

【0068】また回転ずれ補正用モデル領域46の中心
点座標は(X3 ,Y3 )であり、この中心点座標
(X3 ,Y3 )および基準位置(X0 ,Y0 )の二点を
通る直線と、直線y=Y0 とのなす角θ0 が基準物体の
回転角であり、従って基準回転位置となる。
Further, the center point coordinates of the rotation deviation correction model area 46 are (X 3 , Y 3 ), and two points of the center point coordinates (X 3 , Y 3 ) and the reference position (X 0 , Y 0 ) are set. The angle θ 0 formed by the straight line passing through and the straight line y = Y 0 is the rotation angle of the reference object, and is therefore the reference rotation position.

【0069】次にステップ35において操作者は、表示
部10に表示された基準画像を見ながら操作部3を操作
して、ステップ32で設定した回転ずれ補正用モデル領
域を含み、かつこの回転ずれ補正用モデル領域に隣接す
る二つの単位パターンの隣接側半分ずつを含むサーチ領
域を基準画像上に設定し、制御部11は、設定されたサ
ーチ領域の対角線上の二つの頂点座標をデータ記憶部6
に記憶させる。
Next, in step 35, the operator operates the operation part 3 while looking at the reference image displayed on the display part 10 to include the rotation deviation correction model area set in step 32 and A search area including two adjacent side halves of two unit patterns adjacent to the correction model area is set on the reference image, and the control unit 11 sets the two vertex coordinates on the diagonal of the set search area to the data storage unit. 6
To memorize.

【0070】次にステップ36において操作者は、表示
部10に表示された基準画像を見ながら操作部3を操作
して、基準物体の全部あるいは一部を含む少なくとも一
つの検査領域をそれぞれ設定し、制御部11は、設定さ
れた検査領域領域の対角線上の二つの頂点座標をデータ
記憶部6に記憶させる。
Next, in step 36, the operator operates the operation unit 3 while looking at the reference image displayed on the display unit 10 to set at least one inspection area including all or a part of the reference object. The control unit 11 causes the data storage unit 6 to store the two vertex coordinates on the diagonal line of the set inspection area region.

【0071】図6は図7のステップ35におけるサーチ
領域の設定例、および図7のステップ36における検査
領域の設定例を示す図である。
FIG. 6 is a diagram showing an example of setting the search area in step 35 of FIG. 7 and an example of setting the inspection area in step 36 of FIG.

【0072】図6において、41は基準画像を示し、4
2は基準物体の画像、43は基準物体上の単位パターン
の画像をそれぞれ示す。
In FIG. 6, reference numeral 41 indicates a reference image, and 4
Reference numeral 2 is an image of the reference object, and 43 is an image of a unit pattern on the reference object.

【0073】46は回転ずれ補正用モデル領域の設定例
を示し、61はサーチ領域の設定例を示す。
Reference numeral 46 shows a setting example of the rotational displacement correction model area, and 61 shows a setting example of the search area.

【0074】62は検査領域の設定例を示しており、こ
の検査領域62は円形物体上の同心円状繰り返しパター
ンのみを外観検査の対象とする場合の検査領域の設定例
である。
Reference numeral 62 shows an example of setting the inspection area. This inspection area 62 is an example of the setting of the inspection area when only the concentric circular repeating pattern on the circular object is the object of the appearance inspection.

【0075】尚、63は円形物体全体を外観検査の対象
とする場合の検査領域の設定例を示している。
Reference numeral 63 shows an example of setting the inspection area when the entire circular object is the object of the appearance inspection.

【0076】ここでは検査領域62を設定するものとす
る。
Here, it is assumed that the inspection area 62 is set.

【0077】図3に戻り、ステップ37において制御部
11は、モデル作成部4を動作させて、検査用モデルを
作成させる。
Returning to FIG. 3, in step 37, the control section 11 operates the model creating section 4 to create an inspection model.

【0078】すなわちモデル作成部4は、基準画像から
各検査領域の画像をそれぞれ切り出すことにより検査用
モデルを作成し、この各検査用モデルを画像記憶部2に
記憶させる。
That is, the model creating section 4 creates an inspection model by cutting out images of the respective inspection areas from the reference image, and stores each of the inspection models in the image storage section 2.

【0079】以上でデータ設定モードにおける処理フロ
ーを終了する。
With that, the processing flow in the data setting mode ends.

【0080】次に検査実行手順について説明する。Next, the inspection execution procedure will be described.

【0081】操作者は操作部3を操作して、検査実行モ
ードを選択し、検査実行命令を入力する。
The operator operates the operation unit 3 to select the inspection execution mode and input the inspection execution command.

【0082】図7は本発明の物体外観検査装置の検査実
行モードにおける処理手順を示すフローチャートであ
る。
FIG. 7 is a flow chart showing the processing procedure in the inspection execution mode of the object appearance inspection apparatus of the present invention.

【0083】図7のステップ71において、制御部11
は、撮像装置1を動作させて、検査対象物体を撮像して
検査対象画像を得、この検査対象画像を画像記憶部2に
一時的に記憶する。
In step 71 of FIG. 7, the control unit 11
Operates the image pickup apparatus 1 to capture an image of the inspection target object to obtain an inspection target image, and temporarily stores the inspection target image in the image storage unit 2.

【0084】次にステップ72において制御部11は、
位置ずれ補正部7を動作させて、検査対象画像におい
て、各位置ずれ補正用モデルとパターンマッチングする
領域(位置ずれ補正用モデル対応領域)をそれぞれ抽出
する。
Next, at step 72, the control section 11
The misregistration correction unit 7 is operated to extract regions (pattern misalignment correction model corresponding regions) that pattern-match with each misregistration correction model in the inspection target image.

【0085】図8は上記の位置ずれ補正用モデル対応領
域の抽出を説明するものである。
FIG. 8 is a diagram for explaining the extraction of the misalignment correction model corresponding area.

【0086】図8において、81は位置ずれ補正用モデ
ル、82は検査対象画像を示している。
In FIG. 8, reference numeral 81 is a misregistration correction model, and 82 is an image to be inspected.

【0087】位置ずれ補正用モデル81は、N×N画素
の画像であるものとし、画像左上の画素を座標値(0,
0)で表し、画像右下の画素を座標値(N−1,N−
1)で表すものとする。
The misregistration correction model 81 is assumed to be an image of N × N pixels, and the pixel at the upper left of the image has coordinate values (0,
0), and the lower right pixel of the image is represented by coordinate values (N-1, N-
1).

【0088】また検査対象画像82は、M×M画素の画
像(M>N)であるものとし、画像左上の画素を座標値
(0,0)で表し、画像右下の画素を座標値(M−1,
M−1)で表すものとする。
The image 82 to be inspected is assumed to be an image of M × M pixels (M> N), the upper left pixel of the image is represented by the coordinate value (0, 0), and the lower right pixel of the image is represented by the coordinate value ( M-1,
M-1).

【0089】位置ずれ補正用モデル対応領域の抽出は、
検査対象画像82において、N×N画素の領域を設定
し、設定された各領域の画像と位置ずれ補正用モデル8
1との相関値をそれぞれ算出し、相関値が最も高い領域
を対応領域とするものである。
The extraction of the misalignment correction model corresponding region is performed by
An area of N × N pixels is set in the inspection target image 82, and the image of each set area and the position shift correction model 8 are set.
The correlation value with 1 is calculated, and the region having the highest correlation value is set as the corresponding region.

【0090】83は座標(a,b)および(N+a−
1,N+b−1)を頂点とするN×N画素の領域を示し
ている。
83 is the coordinates (a, b) and (N + a-).
1, N + b-1) is shown as an area of N × N pixels.

【0091】0≦a≦M−N、0≦b≦M−Nであるか
ら、検査対象画像82におけるN×N画素の領域の個数
は、(M−N+1)×(M−N+1)個となる。
Since 0 ≦ a ≦ M−N and 0 ≦ b ≦ M−N, the number of N × N pixel regions in the image 82 to be inspected is (M−N + 1) × (M−N + 1). Become.

【0092】左上頂点座標を(a,b)とする領域の画
像と、位置ずれ補正用モデル81との相関値をC(a,
b)とすると、相関値C(a,b)は以下の算式によっ
て求められる。
The correlation value between the image of the area having the upper left apex coordinates of (a, b) and the misregistration correction model 81 is C (a,
b), the correlation value C (a, b) is calculated by the following formula.

【0093】[0093]

【数1】 上記の(数1)においてT(x,y)は位置ずれ補正用
モデル81の座標(x,y)の画素の輝度レベル、I
(x+a,y+b)は検査対象画像82上に設定された
N×N画素の領域における座標(x+a,y+b)の画
素の輝度レベルである。
(Equation 1) In the above (Equation 1), T (x, y) is the brightness level of the pixel at the coordinates (x, y) of the misregistration correction model 81, I
(X + a, y + b) is the luminance level of the pixel of the coordinates (x + a, y + b) in the N × N pixel area set on the inspection target image 82.

【0094】図7に戻りステップ73において制御部1
1は、位置ずれ補正部7を動作させて、抽出した各位置
ずれ補正用モデル対応領域の位置関係に基づいて検査対
象物体の固有点座標を算出し、この固有点座標と上記の
基準位置との差から検査対象物体の位置ずれ量を求め
る。
Returning to FIG. 7, in step 73, the control unit 1
Reference numeral 1 operates the displacement correction unit 7 to calculate the eigenpoint coordinates of the inspection target object based on the positional relationship between the extracted misalignment correction model corresponding regions, and the eigenpoint coordinates and the reference position described above. The amount of displacement of the object to be inspected is calculated from the difference between

【0095】検査対象物体の固有点座標は、抽出した各
位置ずれ補正用モデル対応領域の位置関係に基づいて、
図3のステップ34に示す基準位置の算出と同様にして
算出される。
The eigenpoint coordinates of the object to be inspected are calculated based on the positional relationship of the extracted misalignment correction model corresponding regions.
It is calculated in the same manner as the calculation of the reference position shown in step 34 of FIG.

【0096】すなわち抽出した第一の位置ずれ補正用モ
デル対応領域の中心点座標(対角線の交点座標)を(X
1 ´,Y1 ´)、第二の位置ずれ補正用モデル対応領域
の中心点座標を(X2 ´,Y2 ´)とすると、直線x=
1 ´とy=Y2 ´の交点座標を求め、これを検査対象
物体の固有点座標(X0 ´,Y0 ´)とする。この場合
は検査対象物体の固有点座標(X0 ´,Y0 ´)=(X
1 ,Y2 ´)である。
That is, the center point coordinates (intersection coordinates of diagonal lines) of the extracted first positional deviation correction model corresponding area are set to (X
1 ′, Y 1 ′) and the center point coordinates of the second misregistration correction model corresponding region are (X 2 ′, Y 2 ′), a straight line x =
The coordinates of the intersection of X 1 ′ and y = Y 2 ′ are obtained, and these are set as the eigenpoint coordinates (X 0 ′, Y 0 ′) of the inspection object. In this case, the eigenpoint coordinates (X 0 ′, Y 0 ′) = (X
1 and Y 2 ′).

【0097】そしてこの検査対象物体の固有点座標(X
0 ´,Y0 ´)と上記の基準位置(X0 ,Y0 )との差
dX、dYを次式、 dX=X0 −X0 ´ dY=Y0 −Y0 ´ によって求め、このdX、dYを検査対象物体の位置ず
れ量とする。
Then, the eigenpoint coordinates (X
0 ', Y 0' determined by) the difference between the reference position (X 0, Y 0) dX , following equation dY, dX = X 0 -X 0 'dY = Y 0 -Y 0', this dX , DY are the positional shift amounts of the inspection object.

【0098】続いてステップ74において制御部11
は、位置ずれ補正部7を動作させて、検査対象画像をX
方向にdX、Y方向にdYだけスクロール(平行移動)
することにより、位置ずれ量を補正した検査対象画像を
得、この位置ずれ補正した検査対象画像を画像記憶部2
に一時的に記憶させる。
Subsequently, at step 74, the control unit 11
Activates the position shift correction unit 7 to set the inspection target image to X
Scroll dX in the direction and dY in the Y direction (translation)
By doing so, the inspection target image whose positional displacement amount is corrected is obtained, and the inspection target image whose positional displacement is corrected is stored in the image storage unit 2.
To be temporarily stored in.

【0099】図9は図7のステップ73における位置ず
れ量の算出、およびステップ74における位置ずれ補正
を説明するものである。
FIG. 9 illustrates the calculation of the positional deviation amount in step 73 of FIG. 7 and the positional deviation correction in step 74.

【0100】図9において、91は(位置ずれ補正前
の)検査対象画像、92は位置ずれ補正された検査対象
画像を示している。
In FIG. 9, reference numeral 91 indicates an inspection target image (before positional deviation correction), and reference numeral 92 indicates an inspection target image whose positional deviation is corrected.

【0101】また93は検査対象物体の画像を示し、9
4は第一の位置ずれ補正用モデル対応領域、95は第二
の位置ずれ補正用モデル対応領域をそれぞれ示してい
る。
Reference numeral 93 indicates an image of the object to be inspected.
Reference numeral 4 denotes a first misregistration correction model corresponding area, and 95 denotes a second misregistration correction model corresponding area.

【0102】検査対象画像91において、第一の位置ず
れ補正用モデル対応領域94の中心点座標は(X1 ´,
1 ´)、第二の位置ずれ補正用モデル対応領域95の
中心点座標は(X2 ´,Y2 ´)であり、検査対象物体
の固有点座標は(X0 ´,Y0 ´)(=(X1 ´,Y2
´))である。
In the inspection target image 91, the center point coordinates of the first displacement correction model corresponding region 94 are (X 1 ′,
Y 1 ′), the center point coordinates of the second misregistration correction model corresponding area 95 are (X 2 ′, Y 2 ′), and the eigenpoint coordinates of the inspection object are (X 0 ′, Y 0 ′). (= (X 1 ′, Y 2
´)).

【0103】そして位置ずれ補正された検査対象画像9
2においては、検査対象物体の画像93はX方向に位置
ずれ量dX、Y方向に位置ずれ量dYだけ平行移動して
おり、検査対象物体の固有点は基準位置(X0 ,Y0
にマッピングされている。
Then, the inspection target image 9 whose position has been corrected
2, the image 93 of the inspection target object is translated in the X direction by the displacement amount dX and the Y direction by the displacement amount dY, and the eigenpoint of the inspection target object is the reference position (X 0 , Y 0 ).
Is mapped to

【0104】図7に戻りステップ75において制御部1
1は、回転ずれ補正部8を動作させて、上記の位置ずれ
補正された検査対象画像上のサーチ領域において、回転
ずれ補正用モデルとパターンマッチングする領域(回転
ずれ補正用モデル対応領域)を抽出する。
Returning to FIG. 7, in step 75, the control unit 1
Reference numeral 1 operates the rotation deviation correction unit 8 to extract an area (rotation deviation correction model corresponding area) that is pattern-matched with the rotation deviation correction model in the search area on the inspection target image whose position deviation has been corrected. To do.

【0105】上記の回転ずれ補正用モデル対応領域の抽
出は、ステップ72に示す位置ずれ補正用モデル対応領
域の抽出と同様の方法で行う。
The extraction of the rotation misalignment correction model corresponding area is performed by the same method as the extraction of the misregistration correction model corresponding area in step 72.

【0106】続いてステップ76において制御部11
は、回転ずれ補正部8を動作させて、抽出した回転ずれ
補正用モデル対応領域と基準位置との位置関係に基づい
て検査対象物体の回転角を算出し、この回転角と基準回
転位置との差から検査対象物体の回転ずれ量を求める。
Subsequently, at step 76, the control unit 11
Operates the rotation deviation correction unit 8 to calculate the rotation angle of the inspection target object based on the positional relationship between the extracted rotation deviation correction model corresponding region and the reference position, and calculates the rotation angle between the rotation angle and the reference rotation position. The amount of rotation deviation of the object to be inspected is calculated from the difference.

【0107】すなわち抽出した回転ずれ補正用モデル対
応領域の中心点座標(対角線の交点座標)を(X3 ´,
3 ´)とすると、この中心点座標(X3 ,Y3 )およ
び上記の基準位置(X0 ,Y0 )の二点を通る直線と、
直線y=Y0 とのなす角を検査対象物体の回転角θ0 ´
として求め、この検査対象物体の回転角θ0 ´と上記の
基準回転位置θ0 との差θを次式、θ=θ0 −θ0 ´に
よって求め、このθを検査対象物体の回転ずれ量とす
る。
That is, the central point coordinates (intersection coordinates of diagonal lines) of the extracted rotational displacement correction model corresponding area are set to (X 3 ′,
Y 3 ′), a straight line passing through the two points of the center point coordinates (X 3 , Y 3 ) and the reference position (X 0 , Y 0 ),
The angle formed by the straight line y = Y 0 is the rotation angle θ 0 ′ of the inspection object.
Then, the difference θ between the rotation angle θ 0 ′ of the object to be inspected and the reference rotational position θ 0 is obtained by the following equation, θ = θ 0 −θ 0 ′, and this θ is the amount of rotational deviation of the object to be inspected. And

【0108】続いてステップ77において制御部11
は、回転ずれ補正部8を動作させて、位置ずれ補正済み
の検査対象画像に対して、基準位置(X0 ,Y0 )を中
心としてθだけ回転させるアフィン変換処理を施すこと
により、位置ずれ量および回転ずれ量を補正した検査対
象画像を得、この位置ずれおよび回転ずれ補正した検査
対象画像を画像記憶部2に一時的に記憶させる。
Subsequently, in step 77, the control unit 11
Causes the rotation deviation correction unit 8 to operate, and performs an affine transformation process for rotating the inspection target image whose position deviation has been corrected by θ around the reference position (X 0 , Y 0 ). The inspection target image with the corrected amount and the rotational displacement amount is obtained, and the inspection target image with the corrected positional displacement and rotational displacement is temporarily stored in the image storage unit 2.

【0109】位置ずれ補正された検査対象画像(アフィ
ン変換処理前の検査対象画像)における任意の画素の座
標を(X,Y)とし、この座標(X,Y)の画素のアフ
ィン変換処理後の座標を(U,V)とすると、上記のア
フィン変換処理は次式によって示される。
The coordinates of an arbitrary pixel in the inspection target image (inspection target image before affine transformation processing) whose position has been corrected are defined as (X, Y), and the pixel at this coordinate (X, Y) is subjected to affine transformation processing. When the coordinates are (U, V), the above affine transformation process is expressed by the following equation.

【0110】[0110]

【数2】 図10は図7のステップ76における回転ずれ量の算
出、およびステップ77における回転ずれ補正を説明す
るものである。
(Equation 2) FIG. 10 illustrates the calculation of the rotation deviation amount in step 76 of FIG. 7 and the rotation deviation correction in step 77.

【0111】図10において、101は位置ずれ補正さ
れた(回転ずれ補正前の)検査対象画像、102は位置
ずれおよび回転ずれ補正された検査対象画像を示してい
る。
In FIG. 10, reference numeral 101 denotes an inspection object image whose position deviation has been corrected (before rotation deviation correction), and 102 denotes an inspection object image whose position deviation and rotation deviation have been corrected.

【0112】また103は検査対象物体の画像、104
は検査対象物体の単位パターンの画像をそれぞれ示し、
105は回転ずれ補正用モデル対応領域を示している。
Further, 103 is an image of the object to be inspected, 104
Shows the image of the unit pattern of the inspection object,
Reference numeral 105 denotes a rotation misalignment correction model corresponding area.

【0113】位置ずれ補正された検査対象画像101に
おいて、回転ずれ補正用モデル対応領域105の中心点
座標は(X3 ´,Y3 ´)であり、この中心点座標(X
3 ,Y3 )および基準位置(X0 ,Y0 )の二点を通る
直線と、直線y=Y0 とのなす角である検査対象物体の
回転角はθ0 ´である。
In the inspection target image 101 whose position has been corrected, the center point coordinates of the rotation deviation correction model corresponding area 105 are (X 3 ′, Y 3 ′), and the center point coordinates (X
3 , Y 3 ) and the reference position (X 0 , Y 0 ) and the straight line y = Y 0 forms the angle of rotation of the inspection object, which is θ 0 ′.

【0114】そして位置ずれおよび回転ずれ補正された
検査対象画像102においては、検査対象物体の画像1
03は、基準位置(X0 ,Y0 )を中心として回転ずれ
量θだけ回転しており、検査対象物体の回転角はθ0
なり、検査対象物体は基準回転位置θ0 にマッピングさ
れている。
Then, in the inspection target image 102 whose position and rotation are corrected, the image 1 of the inspection target object is obtained.
No. 03 is rotated about the reference position (X 0 , Y 0 ) by the rotation deviation amount θ, the rotation angle of the inspection target object is θ 0 , and the inspection target object is mapped to the reference rotation position θ 0 . .

【0115】図7に戻りステップ78において制御部1
1は、検査実行部9を動作させて、上記の位置ずれおよ
び回転ずれ補正された検査対象画像における検査領域の
画像と、検査用モデルとを比較することにより、検査対
象物体の外観上の欠陥の有無を検査する。
Returning to FIG. 7, in step 78, the control unit 1
1 is a defect in the appearance of the inspection target object by operating the inspection execution unit 9 and comparing the image of the inspection region in the inspection target image corrected for the positional deviation and the rotational deviation with the inspection model. Inspect for the presence of

【0116】上記の検査対象物体の外観検査の一例を図
11を用いて説明する。
An example of the appearance inspection of the inspection object will be described with reference to FIG.

【0117】図11は円形物体の同心円状繰り返しパタ
ーンのみを検査対象とした場合のものである。
FIG. 11 shows the case where only the concentric repeating pattern of a circular object is the object of inspection.

【0118】図11において、111は第一〜第六の各
検査用モデル、112は位置ずれおよび回転ずれ補正さ
れた検査対象画像を示しており、113は各検査用モデ
ル111に対応して設定された第一〜第六の各検査領域
を示している。
In FIG. 11, 111 indicates each of the first to sixth inspection models, 112 indicates the inspection target image in which the positional deviation and the rotational deviation are corrected, and 113 is set corresponding to each inspection model 111. The respective first to sixth inspection areas are shown.

【0119】検査用モデル111と検査領域113の画
角は等しく、N´×N´画素の画像であるものとする。
It is assumed that the inspection model 111 and the inspection area 113 have the same angle of view and are N ′ × N ′ pixel images.

【0120】各検査用モデル111の左上頂点座標を
(0,0)とし、右下頂点画素を(N´−1,N´−
1)とする。
The upper left vertex coordinates of each inspection model 111 are (0, 0), and the lower right vertex pixels are (N'-1, N'-.
1).

【0121】また各検査領域113の画像の左上頂点座
標を(Ak ,Bk )とし、画像の右下頂点座標を(N´
+Ak −1,N´+Bk −1)とする。ここでkは検査
領域の番号を示す変数であり、1,2…6のいずれかの
値をとる。
The coordinates of the upper left corner of the image in each inspection area 113 are set to (A k , B k ) and the coordinates of the lower right corner of the image are set to ( N ′ ).
+ A k -1, N '+ B k -1). Here, k is a variable indicating the number of the inspection area, and takes any one of 1, 2, ...

【0122】検査対象物体の外観検査は、検査用モデル
111−1と検査領域113−1の画像のように、対応
する検査用モデル111と検査領域113の画像の相関
値を算出し、この相関値が予め設定されている基準値以
上であるか否かを判定するものであり、算出された相関
値が基準値以上であれば、その検査領域に表示されてい
る同心円状繰り返しパタ−ンには外観上の欠陥が無いも
のと判断される。
The appearance inspection of the inspection object is performed by calculating the correlation value between the images of the corresponding inspection model 111 and the inspection area 113, like the images of the inspection model 111-1 and the inspection area 113-1. It is to determine whether or not the value is equal to or greater than a preset reference value, and if the calculated correlation value is equal to or greater than the reference value, the concentric circular pattern displayed in the inspection area is displayed. Is judged to have no visual defects.

【0123】第kの検査用モデルと第kの検査領域の画
像の相関値をC(k)(k=1,2…6)とすると、相
関値C(k)は、(数1)と同様にして、以下の算式に
よって求められる。
When the correlation value between the kth inspection model and the image of the kth inspection region is C (k) (k = 1, 2 ... 6), the correlation value C (k) is given by (Equation 1). Similarly, it is calculated by the following formula.

【0124】[0124]

【数3】 上記の(数3)においてTk (x,y)は第kの検査用
モデルの座標(x,y)の画素の輝度レベル、Ik (x
+Ak ,y+Bk )は第kの検査領域における座標(x
+Ak ,y+Bk )の画素の輝度レベルである。
(Equation 3) In the above (Equation 3), T k (x, y) is the brightness level of the pixel at the coordinates (x, y) of the kth inspection model, and I k (x
+ A k , y + B k ) is the coordinate (x
+ A k , y + B k ) pixel luminance level.

【0125】このように上記の実施形態によれば、操作
部3によって、基準画像上に、基準物体の周縁部を含む
少なくとも一つの位置ずれ補正用領域、任意の単位パタ
ーンを含む回転ずれ補正用領域、この回転ずれ補正用領
域を含み、かつこの領域に隣接する二つの単位パターン
の隣接側半分ずつを含むサーチ領域、および基準物体の
全部あるいは一部を含む少なくとも一つの検査領域を設
定して、このサーチ領域および検査領域をデータ記憶部
6に予め記憶しておき、基準値算出部5によって、前記
位置ずれ補正用領域の位置に基づいて物体の基準位置を
算出し、また前記回転ずれ補正用領域と前記基準位置と
の位置関係に基づいて物体の基準回転位置を算出し、こ
の基準位置および基準回転位置をデータ記憶部6に予め
記憶しておき、モデル作成部4によって、基準画像か
ら、前記位置ずれ補正用領域の画像、前記回転ずれ補正
用領域の画像、および前記検査領域の画像をそれぞれ切
り出すことにより、位置ずれ補正用モデル、回転ずれ補
正用モデル、および検査用モデルを作成し、作成した各
モデルを画像記憶部2に予め記憶しておき、位置ずれ補
正部7によって、検査対象画像において、前記位置ずれ
補正用モデルに対応する領域を抽出し、抽出した領域の
位置に基づいて検査対象物体の固有点座標を算出し、こ
の固有点座標と前記基準位置との差から検査対象物体の
位置ずれ量を求め、検査対象画像に対して所定のスクロ
ール処理を施すことにより、前記位置ずれ量を補正し、
回転ずれ補正部8によって、前記位置ずれ補正された検
査対象画像における前記サーチ領域において、前記回転
ずれ補正用モデルに対応する領域を抽出し、抽出した領
域と前記基準位置との位置関係に基づいて検査対象物体
の回転角を算出し、この回転角と前記基準回転位置との
差から検査対象物体の回転ずれ量を求め、前記位置ずれ
補正された検査対象画像に対して所定のアフィン変換処
理を施すことにより、前記回転ずれ量を補正し、検査実
行部9によって、前記位置ずれおよび回転ずれが補正さ
れた検査対象画像における前記検査領域の画像と、前記
検査用モデルとを比較することにより、検査対象物体の
外観上の欠陥の有無を検査することによって、同心円状
繰り返しパターンを有する円形物体が不特定な位置およ
び回転角に配置されている画像を用いて、前記円形物体
の外観上の欠陥の有無を短時間で高精度に検査すること
ができる。
As described above, according to the above-described embodiment, at least one position deviation correction area including the peripheral portion of the reference object and the rotation deviation correction area including an arbitrary unit pattern are provided on the reference image by the operation unit 3. By setting an area, a search area including this rotation deviation correction area and including adjacent halves of two unit patterns adjacent to this area, and at least one inspection area including all or a part of the reference object, The search area and the inspection area are stored in the data storage unit 6 in advance, the reference value calculation unit 5 calculates the reference position of the object based on the position of the position deviation correction area, and the rotation deviation correction is performed. The reference rotational position of the object is calculated based on the positional relationship between the working area and the reference position, and the reference position and the reference rotational position are stored in advance in the data storage unit 6, The image forming unit 4 cuts out the image of the misregistration correction area, the image of the rotational misregistration correction area, and the image of the inspection area from the reference image to obtain the misregistration correction model and the rotational deviation correction image. A model and an inspection model are created, each created model is stored in advance in the image storage unit 2, and the position deviation correction unit 7 extracts an area corresponding to the position deviation correction model in the inspection target image. Then, the eigenpoint coordinates of the object to be inspected are calculated based on the position of the extracted area, the amount of displacement of the object to be inspected is calculated from the difference between the coordinates of the eigenpoint and the reference position, and the predetermined value is set with respect to the image to be inspected. By performing the scroll processing of, the position deviation amount is corrected,
An area corresponding to the rotational deviation correction model is extracted from the search area in the inspection target image whose positional deviation has been corrected by the rotational deviation correction unit 8, and based on the positional relationship between the extracted area and the reference position. The rotation angle of the inspection target object is calculated, the rotation displacement amount of the inspection target object is obtained from the difference between this rotation angle and the reference rotation position, and a predetermined affine transformation process is performed on the position displacement corrected inspection target image. By performing the correction of the rotation deviation amount by performing, by comparing the image of the inspection region in the inspection target image in which the position deviation and the rotation deviation have been corrected by the inspection execution unit 9 and the inspection model, By inspecting the appearance of the object to be inspected for defects, circular objects with concentric circular repeating patterns are placed at unspecified positions and rotation angles. By using an image that, the presence or absence of a defect in appearance of the circular object can be a short time to inspect with high accuracy.

【0126】[0126]

【発明の効果】以上説明したように本発明の請求項1記
載の画像処理方法および請求項3記載の画像処理装置に
よれば、操作手段によって設定された位置ずれ補正用領
域の位置に基づいて、基準値算出手段によって物体の基
準位置を算出し、この基準位置を基準値記憶手段に記憶
するとともに、モデル作成手段によって前記位置ずれ補
正用領域の画像を基準画像から切り出すことにより位置
ずれ補正用モデルを作成して予めモデル記憶手段に記憶
しておき、また操作手段によって設定された回転ずれ補
正用領域と前記基準位置との位置関係に基づいて、基準
値算出手段によって物体の基準回転位置を算出し、この
基準回転位置を基準値記憶手段に記憶するとともに、モ
デル作成手段によって前記回転ずれ補正用領域の画像を
基準画像から切り出すことにより回転ずれ補正用モデル
を作成して予めモデル記憶手段に記憶しておき、位置ず
れ量算出手段によって、処理対象画像において、前記位
置ずれ補正用モデルと対応する領域を抽出し、抽出した
領域の位置に基づいて処理対象物体の固有点座標を算出
し、この処理対象物体の固有点座標と前記基準位置との
差から処理対象物体の位置ずれ量を求め、位置ずれ補正
手段によって処理対象画像に対して所定のスクロール処
理を施すことにより、前記位置ずれ量を補正し、回転ず
れ量算出手段によって、前記位置ずれ補正した処理対象
画像において、前記回転ずれ補正用モデルに対応する領
域を抽出し、抽出した領域と前記基準位置との位置関係
に基づいて処理対象物体の回転角を算出し、この処理対
象物体の回転角と前記基準回転位置との差から処理対象
物体の回転ずれ量を求め、回転ずれ補正手段によって前
記位置ずれ補正した処理対象画像に対して所定のアフィ
ン変換処理を施すことにより、前記回転ずれ量を補正す
ることによって、同心円状繰り返しパターンを有する円
形物体の画像において、位置および回転角が不特定であ
る前記円形物体を所定位置かつ所定回転位置に高精度に
配置することができるという効果を有する。
As described above, according to the image processing method of the first aspect and the image processing apparatus of the third aspect of the present invention, based on the position of the misregistration correction area set by the operating means. For calculating the reference position of the object by the reference value calculating means, storing the reference position in the reference value storing means, and for correcting the position deviation by cutting out the image of the position deviation correcting area from the reference image by the model creating means. A model is created and stored in advance in the model storage means, and the reference rotation position of the object is determined by the reference value calculation means based on the positional relationship between the rotation deviation correction area set by the operation means and the reference position. The calculated reference rotation position is stored in the reference value storage means, and the image of the rotation deviation correction area is cut from the reference image by the model creation means. A rotation deviation correction model is created by storing it in advance in the model storage means, and the position deviation amount calculation means extracts and extracts a region corresponding to the position deviation correction model in the processing target image. The eigenpoint coordinates of the object to be processed are calculated based on the position of the area, and the amount of positional deviation of the object to be processed is calculated from the difference between the eigenpoint coordinates of the object to be processed and the reference position, and the object to be processed by the positional deviation correcting means. By performing a predetermined scrolling process on the image, the positional deviation amount is corrected, and the rotational deviation amount calculation means extracts a region corresponding to the rotational deviation correction model from the positional deviation corrected processing target image. Then, the rotation angle of the processing target object is calculated based on the positional relationship between the extracted region and the reference position, and the rotation angle of the processing target object and the reference rotation position are calculated. The rotational deviation amount of the object to be processed is calculated from the difference between the two, and the processing target image subjected to the positional deviation correction by the rotational deviation correction means is subjected to a predetermined affine transformation process to correct the rotational deviation amount, thereby concentric circles. In an image of a circular object having a circular repeating pattern, the circular object whose position and rotation angle are unspecified can be accurately arranged at a predetermined position and a predetermined rotation position.

【0127】また本発明の請求項2記載の画像処理方法
および請求項4記載の画像処理装置によれば、本発明の
請求項1記載の画像処理方法および請求項3記載の画像
処理装置において、操作手段によって基準画像上に設定
した、前記回転ずれ補正用領域を含み、かつこの領域に
隣接する二つの単位パターンの隣接側半分ずつを含むサ
ーチ領域を領域記憶手段に予め記憶しておき、回転ずれ
量算出手段によって、前記位置ずれ量補正した処理対象
画像における前記サーチ領域において、前記回転ずれ補
正用モデルに対応する領域を抽出することによって、同
心円状繰り返しパターンを有する円形物体を短時間で所
定位置かつ所定回転位置に高精度に配置することができ
るという効果を有する。
According to the image processing method according to claim 2 and the image processing device according to claim 4, the image processing method according to claim 1 and the image processing device according to claim 3 of the present invention are: A search area, which is set on the reference image by the operation means, includes the rotation deviation correction area and includes two adjacent side halves of two unit patterns adjacent to this area, is stored in advance in the area storage means, and is rotated. A circular object having a concentric circular repeating pattern is determined in a short time by extracting a region corresponding to the rotational displacement correction model in the search region in the processing target image whose positional displacement amount has been corrected by the displacement amount calculating means. There is an effect that it can be arranged at a predetermined position and a predetermined rotation position with high accuracy.

【0128】次に本発明の請求項5記載の物体外観検査
装置によれば、操作手段によって、基準画像上に、位置
ずれ補正用領域、回転ずれ補正用領域、および検査領域
を設定し、前記検査領域を領域記憶手段に予め記憶して
おき、基準値算出手段によって、前記位置ずれ補正用領
域の位置に基づいて物体の基準位置を算出し、また前記
回転ずれ補正用領域と前記基準位置との位置関係に基づ
いて物体の基準回転位置を算出し、算出した基準位置お
よび基準回転位置を基準値記憶手段に予め記憶してお
き、モデル作成手段によって、基準画像から、前記位置
ずれ補正用領域の画像、前記回転ずれ補正用領域の画
像、および前記検査領域の画像をそれぞれ切り出すこと
により、位置ずれ補正用モデル、回転ずれ補正用モデ
ル、および検査用モデルを作成し、作成した各モデルを
モデル記憶手段に予め記憶しておき、位置ずれ量算出手
段によって、検査対象画像において、前記位置ずれ補正
用モデルに対応する領域を抽出し、抽出した領域の位置
に基づいて検査対象物体の固有点座標を算出し、この固
有点座標と前記基準位置との差から検査対象物体の位置
ずれ量を求め、位置ずれ補正手段によって検査対象画像
に対して所定のスクロール処理を施すことにより、前記
位置ずれ量を補正し、回転ずれ量算出手段によって、前
記位置ずれ補正された検査対象画像において、前記回転
ずれ補正用モデルに対応する領域を抽出し、抽出した領
域と前記基準位置との位置関係に基づいて検査対象物体
の回転角を算出し、この回転角と前記基準回転位置との
差から検査対象物体の回転ずれ量を求め、回転ずれ補正
手段によって前記位置ずれ補正された検査対象画像に対
して所定のアフィン変換処理を施すことにより、前記回
転ずれ量を補正し、検査実行手段によって、前記位置ず
れおよび回転ずれが補正された検査対象画像における前
記検査領域の画像と、前記検査用モデルとを比較するこ
とにより、検査対象物体の外観上の欠陥の有無を検査す
ることによって、同心円状繰り返しパターンを有する円
形物体が不特定な位置および回転角に配置されている画
像を用いて、前記円形物体の外観上の欠陥の有無を高精
度に検査することができるという効果を有する。
Next, according to the object appearance inspection apparatus of the fifth aspect of the present invention, the operation means sets the position deviation correction area, the rotation deviation correction area, and the inspection area on the reference image, The inspection area is stored in advance in the area storage means, the reference value calculation means calculates the reference position of the object based on the position of the position deviation correction area, and the rotation deviation correction area and the reference position are calculated. The reference rotational position of the object is calculated based on the positional relationship of the object, the calculated reference position and the reference rotational position are stored in the reference value storage means in advance, and the model creation means uses the reference image to detect the position deviation correction area. Image, the image of the rotation deviation correction area, and the image of the inspection area are respectively cut out to obtain a position deviation correction model, a rotation deviation correction model, and an inspection model. The created model is stored in advance in the model storage means, and the position shift amount calculation means extracts a region corresponding to the position shift correction model in the inspection target image, and the position of the extracted region is set. The eigenpoint coordinates of the object to be inspected are calculated based on the difference between the eigenpoint coordinates and the reference position, and the amount of positional deviation of the object to be inspected is determined. By correcting the positional deviation amount, the rotational deviation amount calculating means extracts an area corresponding to the rotational deviation correction model in the inspection target image whose positional deviation is corrected, and extracts the extracted area and the extracted area. The rotation angle of the inspection target object is calculated based on the positional relationship with the reference position, and the rotation deviation amount of the inspection target object is obtained from the difference between this rotation angle and the reference rotation position, The rotation deviation amount is corrected by performing a predetermined affine transformation process on the inspection target image whose position deviation has been corrected by the rotation deviation correction means, and the position deviation and the rotation deviation have been corrected by the inspection execution means. By comparing the image of the inspection area in the inspection target image and the inspection model, by inspecting the presence or absence of a defect on the appearance of the inspection target object, the circular object having a concentric circular repeating pattern is unspecified. There is an effect that the presence or absence of a defect in the appearance of the circular object can be inspected with high accuracy by using the images arranged at the position and the rotation angle.

【0129】また本発明の請求項6記載の物体外観検査
装置によれば、請求項5記載の物体外観検査装置におい
て、操作手段によって基準画像上に設定した、前記回転
ずれ補正用領域を含み、かつこの領域に隣接する二つの
単位パターンの隣接側半分ずつを含むサーチ領域を領域
記憶手段に予め記憶しておき、回転ずれ量算出手段によ
って、前記位置ずれ量補正した処理対象画像における前
記サーチ領域において、前記回転ずれ補正用モデルに対
応する領域を抽出することによって、円形物体が不特定
な位置および回転角に配置されている画像を用いて、同
心円状繰り返しパターンを有する円形物体の外観上の欠
陥の有無を短時間で高精度に検査することができるとい
う効果を有する。
According to a sixth aspect of the present invention, there is provided the object visual inspection apparatus according to the fifth aspect, which includes the rotation deviation correction area set on the reference image by the operating means. Further, a search area including two adjacent side halves of two unit patterns adjacent to this area is stored in advance in the area storage means, and the search area in the processing target image whose position deviation amount is corrected by the rotation deviation amount calculation means. In, by extracting a region corresponding to the rotation deviation correction model, by using an image in which the circular object is arranged at an unspecified position and a rotation angle, on the appearance of the circular object having a concentric repeating pattern There is an effect that the presence or absence of defects can be inspected with high accuracy in a short time.

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

【図1】本発明の物体外観検査装置の実施形態の構成を
示すブロック図である。
FIG. 1 is a block diagram showing a configuration of an embodiment of an object appearance inspection device of the present invention.

【図2】物体外観検査装置において外観検査される、同
心円状繰り返しパターンを有する円形物体の一例を示す
外観図である。
FIG. 2 is an external view showing an example of a circular object having a concentric circular repeating pattern, which is inspected by an object appearance inspection device.

【図3】本発明の物体外観検査装置のデータ設定モード
における処理手順を示すフローチャートである。
FIG. 3 is a flowchart showing a processing procedure in a data setting mode of the object appearance inspection device of the present invention.

【図4】図3のステップ32における位置ずれ補正用モ
デル領域および回転ずれ補正用モデル領域の設定例を示
す図である。
FIG. 4 is a diagram showing a setting example of a positional deviation correction model area and a rotational deviation correction model area in step 32 of FIG. 3;

【図5】図3のステップ34における基準位置および基
準回転位置の算出を示す説明図である。
5 is an explanatory diagram showing calculation of a reference position and a reference rotational position in step 34 of FIG.

【図6】図3のステップ35におけるサーチ領域の設定
例、およびステップ36における検査領域の設定例を示
す図である。
6 is a diagram showing an example of setting a search area in step 35 and an example of setting an inspection area in step 36 of FIG.

【図7】本発明の物体外観検査装置の検査実行モードに
おける処理手順を示すフローチャートである。
FIG. 7 is a flowchart showing a processing procedure in an inspection execution mode of the object appearance inspection apparatus of the present invention.

【図8】図7のステップ72における位置ずれ補正用モ
デル対応領域の抽出を示す説明図である。
8 is an explanatory diagram showing extraction of a misregistration correction model corresponding region in step 72 of FIG. 7. FIG.

【図9】図7のステップ73における位置ずれ量の算
出、およびステップ74における位置ずれ補正を示す説
明図である。
9 is an explanatory diagram showing the calculation of the positional deviation amount in step 73 and the positional deviation correction in step 74 of FIG. 7. FIG.

【図10】図7のステップ76における回転ずれ量の算
出、およびステップ77における回転ずれ補正を示す説
明図である。
10 is an explanatory diagram showing the calculation of the rotation deviation amount in step 76 and the rotation deviation correction in step 77 of FIG.

【図11】図7に戻りステップ78における検査対象物
体の外観検査の一例を示す説明図である。
FIG. 11 is an explanatory diagram showing an example of the appearance inspection of the inspection target object in step 78, returning to FIG. 7.

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

1 撮像装置 2 画像記憶部 3 操作部 4 モデル作成部 5 基準値算出部 6 データ記憶部 7 位置ずれ補正部 8 回転ずれ補正部 9 検査実行部 10 表示部 11 制御部 DESCRIPTION OF SYMBOLS 1 Imaging device 2 Image storage unit 3 Operation unit 4 Model creation unit 5 Reference value calculation unit 6 Data storage unit 7 Positional deviation correction unit 8 Rotational deviation correction unit 9 Inspection execution unit 10 Display unit 11 Control unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 複数の特徴的な単位パターンが同心円状
に配置された円形物体に関して、基準物体を撮像して得
られた基準画像に基づいて物体の基準位置および基準回
転位置を算出して予め記憶しておき、処理対象物体を撮
像して得られた処理対象画像において、前記処理対象物
体を前記基準位置および基準回転位置に配置する画像処
理方法であって、 前記基準画像上に設定した、前記基準物体の周縁部を含
む少なくとも一つの位置ずれ補正用領域の位置に基づい
て前記基準物体の固有点座標を算出し、この固有点座標
を前記基準位置として記憶するとともに、前記位置ずれ
補正用領域の画像を前記基準画像から切り出し、位置ず
れ補正用モデルとして予め記憶しておき、 前記基準画像上に設定した、任意の前記単位パターンを
含む回転ずれ補正用領域と前記基準位置との位置関係に
基づいて前記基準物体の回転角を算出し、この回転角を
前記基準回転位置として記憶するとともに、前記回転ず
れ補正用領域の画像を前記基準画像から切り出し、回転
ずれ補正用モデルとして予め記憶しておき、 前記処理対象画像において、前記位置ずれ補正用モデル
に対応する領域を抽出し、抽出した領域の位置に基づい
て前記処理対象物体の固有点座標を算出し、 この処理対象物体の固有点座標と前記基準位置との差か
ら前記処理対象物体の位置ずれ量を求め、 前記処理対象画像に対して所定のスクロール処理を施す
ことにより、前記位置ずれ量を補正し、 この位置ずれ補正した処理対象画像において、前記回転
ずれ補正用モデルに対応する領域を抽出し、抽出した領
域と前記基準位置との位置関係に基づいて前記処理対象
物体の回転角を算出し、 この処理対象物体の回転角と前記基準回転位置との差か
ら前記処理対象物体の回転ずれ量を求め、 前記位置ずれ補正した処理対象画像に対して所定のアフ
ィン変換処理を施すことにより、前記回転ずれ量を補正
することを特徴とする画像処理方法。
1. Regarding a circular object in which a plurality of characteristic unit patterns are arranged concentrically, a reference position and a reference rotational position of the object are calculated in advance based on a reference image obtained by imaging the reference object. It is stored, in the processing target image obtained by imaging the processing target object, an image processing method of arranging the processing target object at the reference position and the reference rotation position, which is set on the reference image, The eigenpoint coordinates of the reference object are calculated based on the position of at least one misregistration correction region including the peripheral portion of the reference object, and the eigenpoint coordinates are stored as the reference position, and the misalignment correction is performed. An image of a region is cut out from the reference image, stored in advance as a position deviation correction model, and a rotation deviation including an arbitrary unit pattern set on the reference image is set. The rotation angle of the reference object is calculated based on the positional relationship between the normal use area and the reference position, the rotation angle is stored as the reference rotation position, and the image of the rotation deviation correction area is changed from the reference image. Cutting out, stored in advance as a rotation deviation correction model, and in the processing target image, an area corresponding to the position deviation correction model is extracted, and eigenpoint coordinates of the processing target object based on the position of the extracted area. Is calculated, the amount of positional deviation of the processing target object is obtained from the difference between the eigenpoint coordinates of the processing target object and the reference position, and the positional deviation is performed by performing a predetermined scrolling process on the processing target image. In the processing target image whose position has been corrected, the region corresponding to the rotation displacement correction model is extracted, and the position between the extracted region and the reference position is extracted. The rotation angle of the object to be processed is calculated based on the relationship, the amount of rotational deviation of the object to be processed is calculated from the difference between the rotational angle of the object to be processed and the reference rotational position, and the processing target image corrected for the positional deviation An image processing method, wherein the rotation deviation amount is corrected by performing a predetermined affine transformation process on the.
【請求項2】 前記回転ずれ補正用領域を含み、かつこ
の領域に隣接する二つの単位パターンの隣接側半分ずつ
を含む、前記基準画像上に設定したサーチ領域を予め記
憶しておき、 前記位置ずれ量補正した処理対象画像における前記サー
チ領域において、前記回転ずれ補正用モデルに対応する
領域を抽出することを特徴とする請求項1記載の画像処
理方法。
2. A search area set on the reference image is stored in advance, the search area including the rotation deviation correction area and two adjacent side halves of two unit patterns adjacent to the area. The image processing method according to claim 1, wherein an area corresponding to the rotation deviation correction model is extracted from the search area in the processing target image whose deviation amount has been corrected.
【請求項3】 複数の特徴的な単位パターンが同心円状
に配置された円形物体に関して、基準物体を撮像して得
られた基準画像に基づいて物体の基準位置および基準回
転位置を算出して予め記憶しておき、処理対象物体を撮
像して得られた処理対象画像において、前記処理対象物
体を前記基準位置および基準回転位置に配置する画像処
理装置であって、 前記基準画像上に、前記基準物体の周縁部を含む少なく
とも一つの位置ずれ補正用領域を設定し、また任意の前
記単位パターンを含む回転ずれ補正用領域を設定するた
めの操作手段と、 前記位置ずれ補正用領域の位置に基づいて前記基準物体
の固有点座標を前記基準位置として算出し、また前記回
転ずれ補正用領域と前記基準位置との位置関係に基づい
て前記基準物体の回転角を前記基準回転位置として算出
する基準値算出手段と、 前記基準画像から、前記位置ずれ補正用領域の画像を切
り出すことにより位置ずれ補正用モデルを作成し、また
前記回転ずれ補正用領域の画像を切り出すことにより回
転ずれ補正用モデルを作成するモデル作成手段と、 前記位置ずれ補正用モデルおよび回転ずれ補正用モデル
を記憶するモデル記憶手段と、 前記基準位置および基準回転位置を記憶する基準値記憶
手段と、 前記処理対象画像において、前記位置ずれ補正用モデル
に対応する領域をそれぞれ抽出し、抽出した領域の位置
に基づいて前記処理対象物体の固有点座標を算出し、こ
の固有点座標と前記基準位置との差から前記処理対象物
体の位置ずれ量を求める位置ずれ量算出手段と、 前記処理対象画像に対して所定のスクロール処理を施す
ことにより、前記位置ずれ量を補正する位置ずれ補正手
段と、 前記位置ずれ補正された処理対象画像において、前記回
転ずれ補正用モデルに対応する領域を抽出し、抽出した
領域と前記基準位置との位置関係に基づいて前記処理対
象物体の回転角を算出し、この回転角と前記基準回転位
置との差から前記処理対象物体の回転ずれ量を求める回
転ずれ量算出手段と、 前記位置ずれ補正された処理対象画像に対して所定のア
フィン変換処理を施すことにより、前記処理対象物体の
回転ずれ量を補正する回転ずれ補正手段とを具備するこ
とを特徴とする画像処理装置。
3. Regarding a circular object in which a plurality of characteristic unit patterns are concentrically arranged, a reference position and a reference rotational position of the object are calculated in advance based on a reference image obtained by imaging the reference object. An image processing apparatus that stores the processing target object in a processing target image obtained by capturing an image of the processing target object, and arranges the processing target object at the reference position and the reference rotation position, wherein the reference image is displayed on the reference image. Operation means for setting at least one position deviation correction area including the peripheral portion of the object, and for setting a rotation deviation correction area including any of the unit patterns, and based on the position of the position deviation correction area Calculate the eigenpoint coordinates of the reference object as the reference position, and determine the rotation angle of the reference object based on the positional relationship between the rotation deviation correction area and the reference position. A reference value calculation unit that calculates the position, and a position deviation correction model is created by cutting out the image of the position deviation correction area from the reference image, and rotation is performed by cutting out the image of the rotation deviation correction area. Model creating means for creating a deviation correction model, model storage means for storing the position deviation correction model and rotation deviation correction model, reference value storage means for storing the reference position and the reference rotation position, and the processing In the target image, each region corresponding to the displacement correction model is extracted, the eigenpoint coordinates of the processing target object are calculated based on the position of the extracted region, and the difference between the eigenpoint coordinates and the reference position is calculated. A positional shift amount calculating means for obtaining a positional shift amount of the processing target object from the above, and performing a predetermined scrolling process on the processing target image With this, a positional deviation correction unit that corrects the positional deviation amount, and an area corresponding to the rotational deviation correction model in the positional deviation corrected processing target image is extracted, and the extracted area and the reference position A rotation deviation amount calculation unit that calculates a rotation angle of the processing target object based on a positional relationship, and obtains a rotation deviation amount of the processing target object from a difference between the rotation angle and the reference rotation position; An image processing apparatus, comprising: a rotation deviation correction unit that corrects a rotation deviation amount of the processing object by performing a predetermined affine transformation process on the processing object image.
【請求項4】 前記回転ずれ補正用領域を含み、かつこ
の回転ずれ補正用領域に隣接する二つの単位パターンの
隣接側半分ずつを含むサーチ領域を前記基準画像上に設
定するための前記操作手段と、 前記サーチ領域を記憶する領域記憶手段と、 前記位置ずれ補正された処理対象画像における前記サー
チ領域において、前記回転ずれ補正用モデルに対応する
領域を抽出する前記回転ずれ量算出手段とを具備するこ
とを特徴とする請求項3記載の画像処理装置。
4. The operation means for setting a search area on the reference image, the search area including the rotation deviation correction area, and each half of the two adjacent unit patterns adjacent to the rotation deviation correction area. An area storage unit that stores the search area, and a rotation deviation amount calculation unit that extracts an area corresponding to the rotation deviation correction model in the search area in the position deviation corrected image to be processed. The image processing apparatus according to claim 3, wherein:
【請求項5】 複数の特徴的な単位パターンが同心円状
に配置された円形物体に関して、検査対象物体の画像
を、予め記憶している基準物体の画像と比較することに
より、前記検査対象物体の外観上の欠陥の有無を検査す
る物体外観検査装置であって、 前記基準物体を撮像して得られた基準画像上に、前記基
準物体の周縁部を含む少なくとも一つの位置ずれ補正用
領域を設定し、また任意の前記単位パターンを含む回転
ずれ補正用領域を設定し、さらに前記基準物体の全部あ
るいは一部を含む少なくとも一つの検査領域を設定する
ための操作手段と、 前記位置ずれ補正用領域の位置に基づいて前記基準物体
の固有点座標を基準位置として算出し、また前記回転ず
れ補正用領域と前記基準位置との位置関係に基づいて前
記基準物体の回転角を基準回転位置として算出する基準
値算出手段と、 前記基準画像から、前記位置ずれ補正用領域の画像を切
り出すことにより位置ずれ補正用モデルを作成し、また
前記回転ずれ補正用領域の画像を切り出すことにより回
転ずれ補正用モデルを作成し、さらに前記検査領域の画
像を切り出すことにより検査用モデルを作成するモデル
作成手段と、 前記検査領域を記憶する領域記憶手段と、 前記位置ずれ補正用モデル、回転ずれ補正用モデル、お
よび検査用モデルを記憶するモデル記憶手段と、 前記基準位置および基準回転位置を記憶する基準値記憶
手段と、 前記検査対象物体を撮像して得られた検査対象画像にお
いて、前記位置ずれ補正用モデルに対応する領域を抽出
し、抽出した領域の位置に基づいて前記検査対象物体の
固有点座標を算出し、この固有点座標と前記基準位置と
の差から前記検査対象物体の位置ずれ量を求める位置ず
れ量算出手段と、 前記検査対象画像に対して所定のスクロール処理を施す
ことにより、前記位置ずれ量を補正する位置ずれ補正手
段と、 前記位置ずれ補正された検査対象画像において、前記回
転ずれ補正用モデルに対応する領域を抽出し、抽出した
領域と前記基準位置との位置関係に基づいて前記検査対
象物体の回転角を算出し、この回転角と前記基準回転位
置との差から前記検査対象物体の回転ずれ量を求める回
転ずれ量算出手段と、 前記位置ずれ補正された検査対象画像に対して所定のア
フィン変換処理を施すことにより、前記回転ずれ量を補
正する回転ずれ補正手段と、 前記位置ずれおよび回転ずれが補正された検査対象画像
における前記検査領域の画像と、前記検査用モデルとを
比較することにより、前記検査対象物体の外観上の欠陥
の有無を検査する検査実行手段とを具備することを特徴
とする物体外観検査装置。
5. With respect to a circular object in which a plurality of characteristic unit patterns are concentrically arranged, an image of the object to be inspected is compared with an image of a reference object stored in advance. An object appearance inspection device for inspecting the presence or absence of a defect in appearance, wherein at least one position deviation correction area including a peripheral portion of the reference object is set on a reference image obtained by imaging the reference object. And an operation unit for setting a rotation deviation correction area including any of the unit patterns, and further setting at least one inspection area including all or part of the reference object, and the position deviation correction area. The eigenpoint coordinates of the reference object are calculated as the reference position based on the position of the reference object, and the rotation angle of the reference object is calculated based on the positional relationship between the rotation deviation correction area and the reference position. A reference value calculation unit for calculating a rotational position, and a positional deviation correction model is created by cutting out an image of the positional deviation correction area from the reference image, and an image of the rotational deviation correction area is cut out. A model creating unit that creates a rotation deviation correction model and further creates an inspection model by cutting out the image of the inspection area, an area storage unit that stores the inspection area, the position deviation correction model, and the rotation deviation. A model storage unit that stores a correction model and an inspection model, a reference value storage unit that stores the reference position and the reference rotation position, an inspection target image obtained by imaging the inspection target object, and the position A region corresponding to the displacement correction model is extracted, and the eigenpoint coordinates of the inspection target object are calculated based on the position of the extracted region, A positional shift amount calculating unit that obtains a positional shift amount of the inspection target object from the difference between the eigenpoint coordinates and the reference position, and a predetermined scroll process for the inspection target image to determine the positional shift amount. A misregistration correction unit that corrects, and an area corresponding to the rotational misalignment correction model in the inspection object image that has been misaligned, and the inspection object based on the positional relationship between the extracted area and the reference position. A rotation deviation amount calculating unit that calculates a rotation angle of the object and obtains a rotation deviation amount of the inspection object from the difference between the rotation angle and the reference rotation position, and a predetermined value for the position deviation corrected inspection object image. Deviation correction means for correcting the rotation deviation amount by performing the affine transformation processing of the above, and the inspection in the inspection target image in which the position deviation and the rotation deviation are corrected. An object appearance inspection apparatus comprising: an inspection execution means for inspecting the presence or absence of a defect on the appearance of the inspection object by comparing an image of a region with the inspection model.
【請求項6】 前記回転ずれ補正用領域を含み、かつこ
の回転ずれ補正用領域に隣接する二つの単位パターンの
隣接側半分ずつを含むサーチ領域を前記基準画像上に設
定するための前記操作手段と、 前記サーチ領域を記憶する前記領域記憶手段と、 前記位置ずれ補正された検査対象画像における前記サー
チ領域において、前記回転ずれ補正用モデルに対応する
領域を抽出する前記回転ずれ量算出手段とを具備するこ
とを特徴とする請求項5記載の物体外観検査装置。
6. The operation means for setting a search area on the reference image, the search area including the rotation deviation correction area, and each half of an adjacent side of two unit patterns adjacent to the rotation deviation correction area. An area storage unit that stores the search area; and a rotation deviation amount calculation unit that extracts an area corresponding to the rotation deviation correction model in the search area in the inspection target image whose position deviation has been corrected. The object appearance inspection apparatus according to claim 5, further comprising:
JP7292236A 1995-10-13 1995-10-13 Image processing device and method and device for visual inspection of object Pending JPH09113225A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7292236A JPH09113225A (en) 1995-10-13 1995-10-13 Image processing device and method and device for visual inspection of object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7292236A JPH09113225A (en) 1995-10-13 1995-10-13 Image processing device and method and device for visual inspection of object

Publications (1)

Publication Number Publication Date
JPH09113225A true JPH09113225A (en) 1997-05-02

Family

ID=17779240

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7292236A Pending JPH09113225A (en) 1995-10-13 1995-10-13 Image processing device and method and device for visual inspection of object

Country Status (1)

Country Link
JP (1) JPH09113225A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003008878A (en) * 2001-06-26 2003-01-10 Canon Inc Apparatus and method for image processing, recording medium, and program
JP2011075289A (en) * 2009-09-29 2011-04-14 Fujitsu Ltd Visual inspection apparatus, visual inspection method and visual inspection program
CN112070084A (en) * 2020-09-04 2020-12-11 北京百度网讯科技有限公司 Method and device for determining position of repeated image unit

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003008878A (en) * 2001-06-26 2003-01-10 Canon Inc Apparatus and method for image processing, recording medium, and program
JP4677129B2 (en) * 2001-06-26 2011-04-27 キヤノン株式会社 Image processing apparatus, image processing method, and program
JP2011075289A (en) * 2009-09-29 2011-04-14 Fujitsu Ltd Visual inspection apparatus, visual inspection method and visual inspection program
CN112070084A (en) * 2020-09-04 2020-12-11 北京百度网讯科技有限公司 Method and device for determining position of repeated image unit
CN112070084B (en) * 2020-09-04 2024-01-12 北京百度网讯科技有限公司 Method and device for determining position of repeated image unit

Similar Documents

Publication Publication Date Title
US5793901A (en) Device and method to detect dislocation of object image data
JP3387499B2 (en) Orientation determination method in local region of contour line and determination method of line segment and angle
CA2507174C (en) Method of registering and aligning multiple images
US6751361B1 (en) Method and apparatus for performing fixturing in a machine vision system
CN112037128B (en) Panoramic video stitching method
JP2002140694A (en) Image processor, its method and recording medium with recorded image processing program
JPH08136235A (en) Method for detecting pattern
JPH09113225A (en) Image processing device and method and device for visual inspection of object
WO2023188671A1 (en) Inspection assistance system, inspection assistance method, and inspection assistance program
US10791661B2 (en) Board inspecting apparatus and method of compensating board distortion using the same
JPH08324755A (en) Method and device for housing circular article
JP3422147B2 (en) Position shift amount detecting device and image measuring device
JP3281457B2 (en) Board component mounting inspection method and inspection device
JP4097255B2 (en) Pattern matching apparatus, pattern matching method and program
Olsen et al. Calibrating a camera network using a domino grid
JPH08101893A (en) Model image data registering device for image processor
JP3427230B2 (en) Image processing device
CN109255754B (en) Method and system for splicing and really displaying large-scene multi-camera images
JP2910706B2 (en) LSI image alignment method
Le et al. Computer vision–based system for automation and industrial applications
CN113473834B (en) Method, device and system for inserting special-shaped element, electronic equipment and storage medium
JPH1091788A (en) Device for positioning pattern and method therefor
JPH09128543A (en) Method and device for registering model image and object appearance inspecting device utilizing the same
JPH10283480A (en) Recognition processor and storage medium for recognition processing applied for the same device
CN115760981A (en) Binocular stereo matching method based on target detection and iou matching