JPH07168941A - Picture processor - Google Patents

Picture processor

Info

Publication number
JPH07168941A
JPH07168941A JP5314870A JP31487093A JPH07168941A JP H07168941 A JPH07168941 A JP H07168941A JP 5314870 A JP5314870 A JP 5314870A JP 31487093 A JP31487093 A JP 31487093A JP H07168941 A JPH07168941 A JP H07168941A
Authority
JP
Japan
Prior art keywords
image
partial
reference image
partial area
cross
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.)
Granted
Application number
JP5314870A
Other languages
Japanese (ja)
Other versions
JP3627249B2 (en
Inventor
Kazutaka Ikeda
和隆 池田
Yoshimasa Fujiwara
祥雅 藤原
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP31487093A priority Critical patent/JP3627249B2/en
Publication of JPH07168941A publication Critical patent/JPH07168941A/en
Application granted granted Critical
Publication of JP3627249B2 publication Critical patent/JP3627249B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To automatically extract a reference picture to be used for pattern matching. CONSTITUTION:In respect of a picture obtained by image-picking up an object 1 being reference by a TV camera 2, an autocorrelation value is determined for every partial area D0 of the same size. In respect of a first partial area D1 in which the autocorrelation value exceeds a first threshold, a second partial area D2 is set in the vicinity of the first partial area D1. The cross-correlation value of the first partial area D1 and the second partial area D2 is determined, and when the cross-correlation value is below a second threshold, the picture of the first partial area D1 is made to be the reference picture.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、検査対象物を撮像して
得た画像について特徴的な部分領域として設定した基準
画像との一致度を求め、一致度の高い部分領域を基準と
して座標変換を行なうことで、検査対象物の画像の位置
を補正するようにした画像処理装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention finds the degree of coincidence with an image obtained by picking up an image of an inspection object with a reference image set as a characteristic partial area, and performs coordinate conversion with the partial area having a high degree of coincidence as a reference. By correcting the position of the image of the inspection object.

【0002】[0002]

【従来の技術】従来より、検査対象物についてTVカメ
ラのような撮像装置によって撮像した画像に基づいて、
検査対象物の表面の傷などの欠陥を検査する技術が知ら
れている。ところで、検査対象物と撮像装置との相対的
な位置関係は、検査対象物ごとに異なるのが普通である
から、撮像装置に規定された座標系において、検査対象
物の画像の位置は検査対象物ごとに異なることになる。
このように、規定の座標系内での検査対象物の画像の位
置が異なっていると、同条件での欠陥検査ができず、欠
陥部分を正確に抽出できないという問題が生じる。
2. Description of the Related Art Conventionally, based on an image taken by an image pickup device such as a TV camera for an inspection object,
A technique for inspecting a defect such as a scratch on the surface of an inspection object is known. By the way, since the relative positional relationship between the inspection object and the imaging device is usually different for each inspection object, the position of the image of the inspection object is the inspection object in the coordinate system defined by the imaging device. It will be different for each item.
As described above, when the positions of the images of the inspection object are different in the prescribed coordinate system, the defect inspection cannot be performed under the same condition, and the defect portion cannot be accurately extracted.

【0003】そこで、検査対象物の画像に座標変換を施
して位置を補正し、どの検査対象物についても同じ条件
で欠陥検査を行なうようにすることが考えられている。
すなわち、位置の補正には次のような処理を行なってい
る。まず、基準となる対象物について撮像装置によって
撮像した画像のうち、位置補正に適すると考えられる特
徴的な部分領域を人の判断によって抽出して基準画像と
する。ここにおいて、特徴的な部分領域というのは、部
分領域内での変化が比較的多い部分領域のことであっ
て、たとえば、検査対象物の角部分を含む部分領域や変
化の多い曲線部分を含むような部分領域になる。次に、
検査対象物について基準画像とのパターンマッチングを
行ない、基準画像との一致度の高い部分領域を求める。
規定の座標系における基準画像の座標位置は既知である
から、検査対象物について基準画像との一致度が高かっ
た部分領域の座標位置を基準画像の座標位置に一致させ
るように座標変換を行なえば、すべての検査対象物の画
像を同じ座標位置で扱うことができるようになるのであ
る。
Therefore, it is considered that the image of the inspection object is subjected to coordinate conversion to correct the position, and the defect inspection is performed on any inspection object under the same condition.
That is, the following processing is performed to correct the position. First, a characteristic partial area that is considered to be suitable for position correction is extracted as a reference image from an image taken by the image pickup device of a reference object. Here, the characteristic partial region is a partial region in which the change in the partial region is relatively large, and includes, for example, a partial region including a corner portion of the inspection object and a curved portion in which the change is large. It becomes a partial area like this. next,
Pattern matching is performed on the inspection object with the reference image, and a partial area having a high degree of coincidence with the reference image is obtained.
Since the coordinate position of the reference image in the prescribed coordinate system is known, if the coordinate conversion is performed so that the coordinate position of the partial area of the inspection object having a high degree of coincidence with the reference image coincides with the coordinate position of the reference image. The images of all inspection objects can be handled at the same coordinate position.

【0004】[0004]

【発明が解決しようとする課題】上述した従来技術で
は、基準画像を抽出するにあたって、人の判断によって
基準画像に適したと考えられる部分領域を選択している
のであって、基準画像の抽出には個人差が生じて再現性
が低くなるという問題があり、また再現性を高めるには
経験的な判断が必要になるという問題がある。
In the above-mentioned prior art, when extracting a reference image, a partial area considered to be suitable for the reference image is selected by a person's judgment. There is a problem that the reproducibility becomes low due to individual difference, and there is a problem that empirical judgment is required to improve the reproducibility.

【0005】本発明は上記問題点の解決を目的とするも
のであり、基準画像を自動的に抽出するようにして、操
作者の経験によらずに検査対象物の画像の位置補正の再
現性を高めた画像処理装置を提供しようとするものであ
る。
The present invention is intended to solve the above-mentioned problems, and the reference image is automatically extracted so that the reproducibility of the position correction of the image of the inspection object is independent of the experience of the operator. The present invention aims to provide an image processing device having improved performance.

【0006】[0006]

【課題を解決するための手段】請求項1の発明は、上記
目的を達成するために、検査対象物を撮像装置により撮
像した画像のうちの特徴的な部分領域であって画像内で
の座標位置が既知である基準画像を設定する基準画像設
定手段と、検査対象物の画像の各部分領域について基準
画像との一致度を求め一致度の高い部分領域を抽出する
照合手段と、検査対象物の画像のうち基準画像との一致
度が高い部分領域を基準として基準画像の画像内での座
標位置に対応するように検査対象物の画像について座標
変換を行なう位置補正手段とを備えた画像処理装置にお
いて、基準画像設定手段は、基準となる対象物を撮像装
置により撮像した画像について一定の大きさの部分領域
ごとに自己相関値を求める基準画像候補抽出部と、自己
相関値が第1の閾値を越える第1の部分領域について第
1の部分領域の近傍に設定した第2の部分領域との相互
相関値を求め、相互相関値が第2の閾値以下であるとき
に第1の部分領域の画像を基準画像とする基準画像検証
部とを具備することを特徴とする。
In order to achieve the above object, the invention of claim 1 is a characteristic partial region of an image obtained by capturing an image of an object to be inspected by an image pickup device, and the coordinates within the image. Reference image setting means for setting a reference image whose position is already known, collating means for obtaining the degree of coincidence with each reference area for each partial area of the image of the inspection object, and extracting the partial area with a high degree of coincidence, inspection object Image processing including position correction means for performing coordinate conversion on the image of the inspection object so as to correspond to the coordinate position in the image of the reference image with reference to a partial area having a high degree of coincidence with the reference image In the apparatus, the reference image setting means includes a reference image candidate extraction unit that obtains an autocorrelation value for each partial area of a certain size in an image obtained by capturing an image of a target object by an image capturing apparatus, and an autocorrelation value is the first. Threshold Cross-correlation value with the second partial area set in the vicinity of the first partial area is obtained for the first partial area exceeding 1.0, and when the cross-correlation value is less than or equal to the second threshold value, And a reference image verification unit that uses an image as a reference image.

【0007】請求項2の発明は、請求項1記載の発明に
おいて、光軸が互いに略平行であってそれぞれ検査対象
物の一部分を撮像領域とする複数台の撮像装置を備え、
少なくとも2台の撮像装置について基準画像設定手段に
より基準画像を各別に設定し、位置補正手段は検査対象
物の画像の位置座標を各基準画像の位置座標に一致させ
るように座標変換することを特徴とする。
According to a second aspect of the present invention, in the first aspect of the present invention, a plurality of image pickup devices are provided, whose optical axes are substantially parallel to each other and each of which has a part of the inspection object as an image pickup region.
The reference image setting means sets the reference images separately for at least two image pickup devices, and the position correction means performs coordinate conversion so that the position coordinates of the image of the inspection object match the position coordinates of the reference images. And

【0008】請求項3の発明は、請求項1または請求項
2記載の発明において、基準となる対象物の画像内で部
分領域を順に走査し、各位置において第1の部分領域の
近傍で第1の部分領域に対して互いに異なる方向に離れ
た複数個の第2の部分領域を設定して、各第2の部分領
域と第1の部分領域との相互相関値を求め、すべての方
向の第2の部分領域について相互相関値が第2の閾値以
下になる第1の部分領域を基準画像とすることを特徴と
する。
According to a third aspect of the invention, in the first or second aspect of the invention, the partial regions are sequentially scanned within the image of the reference object, and at each position, the first partial region is scanned in the vicinity of the first partial region. A plurality of second partial areas are set apart from each other in different directions with respect to one partial area, and a cross-correlation value between each second partial area and the first partial area is obtained, The first partial region whose cross-correlation value is equal to or less than the second threshold value for the second partial region is used as the reference image.

【0009】請求項4の発明は、請求項1または請求項
2の発明において、基準となる対象物の画像内で部分領
域を順に走査し、すべての部分領域について自己相関値
を求めた後に、自己相関値の大きいほうから順に第1の
部分領域の近傍で第1の部分領域に対して互いに異なる
方向に離れた複数個の第2の部分領域を設定して、各第
2の部分領域と第1の部分領域との相互相関値を求め、
すべての方向の第2の部分領域について相互相関値が第
2の閾値以下になる第1の部分領域を基準画像とするこ
とを特徴とする。
According to a fourth aspect of the present invention, in the first or second aspect of the invention, after partial regions are sequentially scanned in the image of the reference object and autocorrelation values are obtained for all the partial regions, A plurality of second partial regions, which are separated from each other in different directions with respect to the first partial region, are set in the vicinity of the first partial region in descending order of the autocorrelation value. Calculate the cross-correlation value with the first partial area,
The first partial region whose cross-correlation values are equal to or less than the second threshold value for the second partial regions in all directions is used as the reference image.

【0010】請求項5の発明は、請求項1または請求項
2の発明において、基準となる対象物の画像内の適宜の
部分領域について画像の複雑度を求め、画像が複雑であ
って複雑度が規定値を越えるときには、基準となる対象
物の画像内で部分領域を順に走査し、各位置において第
1の部分領域の近傍で第1の部分領域に対して互いに異
なる方向に離れた複数個の第2の部分領域を設定して、
各第2の部分領域と第1の部分領域との相互相関値を求
め、すべての方向の第2の部分領域について相互相関値
が第2の閾値以下になる第1の部分領域を基準画像と
し、画像が単純であって複雑度が規定値以下であるとき
には、基準となる対象物の画像内で部分領域を順に走査
し、すべての部分領域について自己相関値を求めた後
に、自己相関値の大きいほうから順に第1の部分領域の
近傍で第1の部分領域に対して互いに異なる方向に離れ
た複数個の第2の部分領域を設定して、各第2の部分領
域と第1の部分領域との相互相関値を求め、すべての方
向の第2の部分領域について相互相関値が第2の閾値以
下になる第1の部分領域を基準画像とすることを特徴と
する。
According to a fifth aspect of the invention, in the first or second aspect of the invention, the complexity of the image is calculated for an appropriate partial area in the image of the reference object, and the complexity of the image is high. Is larger than the specified value, the partial areas are sequentially scanned in the image of the reference object, and at each position, a plurality of areas are separated from each other in different directions in the vicinity of the first partial area. Set the second partial area of
A cross-correlation value between each of the second partial areas and the first partial area is obtained, and the first partial areas whose cross-correlation values are equal to or less than the second threshold value for the second partial areas in all directions are used as the reference image. , When the image is simple and the complexity is less than the specified value, the partial areas are sequentially scanned in the image of the reference object, and the autocorrelation values of all the partial areas are obtained. A plurality of second partial regions that are separated from each other in different directions are set in the vicinity of the first partial region in order from the larger one, and each second partial region and the first partial region are set. The cross-correlation value with the area is obtained, and the first partial area whose cross-correlation values are equal to or less than the second threshold value for the second partial areas in all directions is used as the reference image.

【0011】[0011]

【作用】請求項1の発明の構成によれば、基準の対象物
の画像について一定の大きさの部分領域ごとに自己相関
値を求め、自己相関値の高い第1の部分領域、すなわち
比較的変化が多い部分領域を基準画像の候補として抽出
し、さらに、これらの候補のうちで近傍に設定した第2
の部分領域との相互相関値が小さい部分領域、すなわち
周囲の形状との差が大きい第1の部分領域を基準画像と
するのである。このように、自己相関値によって基準画
像の候補を求め、相互相関値によって候補が基準画像と
して適切か否かを検証するから、基準画像を自動的かつ
再現性よく抽出することができるのである。
According to the configuration of the invention of claim 1, the autocorrelation value is obtained for each partial region of a certain size in the image of the reference object, and the first partial region having a high autocorrelation value, that is, The second partial region, which has many changes, is extracted as a candidate for the reference image, and is set in the neighborhood of these candidates.
The partial area having a small cross-correlation value with the partial area, that is, the first partial area having a large difference from the surrounding shape is used as the reference image. In this way, the reference image candidate is obtained from the autocorrelation value, and whether or not the candidate is appropriate as the reference image is verified based on the cross-correlation value. Therefore, the reference image can be automatically and reproducibly extracted.

【0012】請求項2の発明の構成によれば、複数台の
撮像装置を用いるとともに各撮像装置ごとに基準画像を
設定し、各撮像装置に対応して設定した基準画像を複合
的に用いて検査対象物の画像の位置を補正するので、1
つの検査対象物について複数個の基準画像を総合して位
置補正を行なうことになり、結果的に位置補正の精度を
高めることができる。
According to the second aspect of the invention, a plurality of image pickup devices are used, a reference image is set for each image pickup device, and the reference image set corresponding to each image pickup device is used in combination. Since the position of the image of the inspection object is corrected, 1
A plurality of reference images are integrated for one inspection object to perform the position correction, and as a result, the position correction accuracy can be improved.

【0013】請求項3の発明の構成によれば、基準の対
象物の画像内で第1の部分領域を走査し、第1の部分領
域の各位置ごとに基準画像の候補か否かを判定し、候補
となる第1の部分領域について基準画像として適正か否
かを検証するから、比較的複雑な形状の対象物であれ
ば、適切な基準画像を短時間で決定できるのである。請
求項4の発明の構成によれば、基準の対象物の画像内で
第1の部分領域をすべて走査して自己相関値を求めた後
に、自己相関値の大きい第1の部分領域から順に基準画
像か否かを判定し、候補となる第1の部分領域について
基準画像として適正か否かを検証するから、比較的単純
な形状の対象物の場合に最適な基準画像を決定できるこ
とになる。
According to the third aspect of the invention, the first partial area is scanned within the image of the reference object, and it is determined for each position of the first partial area whether or not the reference image is a candidate. However, since it is verified whether or not the candidate first partial area is appropriate as the reference image, an appropriate reference image can be determined in a short time if the object has a relatively complicated shape. According to the configuration of the invention of claim 4, after all the first partial areas are scanned in the image of the reference object to obtain the autocorrelation value, the reference portions are sequentially arranged in descending order of the autocorrelation value. Since it is determined whether or not it is an image and whether or not the candidate first partial region is appropriate as a reference image, it is possible to determine the optimum reference image in the case of an object having a relatively simple shape.

【0014】請求項5の発明の構成によれば、適宜位置
の部分領域について複雑度を求め、複雑な画像であれば
請求項3の方法によって基準画像を求め、単純な画像で
あれば請求項4の方法によって基準画像を求めるのであ
って、複雑な画像では第1の部分領域を順次走査する過
程で基準画像を求めることによって、比較的よい基準画
像を短時間で設定することができ、また単純な画像では
第1の部分領域を走査する過程では基準画像を見つけに
くいが、全領域について第1の部分領域の自己相関値を
求めた後に自己相関値の大きい順に基準画像として適し
ているか否かを検証するから、最適な基準画像を比較的
短時間で見つけることができる。
According to the configuration of the invention of claim 5, the complexity is obtained for the partial area at an appropriate position, the reference image is obtained by the method of claim 3 in the case of a complicated image, and the reference image is obtained in the case of a simple image. The reference image is obtained by the method of No. 4, and in the case of a complicated image, a relatively good reference image can be set in a short time by obtaining the reference image in the process of sequentially scanning the first partial area. Although it is difficult to find the reference image in the process of scanning the first partial area in a simple image, whether or not the reference image is suitable as the reference image in descending order of the autocorrelation value after obtaining the autocorrelation values of the first partial area for all areas Therefore, the optimum reference image can be found in a relatively short time.

【0015】[0015]

【実施例】【Example】

(実施例1)本実施例は、基準画像を抽出する技術を要
旨とするものであって、抽出された基準画像を用いて検
査対象物について位置補正を行なう技術については、従
来の技術で説明した通りであるから、以下の説明では主
として要旨となる部分について説明する。
(Embodiment 1) This embodiment is based on a technique for extracting a reference image, and a technique for correcting the position of an inspection object using the extracted reference image will be described in the related art. As described above, the following description will be made mainly on the main part.

【0016】図1(a)に示すように、基準となる対象
物1は撮像装置としてのCCD等を用いたTVカメラ2
により撮像される。TVカメラ2より出力される画像信
号はアナログ−ディジタル変換器3によりディジタル信
号に変換された後、画像メモリ4に格納される。ここに
おいて、TVカメラ2により得る画像は一般には白黒の
濃淡画像であるが、検査対象物と基準画像とについて色
情報も用いて一致度を判定するような場合には、カラー
画像を用いるようにしてもよい。
As shown in FIG. 1A, a reference object 1 is a TV camera 2 using a CCD or the like as an image pickup device.
Is imaged by. The image signal output from the TV camera 2 is converted into a digital signal by the analog-digital converter 3 and then stored in the image memory 4. Here, the image obtained by the TV camera 2 is generally a grayscale image in black and white, but in the case of determining the degree of coincidence between the inspection object and the reference image by using the color information as well, a color image is used. May be.

【0017】画像メモリ4に画像が格納されると、基準
画像候補抽出部5は次のような手順の処理を行なう。ま
ず、画像メモリ4に格納された画像に対して、図1
(b)に示すように、一定の大きさの部分領域D0 をラ
スタ走査し、各部分領域D0 ごとに自己相関値を求め
る。図1(b)において矢印は部分領域D0 の走査方向
を示している。ここにおいて、ラスタ走査の際の部分領
域D0 の1回の移動量は、1画素もしくは規定の複数画
素の間隔になる。また、全領域を等分割した部分領域D
0 を形成し、各部分領域D0 を順に走査するようにして
もよい。基準画像候補抽出部5では自己相関値について
閾値が設定されており、自己相関値が閾値を越えるとき
には、その部分領域D0 の中での変化が大きく特徴的な
部分領域D1 (第1の部分領域)であって基準画像の候
補になると判断する。
When the image is stored in the image memory 4, the reference image candidate extracting section 5 performs the following procedure. First, with respect to the image stored in the image memory 4, FIG.
As shown in (b), the partial area D 0 having a fixed size is raster-scanned to obtain the autocorrelation value for each partial area D 0 . In FIG. 1B, the arrow indicates the scanning direction of the partial area D 0 . Here, the amount of movement of the partial area D 0 at the time of raster scanning is one pixel or a prescribed interval of a plurality of pixels. Also, a partial area D obtained by equally dividing the entire area
0 may be formed and each partial area D 0 may be sequentially scanned. A threshold value is set for the autocorrelation value in the reference image candidate extraction unit 5, and when the autocorrelation value exceeds the threshold value, the change in the partial region D 0 is large and a characteristic partial region D 1 (first It is determined to be a partial image) and a candidate for the reference image.

【0018】上述のようにして基準画像の候補となる部
分領域D1 が見つかると、基準画像検証部6では、部分
領域D1 について上下、左右、斜めの8方向について部
分領域D1 を規定の画素数分だけ偏移させた部分領域D
2 (第2の部分領域)を設定する。基準画像検証部6で
は、両部分領域D1 ,D2 について相互相関値を求め
る。ここで、両部分領域D1 ,D2 の類似度(すなわ
ち、相互相関値)が小さいほど基準画像として適してい
ることになるから、各方向に設定したすべての部分領域
2 について相互相関値が規定の閾値以下であるときに
は、部分領域D1 を基準画像として用いてよいことが検
証されるのである。ここにおいて、部分領域D2 のうち
の1つでも相互相関値が規定の閾値を越えている場合に
は、基準画像としては不適と判断し、基準画像候補抽出
部5によって求めた次の候補について同様の処理を行な
う。このようにして、基準画像の候補を求めた後に検証
を行なって基準画像となる部分領域D1 を確定すると、
基準画像となる部分領域D1 をその部分領域D1 の代表
点の座標位置とともに基準画像メモリ7に格納し、検査
対象物との照合に用いるのである。すなわち、基準画像
候補抽出部5と基準画像検証部6と基準画像メモリ7と
によって、基準画像設定手段が構成されるのであって、
上述した手順により人手によらず基準画像を自動的に決
定することができるのである。しかも、基準画像の決定
には一定法則を適用しているから、基準画像の再現性が
高いのである。
When the partial area D 1 which is a candidate for the reference image is found as described above, the reference image verification unit 6 defines the partial area D 1 in the vertical, horizontal, and diagonal directions of the partial area D 1 . Partial area D shifted by the number of pixels
Set 2 (second partial area). The reference image verification unit 6 obtains a cross-correlation value for both partial areas D 1 and D 2 . Here, the smaller the degree of similarity (that is, the cross-correlation value) between the two partial areas D 1 and D 2 is, the more suitable it is as the reference image. Therefore, the cross-correlation values for all the partial areas D 2 set in each direction are set. When is less than or equal to the specified threshold value, it is verified that the partial area D 1 may be used as the reference image. Here, if the cross-correlation value of even one of the partial regions D 2 exceeds the specified threshold value, it is determined that the reference image is unsuitable, and the next candidate obtained by the reference image candidate extraction unit 5 is determined. Perform similar processing. In this way, when the candidate of the reference image is obtained and the verification is performed to determine the partial area D 1 to be the reference image,
The partial area D 1 to be the reference image is stored in the reference image memory 7 together with the coordinate position of the representative point of the partial area D 1 , and is used for collation with the inspection object. That is, the reference image candidate extraction unit 5, the reference image verification unit 6, and the reference image memory 7 constitute a reference image setting unit,
By the procedure described above, the reference image can be automatically determined without manual labor. Moreover, since the fixed law is applied to the determination of the reference image, the reproducibility of the reference image is high.

【0019】ところで、上述のような処理によって全領
域について部分領域D0 を走査しても基準画像を確定で
きない場合がある。その場合には、基準画像候補抽出部
5もしくは基準画像検証部6において、基準画像となる
部分領域D1 が存在しない旨の報知信号を出力する。こ
の報知信号によって、適切な基準画像が得られなかった
ことを知らせることができるのである。
By the way, there are cases where the reference image cannot be determined even if the partial area D 0 is scanned over the entire area by the above-described processing. In that case, the reference image candidate extraction unit 5 or the reference image verification unit 6 outputs a notification signal indicating that the partial area D 1 serving as the reference image does not exist. This notification signal can notify that an appropriate reference image has not been obtained.

【0020】上述した、アナログ−ディジタル変換器
3、画像メモリ4、基準画像候補抽出部5、基準画像検
証部6、基準画像メモリ7は、図2に示すように、コン
ピュータ装置よりなる画像処理装置10を構成する。画
像処理装置10には、撮像装置となるTVカメラ2が接
続され、またマウスのようなポインティングデバイスや
キーボードなどの入力装置11、および画像を表示する
CRTのようなモニタ装置12が接続される。さらに、
画像処理装置10には、上述のような手順によって決定
され基準画像メモリ7に格納された基準画像と検査対象
物についてTVカメラ2で撮像した画像とを比較して一
致度を求める照合手段と、照合手段によって基準画像と
の一致度の高い部分領域が求められると基準画像の座標
位置とその部分領域の座標位置との差に基づいて座標変
換を行なう位置補正手段とが設けられている。照合手段
では、基準画像の候補を求めるときと同様に、一定の大
きさの部分領域をラスタ走査して周知のパターンマッチ
ング法を用いて基準画像との一致度を求め、一致度を数
値化して閾値と比較し、一致度が高ければ基準画像に対
応する部分領域と判断するのである。ここで、検査対象
物の画像について基準画像とは平行移動しか生じないこ
とが確定している場合には、基準画像を代表する1点と
検査対象物から抽出した部分画像の対応する1点との座
標位置の差によって座標系を平行移動させればよく、ま
た、回転移動を含む場合には2点以上の座標位置の差に
よって座標変換を行なえばよい。
As described above, the analog-digital converter 3, the image memory 4, the reference image candidate extraction unit 5, the reference image verification unit 6, and the reference image memory 7, which are described above, are the image processing apparatus which is a computer apparatus. Make up 10. The image processing apparatus 10 is connected to the TV camera 2 serving as an image capturing apparatus, and is also connected to a pointing device such as a mouse, an input device 11 such as a keyboard, and a monitor device 12 such as a CRT for displaying an image. further,
The image processing apparatus 10 includes a collating unit that compares the reference image determined by the procedure described above and stored in the reference image memory 7 with the image captured by the TV camera 2 of the inspection object to obtain the degree of coincidence. Position correction means is provided for performing coordinate conversion based on the difference between the coordinate position of the reference image and the coordinate position of the partial area when the matching means obtains a partial area having a high degree of coincidence with the reference image. In the matching means, similarly to the case of obtaining the candidate of the reference image, the degree of agreement with the reference image is obtained by raster-scanning the partial area of a certain size and using the well-known pattern matching method, and the degree of agreement is digitized. It is compared with a threshold value, and if the degree of coincidence is high, it is determined that the partial area corresponds to the reference image. Here, when it is determined that the image of the inspection object only moves in parallel with the reference image, one point representing the reference image and one corresponding point of the partial image extracted from the inspection object The coordinate system may be moved in parallel according to the difference in the coordinate positions of the above, and in the case of including the rotational movement, the coordinate conversion may be performed according to the difference between the coordinate positions of two or more points.

【0021】(実施例2)実施例1では1台のTVカメ
ラ2を用いていたが、本実施例では、図3に示すよう
に、TVカメラ2a〜2dを4台用いた例を示す。各T
Vカメラ2a〜2dは光軸が互いに平行かつ一定の間隔
で離れるように1つの保持部材13に取り付けられてい
る。また、対象物からの各TVカメラ2a〜2dの距離
は等しくなるように設定してあり、各TVカメラ2a〜
2dでは1つの対象物の互いに異なる部分を撮像するよ
うになっている。各TVカメラ2a〜2dについて、実
施例1のTVカメラ2と同様の手順で各TVカメラ2a
〜2dごとに基準画像が求められる。
(Embodiment 2) In Embodiment 1, one TV camera 2 was used, but in this embodiment, as shown in FIG. 3, four TV cameras 2a to 2d are used. Each T
The V cameras 2a to 2d are attached to one holding member 13 such that their optical axes are parallel to each other and are spaced apart at a constant interval. Further, the TV cameras 2a to 2d are set to be equal in distance from the object, and the TV cameras 2a to 2d are set to be equal to each other.
In 2d, different parts of one object are imaged. For each TV camera 2a to 2d, each TV camera 2a is processed in the same procedure as the TV camera 2 of the first embodiment.
A reference image is obtained every ~ 2d.

【0022】いま、各TVカメラ2a〜2dに対応した
画像Ia〜Idが、図4に示すようになっているものと
する。すなわち、TVカメラ2a,2dに対応する画像
Ia,Idには特徴的な基準画像が存在せず、TVカメ
ラ2b,2cに対応する画像Ib,Icにはそれぞれ横
方向の変化が大きい部分領域D11および縦方向の変化が
大きい部分領域D12が求められるものとする。このよう
な場合には、横方向の位置補正をTVカメラ2bの画像
Ibに基づいて行ない、縦方向の位置補正をTVカメラ
2cの画像Icに基づいて行なうようにするのである。
ここで、1つの画像Ib,Icについて位置補正を行な
えば、他の画像Ia〜Idについても同様に位置補正を
行なう。また、縦横両方向について変化が大きいような
部分領域を検出した場合には、その画像での座標変換を
他の画像にも適用して位置補正を行なうようにする。ま
た、基準画像を求める際には、基準画像の候補について
検証条件を満たすものが見つかればその時点の部分領域
を基準画像とするか、各TVカメラ2a〜2dの撮像領
域の中でもっとも特徴的な部分領域を基準画像とするか
は適宜選択される。他の構成は実施例1と同様である。
Now, it is assumed that the images Ia to Id corresponding to the TV cameras 2a to 2d are as shown in FIG. That is, the images Ia and Id corresponding to the TV cameras 2a and 2d do not have a characteristic reference image, and the images Ib and Ic corresponding to the TV cameras 2b and 2c have partial regions D that greatly change in the lateral direction. 11 and a partial area D 12 having a large change in the vertical direction are required. In such a case, the horizontal position correction is performed based on the image Ib of the TV camera 2b, and the vertical position correction is performed based on the image Ic of the TV camera 2c.
Here, if position correction is performed on one image Ib, Ic, position correction is also performed on the other images Ia to Id. Further, when a partial area having a large change in both vertical and horizontal directions is detected, the coordinate conversion in that image is applied to another image to correct the position. Further, when obtaining the reference image, if a candidate of the reference image that meets the verification condition is found, the partial area at that time is set as the reference image, or the most characteristic among the image pickup areas of the TV cameras 2a to 2d. Whether or not the partial area is used as the reference image is appropriately selected. Other configurations are similar to those of the first embodiment.

【0023】(実施利3)本実施例では、図5に示すよ
うな手順で基準画像を求める例を示す。すなわち、実施
例2の構成について、TVカメラ2a〜2dの撮像領域
にX−Y平面を形成する直交座標系を設定し、相互相関
値を求めるための部分領域D2 は、部分領域D1 に対し
てX軸方向およびY軸方向の正負両側と、X軸に対して
45度および135度で交差する2本の直線上の正負両
側との合計8方向についてずらして設定される。この場
合、X軸方向について変化が少なくY軸方向には変化が
大きいような部分領域D1 では、X軸方向にずらした部
分領域D2 との相互相関値は大きく、Y軸方向にずらし
た部分領域D2 との相互相関値は小さくなる。したがっ
て、各部分領域D1 に対応して設定したすべての部分領
域D2 について相互相関値が大きくなるような部分領域
1 を基準画像として選択することができれば、X軸方
向とY軸方向との位置補正を一度でできることになり、
このような基準画像を選択するのが望ましいことにな
る。
(Embodiment 3) In this embodiment, an example in which the reference image is obtained by the procedure as shown in FIG. That is, the configuration of the second embodiment sets an orthogonal coordinate system which forms the the X-Y plane in the imaging area of the TV camera 2 a to 2 d, subregion D 2 for obtaining the cross-correlation value, the partial region D 1 On the other hand, the positive and negative sides in the X-axis direction and the Y-axis direction and the positive and negative sides on two straight lines intersecting with the X-axis at 45 degrees and 135 degrees are shifted in total for eight directions. In this case, in the partial area D 1 in which the change in the X-axis direction is small and the change in the Y-axis direction is large, the cross-correlation value with the partial area D 2 shifted in the X-axis direction is large, and is shifted in the Y-axis direction. The cross-correlation value with the partial area D 2 becomes small. Therefore, if a partial area D 1 having a large cross-correlation value can be selected as a reference image for all partial areas D 2 set corresponding to each partial area D 1 , the X-axis direction and the Y-axis direction can be selected. You will be able to correct the position of
It would be desirable to select such a reference image.

【0024】いま、部分領域D0 は64個で全領域を埋
めることができるように設定してあるものとして、図5
の手順を説明する。まず、第1のTVカメラ2aによっ
て撮像した画像を基準画像設定手段に転送する(S
1)。この画像について部分領域D0 ごとに自己相関値
を求め(S3)、第1の閾値を越えている部分領域D1
であれば(S4)、上述のように部分領域D1 の近傍に
設定した部分領域D2 とのパターンマッチングを行なう
(S5)。このパターンマッチングは相互相関値を用い
て評価し、相互相関値がX軸方向とY軸方向とについて
ともに第2の閾値以下であれば(S6)、2方向につい
ての位置補正用の基準画像として採用する(S7)。ま
た、ステップS6での条件が満たされなくてもX軸方向
とY軸方向とのいずれか一方について第2の閾値以下で
あれば(S8)、そのデータを保留しておく(S9)。
自己相関値が第1の閾値を越えない場合(S4)、相互
相関値がどの方向についても第2の閾値以下にならない
場合(S8)、データを保留した後(S9)のいずれの
場合についても、次の部分領域D1 について上記処理を
行なう。
Assuming that 64 partial areas D 0 are set so that the entire area can be filled, as shown in FIG.
The procedure will be described. First, the image captured by the first TV camera 2a is transferred to the reference image setting means (S).
1). An autocorrelation value is obtained for each partial region D 0 of this image (S3), and the partial region D 1 that exceeds the first threshold value is determined.
If so (S4), pattern matching is performed with the partial area D 2 set near the partial area D 1 as described above (S5). This pattern matching is evaluated using the cross-correlation value, and if the cross-correlation value is less than or equal to the second threshold value in both the X-axis direction and the Y-axis direction (S6), it is used as a reference image for position correction in two directions. Adopt (S7). Further, even if the condition in step S6 is not satisfied, if either or both of the X-axis direction and the Y-axis direction is equal to or less than the second threshold value (S8), the data is reserved (S9).
In either case where the autocorrelation value does not exceed the first threshold value (S4), the cross-correlation value does not fall below the second threshold value in any direction (S8), or after the data is reserved (S9). , The above processing is performed for the next partial area D 1 .

【0025】部分領域D1 は64個設定されているか
ら、上記処理を64回行なうまでに(S2)、適切な基
準画像が決定されていない場合には、1方向について相
互相関値が第2の閾値以下になったデータが保留されて
いるか否かを判定し(S10)、保留されていればその
方向についての補正を行ない(S11)、保留されてい
なければ補正を行なわずに(S12)第1のTVカメラ
2aについての処理を終了する。ここにおいて、2方向
に補正できる場合は3、X軸方向のみの補正では2、Y
軸方向の補正のみでは1、補正なしでは0などのコード
を与えるようにしてもよい。
Since 64 partial areas D 1 are set, by the time the above-mentioned processing is performed 64 times (S2), if the appropriate reference image has not been determined, the cross-correlation value becomes the second cross-correlation value in one direction. It is determined whether or not the data that has become equal to or less than the threshold value is reserved (S10), and if the data is reserved, the correction in that direction is performed (S11). If the data is not reserved, the correction is not performed (S12). The process for the first TV camera 2a ends. Here, if the correction can be made in two directions, it is 3, and if the correction is made only in the X-axis direction, it is Y.
It is also possible to give a code such as 1 with only axial correction and 0 without correction.

【0026】第1のTVカメラ2aについて基準画像が
見つかった場合には、他のTVカメラ2b〜2dについ
ては第1のTVカメラ2aの基準画像による位置補正を
適用できるから、他のTVカメラ2b〜2dで得た画像
については位置の補正量のみを指示する。また、基準画
像が見つからずに処理が終了したときには、第2のTV
カメラ2b以降の各TVカメラ2b〜2dについて同様
の処理を行なうのである。
When the reference image is found for the first TV camera 2a, the position correction based on the reference image of the first TV camera 2a can be applied to the other TV cameras 2b to 2d. For the images obtained in ~ 2d, only the position correction amount is designated. When the reference image is not found and the processing is completed, the second TV
The same processing is performed for each of the TV cameras 2b to 2d after the camera 2b.

【0027】以上のような処理によって、対象物の画像
について部分領域D0 を順に走査して自己相関値が第1
の閾値を越えるか否かを判定し、第1の閾値を越える部
分領域D1 については、部分領域D2 を設定して基準画
像となるか否かを検証するのである。したがって、部分
領域D0 を走査する過程で、1つでも基準画像となる部
分領域D1 が見つかれば基準画像として採用するのであ
って、このようにして求めた基準画像は最適な基準画像
ではないかも知れないが、短時間で見つけることができ
ることになる。他の構成は実施例2と同様である。本実
施例では実施例2のように複数台のTVカメラ2a〜2
dを用いた例を示したが、実施例1のように1台のTV
カメラ2であっても本実施例の技術思想を適用すること
が可能である。また、パターンマッチングの方法とし
て、相互相関値を用いた例を示したが、マッチングの程
度を数値化できればどのような値を用いてもよい。
By the above processing, the partial area D 0 is sequentially scanned for the image of the object and the autocorrelation value becomes the first value.
For the partial area D 1 that exceeds the first threshold value, the partial area D 2 is set and it is verified whether or not it becomes a reference image. Therefore, in the process of scanning the partial area D 0 , if at least one partial area D 1 to be the reference image is found, it is adopted as the reference image, and the reference image thus obtained is not the optimum reference image. Maybe you can find it in a short time. Other configurations are similar to those of the second embodiment. In this embodiment, as in the second embodiment, a plurality of TV cameras 2a to 2a are used.
Although an example using d is shown, one TV as in the first embodiment.
The technical idea of this embodiment can be applied to the camera 2 as well. Further, as the pattern matching method, the example using the cross-correlation value is shown, but any value may be used as long as the degree of matching can be digitized.

【0028】(実施例4)本実施例の基本的な手順は図
6に示すように実施例3と同様であって、自己相関値の
大きい部分領域D1 について、X軸方向とY軸方向とに
ついてずらした部分領域D2 を設定して相互相関値を求
め、相互相関値がX軸方向とY軸方向とについてともに
小さい場合に、その部分領域D1 を基準画像として採用
するものである。
(Embodiment 4) The basic procedure of this embodiment is the same as that of Embodiment 3 as shown in FIG. 6, and the partial area D 1 having a large autocorrelation value is in the X-axis direction and the Y-axis direction. The partial area D 2 shifted with respect to is set to obtain the cross-correlation value, and when the cross-correlation value is small in both the X-axis direction and the Y-axis direction, the partial area D 1 is adopted as the reference image. .

【0029】ただし、本実施例では自己相関値を画像内
のすべての部分領域D0 について求めた後に相互相関値
を求めるようにしている点が実施例3とは相違する。す
なわち、画像メモリ4からの画像を基準画像設定手段が
取り込むと(S1)、各部分領域D0 について自己相関
値を求め(S3)、第1の閾値と比較する(S4)点は
実施例1と同様である。その後、自己相関値が第1の閾
値を越えていれば、その部分領域D1 に関する自己相関
値および座標位置を保存する(S5)。この処理をすべ
ての部分領域D1 について繰り返すのである。
However, this embodiment is different from the third embodiment in that the autocorrelation value is calculated for all the partial areas D 0 in the image and then the cross-correlation value is calculated. That is, when the reference image setting means takes in the image from the image memory 4 (S1), the autocorrelation value is obtained for each partial area D 0 (S3) and compared with the first threshold value (S4). Is the same as. Then, if the autocorrelation value exceeds the first threshold value, the autocorrelation value and the coordinate position for the partial area D 1 are stored (S5). This process is repeated for all the partial areas D 1 .

【0030】すべての部分領域D0 について自己相関値
および座標位置が求められると、自己相関値の大きい順
にソーティングを行なう(S6)。次に、自己相関値が
第1の閾値を越える部分領域D1 について自己相関値の
大きいほうから順に、複数方向に部分領域D2 を設定し
て相互相関値を求め(S7)、各方向について相互相関
値が第2の閾値よりも小さいか否かを判定する(S
8)。X軸方向およびY軸方向についてともに相互相関
値が第2の閾値よりも小さい場合には(S9)、この部
分領域D1 を基準画像として採用する(S10)。
When the autocorrelation value and the coordinate position are obtained for all the partial areas D 0 , sorting is performed in the descending order of the autocorrelation value (S6). Next, for the partial area D 1 whose autocorrelation value exceeds the first threshold value, the partial areas D 2 are set in a plurality of directions in order from the larger autocorrelation value to obtain the cross-correlation value (S7). It is determined whether the cross-correlation value is smaller than the second threshold value (S
8). When the cross-correlation values in both the X-axis direction and the Y-axis direction are smaller than the second threshold value (S9), this partial area D 1 is adopted as the reference image (S10).

【0031】一方、自己相関値の上位10個について相
互相関値を求めても基準画像が決定できない場合には
(S11)、残ったデータを確定し(S12)、X軸方
向とY軸方向とのいずれか一方について相互相関値が第
2の閾値以下になるか否かを判定する(S13)。相互
相関値が第2の閾値以下になれば、1方向について位置
補正が可能である基準画像として採用し(S14)、す
べての相互相関値が第2の閾値を越えていれば基準画像
が得られないものとして報知する(S15)。その後、
他のTVカメラ2b〜2cについて同様の処理を行なう
のである。他の構成は実施例3と同様である。
On the other hand, if the reference image cannot be determined even if the cross-correlation values of the top 10 auto-correlation values are determined (S11), the remaining data is determined (S12), and the X-axis direction and the Y-axis direction are determined. It is determined whether or not the cross-correlation value becomes equal to or less than the second threshold value for either of the above (S13). If the cross-correlation value is less than or equal to the second threshold, it is adopted as a reference image in which position correction is possible in one direction (S14), and if all cross-correlation values exceed the second threshold, the reference image is obtained. Notify that it is not possible (S15). afterwards,
The same processing is performed for the other TV cameras 2b to 2c. Other configurations are similar to those of the third embodiment.

【0032】(実施例5)実施例3で示した手順は、順
に走査される部分領域D0 について自己相関値が第1の
閾値を越えかつ相互相関値が第2の閾値以下になるもの
として最初に見つけた部分領域D1 を基準画像としてい
るから、画像が比較的複雑な形状であるときには比較的
短い時間で基準画像を決定することができる。しかしな
がら、画像が比較的単純な形状であれば、実施例4のよ
うに、すべての部分領域D0 について自己相関値を求め
た後に、自己相関値の大きい順に相互相関値を調べるほ
うが最適な基準画像を確実に見つけることができること
になる。
(Fifth Embodiment) In the procedure shown in the third embodiment, it is assumed that the autocorrelation value exceeds the first threshold value and the cross-correlation value becomes the second threshold value or less for the partial areas D 0 which are sequentially scanned. Since the first found partial region D 1 is used as the reference image, the reference image can be determined in a relatively short time when the image has a relatively complicated shape. However, if the image has a relatively simple shape, it is the best criterion to determine the autocorrelation values for all partial regions D 0 and then examine the cross-correlation values in descending order of autocorrelation values, as in the fourth embodiment. You will be able to reliably find the image.

【0033】そこで、本実施例では画像の複雑度を評価
し、複雑度が規定値を越えるときには、実施例3と同様
にして部分領域D0 の走査順で基準画像を決定し、複雑
度が既定値以下であれば、実施例4のようにすべての部
分領域D0 について自己相関値を求めた後に、自己相関
値の大きい順に相互相関値の条件を満たしているか否か
を評価するのである。ここにおいて、画像の複雑度につ
いては、たとえば画像の任意の2つの部分領域D0 を比
較し、両部分領域D0 の相違の程度が大きいほど複雑度
が大きいなどとして判定すればよい。相違の程度につい
ては通常のパターンマッチングの手法を適用することが
できる。
Therefore, in this embodiment, the complexity of the image is evaluated, and when the complexity exceeds the specified value, the reference image is determined in the scanning order of the partial area D 0 in the same manner as in the third embodiment, and the complexity is determined. If it is equal to or less than the predetermined value, autocorrelation values are obtained for all the partial areas D 0 as in the fourth embodiment, and then it is evaluated whether or not the condition of the crosscorrelation value is satisfied in descending order of autocorrelation value. . Here, the complexity of the image may be determined, for example, by comparing two arbitrary partial areas D 0 of the image and the greater the degree of difference between the partial areas D 0 , the higher the complexity. For the degree of difference, a normal pattern matching method can be applied.

【0034】[0034]

【発明の効果】請求項1の発明は、基準の対象物の画像
について一定の大きさの部分領域ごとに自己相関値を求
め、自己相関値の高い第1の部分領域、すなわち比較的
変化が多い部分領域を基準画像の候補として抽出し、さ
らに、これらの候補のうちで近傍に設定した第2の部分
領域との相互相関値が小さい部分領域、すなわち周囲の
形状との差が大きい第1の部分領域を基準画像とするの
であって、自己相関値によって基準画像の候補を求め、
相互相関値によって候補が基準画像として適切か否かを
検証するから、基準画像を自動的かつ再現性よく抽出す
ることができるという利点がある。
According to the first aspect of the present invention, the autocorrelation value is obtained for each partial area of a certain size in the image of the reference object. A large number of partial regions are extracted as reference image candidates, and further, of these candidates, a partial region having a small cross-correlation value with a second partial region set in the vicinity, that is, a first region having a large difference from the surrounding shape is detected. The partial area of is used as the reference image, and the candidate of the reference image is obtained by the autocorrelation value,
Since it is verified whether or not the candidate is suitable as the reference image by the cross-correlation value, there is an advantage that the reference image can be extracted automatically and with good reproducibility.

【0035】請求項2の発明は、複数台の撮像装置を用
いるとともに各撮像装置ごとに基準画像を設定し、各撮
像装置に対応して設定した基準画像を複合的に用いて検
査対象物の画像の位置を補正するので、1つの検査対象
物について複数個の基準画像を総合して位置補正を行な
うことになり、結果的に位置補正の精度を高めることが
できるという効果を奏する。
According to a second aspect of the present invention, a plurality of image pickup devices are used, a reference image is set for each image pickup device, and the reference image set corresponding to each image pickup device is used in combination to inspect the inspection object. Since the position of the image is corrected, a plurality of reference images are integrated for one inspection object to perform the position correction, and as a result, the accuracy of the position correction can be improved.

【0036】請求項3の発明は、基準の対象物の画像内
で第1の部分領域を走査し、第1の部分領域の各位置ご
とに基準画像の候補か否かを判定し、候補となる第1の
部分領域について基準画像として適正か否かを検証する
から、比較的複雑な形状の対象物であれば、適切な基準
画像を短時間で決定できるという利点がある。請求項4
の発明は、基準の対象物の画像内で第1の部分領域をす
べて走査して自己相関値を求めた後に、自己相関値の大
きい第1の部分領域から順に基準画像か否かを判定し、
候補となる第1の部分領域について基準画像として適正
か否かを検証するから、比較的単純な形状の対象物の場
合に最適な基準画像を決定できるという効果がある。
According to the third aspect of the present invention, the first partial area is scanned within the image of the reference object, and it is determined for each position of the first partial area whether or not it is a candidate for the reference image. Since it is verified whether or not the first partial area is appropriate as a reference image, there is an advantage that an appropriate reference image can be determined in a short time for an object having a relatively complicated shape. Claim 4
According to the invention, after scanning all the first partial areas in the image of the reference object to obtain the autocorrelation value, it is determined whether or not the first partial area having the larger autocorrelation value is the reference image in order. ,
Since it is verified whether or not the candidate first partial area is appropriate as the reference image, there is an effect that the optimum reference image can be determined in the case of an object having a relatively simple shape.

【0037】請求項5の発明は、適宜位置の部分領域に
ついて複雑度を求め、複雑な画像であれば請求項3の方
法によって基準画像を求め、単純な画像であれば請求項
4の方法によって基準画像を求めるのであって、複雑な
画像では第1の部分領域を順次走査する過程で基準画像
を求めることによって、比較的よい基準画像を短時間で
設定することができるという利点があり、また単純な画
像では第1の部分領域を走査する過程では基準画像を見
つけにくいが、全領域について第1の部分領域の自己相
関値を求めた後に自己相関値の大きい順に基準画像とし
て適しているか否かを検証するから、最適な基準画像を
比較的短時間で見つけることができるという利点を有す
る。すなわち、対象物の複雑度に適した手順で基準画像
を決定することができるのである。
According to a fifth aspect of the present invention, the degree of complexity is obtained for a partial region at an appropriate position, the reference image is obtained by the method of the third aspect in the case of a complicated image, and the method of the fourth aspect is obtained in the case of a simple image. Since the reference image is obtained, there is an advantage that a relatively good reference image can be set in a short time by obtaining the reference image in the process of sequentially scanning the first partial region in a complicated image. Although it is difficult to find the reference image in the process of scanning the first partial area in a simple image, whether or not the reference image is suitable as the reference image in descending order of the autocorrelation value after obtaining the autocorrelation values of the first partial area for all areas This has the advantage that the optimum reference image can be found in a relatively short time. That is, the reference image can be determined by a procedure suitable for the complexity of the object.

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

【図1】実施例1を示し、(a)はブロック図、(b)
は動作説明図である。
1A and 1B show a first embodiment, FIG. 1A is a block diagram, and FIG.
Is an operation explanatory diagram.

【図2】実施例1に用いる装置の概略構成図である。2 is a schematic configuration diagram of an apparatus used in Example 1. FIG.

【図3】実施例2に用いる装置の概略構成図である。FIG. 3 is a schematic configuration diagram of an apparatus used in Example 2.

【図4】実施例2の動作説明図である。FIG. 4 is an operation explanatory diagram of the second embodiment.

【図5】実施例3の動作説明図である。FIG. 5 is an operation explanatory diagram of the third embodiment.

【図6】実施例4の動作説明図である。FIG. 6 is an operation explanatory diagram of the fourth embodiment.

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

1 対象物 2 TVカメラ 3 アナログ−ディジタル変換器 4 画像メモリ 5 基準画像候補抽出部 6 基準画像検証部 7 基準画像メモリ D0 部分領域 D1 部分領域 D2 部分領域1 Object 2 TV Camera 3 Analog-Digital Converter 4 Image Memory 5 Reference Image Candidate Extraction Section 6 Reference Image Verification Section 7 Reference Image Memory D 0 Partial Area D 1 Partial Area D 2 Partial Area

【手続補正書】[Procedure amendment]

【提出日】平成6年6月6日[Submission date] June 6, 1994

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0005[Name of item to be corrected] 0005

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0005】本発明は上記問題点の解決を目的とするも
のであり、基準画像を自動的に抽出するようにして人に
よる基準画像の設定作用を不要とし、基準画像を自動的
に登録することができる画像処理装置を提供しようとす
るものである。
The present invention is intended to solve the above-mentioned problems, and a person can be made to automatically extract a reference image.
The reference image is set automatically and the reference image is automatically set.
It is intended to provide an image processing device that can be registered in .

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0034[Correction target item name] 0034

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0034】[0034]

【発明の効果】請求項1の発明は、基準の対象物の画像
について一定の大きさの部分領域ごとに自己相関値を求
め、自己相関値の高い第1の部分領域、すなわち比較的
変化が多い部分領域を基準画像の候補として抽出し、さ
らに、これらの候補のうちで近傍に設定した第2の部分
領域との相互相関値が小さい部分領域、すなわち周囲の
形状との差が大きい第1の部分領域を基準画像とするの
であって、自己相関値によって基準画像の候補を求め、
相互相関値によって候補が基準画像として適切か否かを
検証するから、人による基準画像の設定作用が不要にな
って基準画像を自動的かつ再現性よく抽出することがで
、基準画像を自動的に登録することができるという利
点がある。
According to the first aspect of the present invention, the autocorrelation value is obtained for each partial area of a certain size in the image of the reference object. A large number of partial regions are extracted as reference image candidates, and further, of these candidates, a partial region having a small cross-correlation value with a second partial region set in the vicinity, that is, a first region having a large difference from the surrounding shape is detected. The partial area of is used as the reference image, and the candidate of the reference image is obtained by the autocorrelation value,
Since the cross-correlation value is used to verify whether or not the candidate is appropriate as the reference image, it is not necessary for humans to set the reference image.
Reference image I can be extracted well automatically and reproducibly, there is an advantage that the reference image can be automatically registered.

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H04N 7/18 B 9061−5L G06F 15/70 455 A ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical indication H04N 7/18 B 9061-5L G06F 15/70 455 A

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 検査対象物を撮像装置により撮像した画
像のうちの特徴的な部分領域であって画像内での座標位
置が既知である基準画像を設定する基準画像設定手段
と、検査対象物の画像の各部分領域について基準画像と
の一致度を求め一致度の高い部分領域を抽出する照合手
段と、検査対象物の画像のうち基準画像との一致度が高
い部分領域を基準として基準画像の画像内での座標位置
に対応するように検査対象物の画像について座標変換を
行なう位置補正手段とを備えた画像処理装置において、
基準画像設定手段は、基準となる対象物を撮像装置によ
り撮像した画像について一定の大きさの部分領域ごとに
自己相関値を求める基準画像候補抽出部と、自己相関値
が第1の閾値を越える第1の部分領域について第1の部
分領域の近傍に設定した第2の部分領域との相互相関値
を求め、相互相関値が第2の閾値以下であるときに第1
の部分領域の画像を基準画像とする基準画像検証部とを
具備することを特徴とする画像処理装置。
1. A reference image setting means for setting a reference image, which is a characteristic partial region of an image obtained by capturing an image of an inspection object with an image pickup device and whose coordinate position in the image is known, and an inspection object. Matching means for obtaining the degree of matching with the reference image for each partial area of the image, and a reference image based on the partial area of the image of the inspection object having a high degree of matching with the reference image In the image processing device, which includes a position correction unit that performs coordinate conversion on the image of the inspection object so as to correspond to the coordinate position in the image of
The reference image setting means includes a reference image candidate extraction unit that obtains an autocorrelation value for each partial area of a certain size in an image obtained by capturing an image of a reference object by an image pickup device, and the autocorrelation value exceeds a first threshold value. The cross-correlation value of the first partial region and the second partial region set in the vicinity of the first partial region is obtained, and when the cross-correlation value is equal to or smaller than the second threshold value, the first
An image processing apparatus, comprising: a reference image verification unit that uses the image of the partial region as the reference image.
【請求項2】 光軸が互いに略平行であってそれぞれ検
査対象物の一部分を撮像領域とする複数台の撮像装置を
備え、少なくとも2台の撮像装置について基準画像設定
手段により基準画像を各別に設定し、位置補正手段は検
査対象物の画像の位置座標を各基準画像の位置座標に一
致させるように座標変換することを特徴とする請求項1
記載の画像処理装置。
2. A plurality of image pickup devices each having an optical axis substantially parallel to each other and each having a part of an inspection object as an image pickup region, and a reference image setting means for each of the at least two image pickup devices sets a reference image separately. 2. The position correction means performs coordinate conversion so that the position coordinates of the image of the inspection object match the position coordinates of each reference image.
The image processing device described.
【請求項3】 基準となる対象物の画像内で部分領域を
順に走査し、各位置において第1の部分領域の近傍で第
1の部分領域に対して互いに異なる方向に離れた複数個
の第2の部分領域を設定して、各第2の部分領域と第1
の部分領域との相互相関値を求め、すべての方向の第2
の部分領域について相互相関値が第2の閾値以下になる
第1の部分領域を基準画像とすることを特徴とする請求
項1または請求項2記載の画像処理装置。
3. A plurality of partial regions are sequentially scanned within an image of a reference object, and at each position, a plurality of first partial regions are separated from each other in different directions in the vicinity of the first partial region. 2 partial areas are set, and each second partial area and the first partial area are set.
The cross-correlation value with the sub-region of
The image processing apparatus according to claim 1 or 2, wherein the first partial area having a cross-correlation value equal to or less than a second threshold is used as a reference image for the partial area.
【請求項4】 基準となる対象物の画像内で部分領域を
順に走査し、すべての部分領域について自己相関値を求
めた後に、自己相関値の大きいほうから順に第1の部分
領域の近傍で第1の部分領域に対して互いに異なる方向
に離れた複数個の第2の部分領域を設定して、各第2の
部分領域と第1の部分領域との相互相関値を求め、すべ
ての方向の第2の部分領域について相互相関値が第2の
閾値以下になる第1の部分領域を基準画像とすることを
特徴とする請求項1または請求項2記載の画像処理装
置。
4. Sub-regions are sequentially scanned in an image of a reference object, auto-correlation values are obtained for all sub-regions, and then, in the order of increasing auto-correlation value, in the vicinity of the first sub-region. A plurality of second partial areas are set apart from each other in different directions with respect to the first partial area, and a cross-correlation value between each of the second partial areas and the first partial area is obtained and all the directions are determined. The image processing apparatus according to claim 1 or 2, wherein the first partial region having a cross-correlation value of the second partial region of 2 or less is a reference image.
【請求項5】 基準となる対象物の画像内の適宜の部分
領域について画像の複雑度を求め、画像が複雑であって
複雑度が規定値を越えるときには、基準となる対象物の
画像内で部分領域を順に走査し、各位置において第1の
部分領域の近傍で第1の部分領域に対して互いに異なる
方向に離れた複数個の第2の部分領域を設定して、各第
2の部分領域と第1の部分領域との相互相関値を求め、
すべての方向の第2の部分領域について相互相関値が第
2の閾値以下になる第1の部分領域を基準画像とし、画
像が単純であって複雑度が規定値以下であるときには、
基準となる対象物の画像内で部分領域を順に走査し、す
べての部分領域について自己相関値を求めた後に、自己
相関値の大きいほうから順に第1の部分領域の近傍で第
1の部分領域に対して互いに異なる方向に離れた複数個
の第2の部分領域を設定して、各第2の部分領域と第1
の部分領域との相互相関値を求め、すべての方向の第2
の部分領域について相互相関値が第2の閾値以下になる
第1の部分領域を基準画像とすることを特徴とする請求
項1または請求項2記載の画像処理装置。
5. The complexity of an image is calculated for an appropriate partial area in an image of a reference object, and when the image is complex and the complexity exceeds a specified value, the image is converted in the image of the reference object. The partial regions are sequentially scanned, and at each position, a plurality of second partial regions that are separated from each other in different directions with respect to the first partial region are set in the vicinity of the first partial region. The cross-correlation value between the area and the first partial area is obtained,
When the first partial region whose cross-correlation values are equal to or less than the second threshold value for the second partial regions in all directions is used as the reference image, and the image is simple and the complexity is equal to or less than the specified value,
After sequentially scanning the partial regions in the image of the reference object and obtaining the autocorrelation values for all the partial regions, the first partial regions are arranged in the vicinity of the first partial region in descending order of the autocorrelation value. A plurality of second partial regions that are separated from each other in different directions with respect to each other,
The cross-correlation value with the sub-region of
The image processing apparatus according to claim 1 or 2, wherein the first partial area having a cross-correlation value equal to or less than a second threshold is used as a reference image for the partial area.
JP31487093A 1993-12-15 1993-12-15 Image processing device Expired - Fee Related JP3627249B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31487093A JP3627249B2 (en) 1993-12-15 1993-12-15 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31487093A JP3627249B2 (en) 1993-12-15 1993-12-15 Image processing device

Publications (2)

Publication Number Publication Date
JPH07168941A true JPH07168941A (en) 1995-07-04
JP3627249B2 JP3627249B2 (en) 2005-03-09

Family

ID=18058616

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31487093A Expired - Fee Related JP3627249B2 (en) 1993-12-15 1993-12-15 Image processing device

Country Status (1)

Country Link
JP (1) JP3627249B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005346283A (en) * 2004-06-01 2005-12-15 Sharp Corp Screen determination device and screen determination method
JP2008058182A (en) * 2006-08-31 2008-03-13 Mitsutoyo Corp Determination device for detection possibility of displacement quantity, its method, and displacement detector
JP2011524267A (en) * 2008-05-28 2011-09-01 ペッパール ウント フュフス ゲゼルシャフト ミット ベシュレンクテル ハフツング Method and mechanism for inspecting printed matter, computer program and computer program product
JP2011220797A (en) * 2010-04-08 2011-11-04 Sanyo Electric Co Ltd Electronic camera
JP2016091893A (en) * 2014-11-07 2016-05-23 日本電子株式会社 Image evaluation method and charged particle beam device
US9348541B2 (en) 2014-08-20 2016-05-24 Fuji Xerox Co., Ltd. Image processing apparatus and method, and non-transitory computer readable medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005346283A (en) * 2004-06-01 2005-12-15 Sharp Corp Screen determination device and screen determination method
JP2008058182A (en) * 2006-08-31 2008-03-13 Mitsutoyo Corp Determination device for detection possibility of displacement quantity, its method, and displacement detector
JP2011524267A (en) * 2008-05-28 2011-09-01 ペッパール ウント フュフス ゲゼルシャフト ミット ベシュレンクテル ハフツング Method and mechanism for inspecting printed matter, computer program and computer program product
JP2011220797A (en) * 2010-04-08 2011-11-04 Sanyo Electric Co Ltd Electronic camera
US9348541B2 (en) 2014-08-20 2016-05-24 Fuji Xerox Co., Ltd. Image processing apparatus and method, and non-transitory computer readable medium
JP2016091893A (en) * 2014-11-07 2016-05-23 日本電子株式会社 Image evaluation method and charged particle beam device

Also Published As

Publication number Publication date
JP3627249B2 (en) 2005-03-09

Similar Documents

Publication Publication Date Title
JP3627249B2 (en) Image processing device
CN112036232A (en) Image table structure identification method, system, terminal and storage medium
CN115187989A (en) Image processing method and device, electronic equipment, scanning pen and storage medium
JPH0718812B2 (en) Foreign object detection method
JP2000180138A (en) Calibration plate and calibration system for visual sensor utilizing it
JPH08101139A (en) Defect inspection method and device
JPH10283478A (en) Method for extracting feature and and device for recognizing object using the same method
JP2776234B2 (en) Indentation type hardness measuring device
JPH0735699A (en) Method and apparatus for detecting surface defect
JPH09245166A (en) Pattern matching device
JPH08334476A (en) Method and device for setting inspection area and inspection device using the same
JP2959017B2 (en) Circular image discrimination method
JP3146882B2 (en) Picture inspection method
JP2000182056A (en) Picture processor
JP2964594B2 (en) Mark inspection method
JPS6391779A (en) Parts recognizing device
JPH0410074A (en) Picture pattern inclination detecting method
JPH10116345A (en) Device for extracting linear outline part in picture
WO2015181580A1 (en) Automated review of forms through augmented reality
JPS61286704A (en) Method for detecting boundary line of image
KR101786734B1 (en) Apparatus and method for thinning characters
JPS63282889A (en) Image processing method
CN114841896A (en) Image processing method, apparatus, and computer-readable storage medium
JP3149069B2 (en) How to automatically set the region of interest
JPH10143673A (en) Picture processor

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040706

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20041116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041129

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071217

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 4

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees