JPH04233402A - Position recognizing system of object using tv camera - Google Patents

Position recognizing system of object using tv camera

Info

Publication number
JPH04233402A
JPH04233402A JP2417126A JP41712690A JPH04233402A JP H04233402 A JPH04233402 A JP H04233402A JP 2417126 A JP2417126 A JP 2417126A JP 41712690 A JP41712690 A JP 41712690A JP H04233402 A JPH04233402 A JP H04233402A
Authority
JP
Japan
Prior art keywords
data
template
pixel
image memory
pixels
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.)
Withdrawn
Application number
JP2417126A
Other languages
Japanese (ja)
Inventor
Hiroshi Ikeda
池田 比呂志
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2417126A priority Critical patent/JPH04233402A/en
Publication of JPH04233402A publication Critical patent/JPH04233402A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To shorten processing time of a processor while ensuring accuracy of position recognition by setting a detection area from positional information of a binary data to determine a correct position of an object from multi-contrast data of pixels in the area CONSTITUTION:Object 1 is taken with TV camera 2 and a multi-contrast data and a binary data are determined from an image data to be stored into a variable density image memory 3 and a binary image memory 4 respectively. The memory 4 is divided into block areas comprising pixels and a scanning is performed at each block area 5 to determine a position coordinates of position in the memory 4 of the pixel which presents 1 first. A detection area larger comparatively than the whole of an object is set on the memory 3 based on the coordinates. A correlation value of the multi-contrast data is determined between the pixels of a template 8 of an object 1 and the corresponding pixels in the memory 3 in the area 7. The position of the template 8 given when the correlation value is the maximum is determined as the position of the object 1. In this manner, a processor 9 performs a computation linearly for the pixels in the area 7 based on the multi-contrast data thereby enabling the shortening of processing time with the processor 9.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、テレビカメラによる対
象物の位置認識方式に関し、特にICパッケージや位置
合わせ用パターンなどの対象物の撮影画像についての多
階調デ−タと二値デ−タとを別々のメモリに格納し、先
ず二値デ−タに基づいて対象物の大まかな位置を認識し
てこの位置情報に基づいた検出エリアを多階調デ−タを
格納しているメモリ中に設定し、続いてこの検出エリア
中の多階調デ−タに基づいて対象物の正確な位置を認識
することにより、プロセッサでの要処理時間を短くする
とともに位置認識の精度を確保するようにした対象物の
位置認識方式に関する。
[Field of Industrial Application] The present invention relates to a method for recognizing the position of an object using a television camera, and in particular to multi-gradation data and binary data for photographed images of objects such as IC packages and alignment patterns. First, the rough position of the object is recognized based on the binary data, and the detection area based on this position information is stored in a memory storing multi-tone data. By setting the detection area in This invention relates to a method for recognizing the position of an object.

【0002】0002

【従来の技術】従来、テレビカメラによる対象物の位置
認識方式としては、図7に示す様に、位置合わせ用パタ
ーンなどの対象物71をテレビカメラ72で撮影して得
られる画像の多階調デ−タを濃淡画像メモリ73に格納
し、この濃淡画像メモリ73において対象物71を完全
に取り込むことができるM×N(M,Nは正の整数)の
画素に相当するサイズのウィンドウ74を設定してこの
ウィンドウ74と同じ大きさを持つテンプレート75の
各画素と、当該ウィンドウ74内の原画像の対応する各
画素間の多階調デ−タ同士についての相関値を、プロセ
ッサ76での演算処理により、当該テンプレート75を
1画素ごとにシフトさせていったときの各シフト位置に
おいて求め、この相関値が最大となるときの前記テンプ
レート75の位置を前記対象物の位置であると決定する
手法が一般的である。
2. Description of the Related Art Conventionally, as shown in FIG. 7, as a method for recognizing the position of an object using a television camera, a multi-gradation image obtained by photographing an object 71 such as a positioning pattern with a television camera 72 is used. The data is stored in the grayscale image memory 73, and a window 74 of a size corresponding to M×N pixels (M and N are positive integers) that can completely capture the object 71 is created in the grayscale image memory 73. The processor 76 calculates the correlation value between each pixel of the template 75 having the same size as the window 74 and the corresponding pixel of the original image in the window 74. Through arithmetic processing, the template 75 is shifted pixel by pixel and determined at each shift position, and the position of the template 75 at which this correlation value is maximum is determined to be the position of the object. The method is common.

【0003】なお、ここで用いるテンプレート75は、
検出したい対象物71の設計値を基にバラツキも加味し
て求めた、対象物部分と背景部分との各画素の多階調デ
−タで作成した型板である。
[0003] The template 75 used here is
This is a template created from multi-gradation data of each pixel in the object portion and background portion, which is determined based on the design value of the object 71 to be detected, taking into account variations.

【0004】0004

【発明が解決しようとする課題】以上のように、従来の
方式では、濃淡画素メモリ73中の対象物71が存在し
ない画素領域についても、テンプレート75がシフトす
るごとに当該テンプレート75の各画素と、濃淡画像メ
モリ73中の対応する各画素との間の多階調デ−タ同士
についての相関値をプロセッサ76で求めている。その
ため、位置確認についての精度は十分なものとなるがプ
ロセッサ76での演算に時間がかかるといった問題点が
あった。
As described above, in the conventional method, each pixel area of the template 75 is changed every time the template 75 is shifted, even for a pixel area in the grayscale pixel memory 73 where the object 71 does not exist. The processor 76 calculates the correlation value between the multi-tone data and each corresponding pixel in the grayscale image memory 73. Therefore, although the accuracy of position confirmation is sufficient, there is a problem that calculations in the processor 76 take time.

【0005】そこで、本発明では、濃淡画像メモリの外
に二値画像メモリを用意してそれぞれのメモリに対象物
の画像についての多階調デ−タと二値デ−タのそれぞれ
を格納し、先ず二値画像メモリ中の二値デ−タに基づい
て対象物の大まかな位置を認識してこの位置情報に基づ
いた検出エリアを多階調デ−タを格納している濃淡画像
メモリ中に設定し、続いてこの検出エリア中の各画素の
多階調デ−タに基づいて対象物の正確な位置を決定する
ことにより、プロセッサでの要処理時間を短くするとと
もに位置認識の精度を確保することを目的とする。
Therefore, in the present invention, a binary image memory is prepared in addition to the grayscale image memory, and each memory stores multi-gradation data and binary data regarding the image of the object. First, the rough position of the object is recognized based on the binary data in the binary image memory, and the detection area based on this position information is set in the grayscale image memory storing multi-tone data. , and then determine the exact position of the object based on the multi-tone data of each pixel in this detection area, reducing the processing time required by the processor and increasing the accuracy of position recognition. The purpose is to ensure that

【0006】[0006]

【課題を解決するための手段】本発明は、対象物を撮影
して得られる画像の多階調デ−タと二値デ−タとを別々
のメモリに格納しておき、プロセッサは先ず二値デ−タ
を用いて対象物の大まかな位置を認識し、続いてこの認
識した範囲についての各画素の多階調デ−タについて、
予め作成してあるテンプレートの各画素の多階調デ−タ
との相関値を求めることにより対象物の位置を決定する
ものである。
[Means for Solving the Problems] The present invention stores multi-gradation data and binary data of an image obtained by photographing an object in separate memories, and first the processor The rough position of the object is recognized using the value data, and then the multi-tone data of each pixel in this recognized range is
The position of the object is determined by determining the correlation value between each pixel of a template prepared in advance and multi-gradation data.

【0007】図1は本発明の原理説明図である。図にお
いて、1は、対象物であり、例えば位置合わせ用の十字
状をしたパタ−ンである。2は、テレビカメラであり、
対象物1を撮影してその濃淡画像を求めている。3は、
濃淡画像メモリであり、対象物1の濃淡画像をA/D変
換して求めた多階調デ−タを格納している。4は、二値
画像メモリであり、多階調デ−タを所定の閾値で二値化
して求めた二値データ、例えば対象物部分の画素を「1
」,背景部分の画素を「0」としたデータを格納してい
る。なお、この二値化は、テレビカメラ2の出力信号に
対して行なってもよいし、いったんメモリ3に格納した
多階調デ−タに対して行なってもよい。また、本発明に
おける二値画像メモリとは、最終的に二値データを格納
するメモリのことである。5は、ブロック領域であり、
それぞれのブロック領域は複数の画素からなっている。 6は、位置座標の一つであり、ブロック領域5のそれぞ
れについて、例えば左上の画素から矢印方向に走査した
ときに最初に「1」となる画素の、二値画像メモリ4に
おけるx座標およびy座標で表される。7は、検出エリ
アであり、対象物部分の画素を含むブロック領域5のそ
れぞれにおける位置座標6に基づいて濃淡画像メモリ3
に設定された、対象物全体より大きめの領域である。8
は、テンプレートであり、対象物1の設計値を基に当該
対象物部分と背景部分との各画素の多階調デ−タで作成
したものである。9は、プロセッサであり、テンプレー
ト8の各画素と濃淡画像メモリ3の各画素との間の多階
調デ−タ同士についての相関値や位置座標6などを求め
る演算処理を行なっている。
FIG. 1 is a diagram explaining the principle of the present invention. In the figure, reference numeral 1 indicates an object, for example, a cross-shaped pattern for positioning. 2 is a television camera;
An object 1 is photographed and a grayscale image thereof is obtained. 3 is
This is a grayscale image memory, and stores multi-tone data obtained by A/D converting the grayscale image of the object 1. 4 is a binary image memory, in which binary data obtained by binarizing multi-tone data using a predetermined threshold value, for example, pixels of an object part are
”, data with pixels in the background portion set to “0” is stored. Note that this binarization may be performed on the output signal of the television camera 2, or may be performed on the multi-gradation data once stored in the memory 3. Furthermore, the binary image memory in the present invention refers to a memory that ultimately stores binary data. 5 is a block area,
Each block area consists of a plurality of pixels. 6 is one of the position coordinates, and for each block area 5, for example, the x coordinate and y coordinate in the binary image memory 4 of the pixel that becomes "1" when scanning from the upper left pixel in the direction of the arrow. expressed in coordinates. 7 is a detection area, and the grayscale image memory 3 is stored based on the position coordinates 6 in each of the block areas 5 including the pixels of the object part.
This is an area larger than the entire object. 8
is a template, which is created from multi-gradation data of each pixel of the object part and the background part based on the design values of the object 1. A processor 9 performs arithmetic processing to obtain correlation values, position coordinates 6, etc. for multi-tone data between each pixel of the template 8 and each pixel of the grayscale image memory 3.

【0008】ここで、対象物1をテレビカメラ2で撮影
した画像に基づいてその位置を認識する手順は次のよう
になっている。
Here, the procedure for recognizing the position of the object 1 based on the image taken by the television camera 2 is as follows.

【0009】すなわち、■対象物1をテレビカメラ2で
撮影してその画像デ−タを求める。■この画像デ−タか
ら多階調デ−タと二値デ−タとを求め、多階調デ−タを
濃淡画像メモリ3に、また二値デ−タを二値画像メモリ
4に格納する。■二値画像メモリ4を複数の画素からな
るブロック領域5に分割する。■ブロック領域ごとに、
例えば左上の画素から矢印方向に走査したときに最初に
「1」となる画素の二値画像メモリ4でのx座標および
y座標を求める。■この位置座標に基づいて、対象物全
体より大きめの検出エリア7を濃淡画像メモリ3上に設
定する。■この検出エリア7において対象物1のテンプ
レート8を1画素ずつシフトさせていき、各シフト位置
でのテンプレート8の各画素と、濃淡画像メモリ3中の
対応する各画素との間の多階調デ−タ同士の相関値を求
める。■この相関値が最大となるときのテンプレート8
の位置を対象物1の位置であると決める。といった手順
により、対象物1の位置を認識している。
That is, (1) the object 1 is photographed by the television camera 2 and image data thereof is obtained; ■ Obtain multi-gradation data and binary data from this image data, and store the multi-gradation data in the gradation image memory 3 and the binary data in the binary image memory 4. do. (2) Divide the binary image memory 4 into block areas 5 each consisting of a plurality of pixels. ■For each block area,
For example, the x and y coordinates in the binary image memory 4 of the pixel that first becomes "1" when scanned in the direction of the arrow from the upper left pixel are determined. (2) Based on the position coordinates, a detection area 7 larger than the entire object is set on the grayscale image memory 3. ■ In this detection area 7, the template 8 of the object 1 is shifted one pixel at a time, and the multi-gradation between each pixel of the template 8 at each shift position and each corresponding pixel in the grayscale image memory 3 is Find the correlation value between data. ■Template 8 when this correlation value is maximum
The position is determined to be the position of object 1. Through these steps, the position of the object 1 is recognized.

【0010】0010

【作用】本発明では、先ず二値画像メモリ4において対
象物1の大まかな位置を求め、この位置情報に基づいて
検出エリア7を濃淡画像メモリ3に設定している。そし
て、この検出エリア7に対して従来の手法、すなわちテ
ンプレート8を1画素ずつシフトさせていき、各シフト
位置でのテンプレート8の各画素と、検出エリア7中の
対応する画素との間の統計的マッチング状態をプロセッ
サ9で求める手法を適用している。
In the present invention, first, the rough position of the object 1 is determined in the binary image memory 4, and the detection area 7 is set in the grayscale image memory 3 based on this position information. Then, using the conventional method for this detection area 7, that is, shifting the template 8 pixel by pixel, and calculating the statistics between each pixel of the template 8 at each shift position and the corresponding pixel in the detection area 7. A method is applied in which the processor 9 determines the target matching state.

【0011】このように、プロセッサ9は、二値画像メ
モリ4を走査して対象物1の全体を含む検出エリア7を
設定し、この検出エリア7の画素についてのみその多階
調デ−タに基づいた演算処理を実行しているので、プロ
セッサ9での処理時間は短縮される。
In this manner, the processor 9 scans the binary image memory 4 to set the detection area 7 including the entire object 1, and converts only the pixels of this detection area 7 into multi-tone data. Since the arithmetic processing based on the above information is executed, the processing time in the processor 9 is shortened.

【0012】0012

【実施例】図2,図3,図4,図5,図6及び図7を用
いて本発明の実施例を説明する。
[Embodiment] An embodiment of the present invention will be explained using FIGS. 2, 3, 4, 5, 6, and 7.

【0013】図2は、プリント板上に搭載する部品の位
置を認識する装置の概要を示す説明図である。図2にお
いて、21はプリント板,22はプリント板上の部品搭
載位置を示すマーク,23 はプリント板を載置したX
ーYテーブル,24はプリント板上に搭載する部品, 
25は部品に設けた位置認識用の例えば十字形のパター
ン、26はテレビカメラ, 27は画像処理部, 28
は駆動制御部である。
FIG. 2 is an explanatory diagram showing an outline of an apparatus for recognizing the position of components mounted on a printed board. In Fig. 2, 21 is a printed board, 22 is a mark indicating the component mounting position on the printed board, and 23 is an X on which the printed board is placed.
- Y table, 24 is a component mounted on the printed board,
25 is, for example, a cross-shaped pattern provided on the part for position recognition, 26 is a television camera, 27 is an image processing unit, 28
is a drive control section.

【0014】また、画像処理部27は、テレビカメラ2
6の出力である画像信号を多階調デ−タに変換するA/
D変換部31, この多階調デ−タをいったん格納して
最終的には二値デ−タに変換して格納する二値画像メモ
リ32, この二値画像メモリ32の多階調デ−タをコ
ピーして格納する濃淡画像メモリ33, 各種デ−タを
保持したROM34, プログラムを保持したROM3
5, 高速演算処理が可能なプロセッサ36, 演算途
中のデ−タを保持するためのRAM37およびCPU3
8等で構成されている。
The image processing section 27 also includes a television camera 2.
A/
A D converter 31, a binary image memory 32 that stores this multi-gradation data once and finally converts it into binary data and stores it; Grayscale image memory 33 for copying and storing data, ROM 34 for storing various data, ROM 3 for storing programs
5. Processor 36 capable of high-speed calculation processing, RAM 37 and CPU 3 for holding data in the middle of calculation
It consists of 8 mag.

【0015】また、駆動制御部28は、パターン25の
位置に対応した制御信号に基づいた制御を行うコントロ
ーラ41, このコントローラ41によって制御される
部品クランパ42, 同じくコントローラ41によって
制御されるパルスモータ43, 及びこのパルスモータ
43によって駆動されるXーYテーブル駆動部44等で
構成されている。
The drive control unit 28 also includes a controller 41 that performs control based on a control signal corresponding to the position of the pattern 25, a component clamper 42 that is controlled by this controller 41, and a pulse motor 43 that is also controlled by the controller 41. , and an XY table drive section 44 driven by this pulse motor 43.

【0016】ここで、プリント板21と部品24との位
置合わせは次のように行われる。 (1) 先ず、デ−タ圧縮のために多階調デ−タを二値
化する。 すなわち、テレビカメラ26の出力信号をA/D変換し
て求めた、例えば256段階の多階調デ−タが格納され
ている二値画像メモリ32中の各濃度に対応した画像数
をカウントして図3に示すような濃度ヒストグラムを作
成する。そして、設計値上、このパターン25全体の画
素数は予め分かっているから、当該濃度ヒストグラムの
明るい方から順に画素数を累積していってこの既知の画
素数に最も近くなる濃度を求め、この濃度を閾値として
多階調デ−タの二値化を行ない、この二値デ−タを二値
画像メモリ32に格納する。なお、この濃度ヒストグラ
ムはパターン25の部分を「明」、背景部分を「暗」と
して作成している。
Here, the printed board 21 and the component 24 are aligned as follows. (1) First, multi-gradation data is binarized for data compression. That is, the number of images corresponding to each density in the binary image memory 32 storing, for example, 256 levels of multi-tone data obtained by A/D converting the output signal of the television camera 26 is counted. Then, a density histogram as shown in FIG. 3 is created. Since the number of pixels of the entire pattern 25 is known in advance based on the design value, the number of pixels is accumulated in order from the brightest side of the density histogram to find the density that is closest to this known number of pixels. The multi-gradation data is binarized using the density as a threshold value, and this binary data is stored in the binary image memory 32. Note that this density histogram is created with the pattern 25 portion as “bright” and the background portion as “dark”.

【0017】(2) 次に、二値画像メモリ32の二値
デ−タに基づいてパターン25の大まかな位置を認識す
る。すなわち、二値画像メモリ32を、パターン25の
大きさ(x,y方向の最大長)に基づいて予め決めてあ
るブロック領域51のサイズで図4に示すように等分割
する。そして、ブロック領域同士の走査の順序をx方向
にして順次、各ブロック領域について所定の方向、例え
ば左上及び右下から1ライン,1画素ごとに矢印方向に
走査して「1」の画素が見つかった場合はその時点でそ
のブロック領域内の走査を中止して当該画素の二値画像
メモリ32におけるx,y座標を求める。そして、それ
までに走査した各ブロック領域について得られたx,y
座標の中の最大値,最小値であるxmax ,xmin
 ,ymax ,ymin を各ブロック領域内の走査
が終わるごとに求める。ここで、走査に要する時間を短
縮するために各ブロック領域において、例えば1ライン
おきや1画素おきの走査を行ってもよい。
(2) Next, the rough position of the pattern 25 is recognized based on the binary data in the binary image memory 32. That is, the binary image memory 32 is divided into equal parts as shown in FIG. 4 by the size of the block area 51 that is predetermined based on the size of the pattern 25 (maximum length in the x and y directions). Then, each block area is sequentially scanned in a predetermined direction, for example, from the upper left and lower right, in the direction of the arrow for each line and pixel, with the scanning order of the block areas set in the x direction, until a pixel of "1" is found. If so, the scanning within that block area is stopped at that point and the x, y coordinates of the pixel in the binary image memory 32 are determined. Then, x, y obtained for each block area scanned so far
Maximum and minimum values in the coordinates xmax, xmin
, ymax, ymin are determined each time the scanning within each block area is completed. Here, in order to shorten the time required for scanning, scanning may be performed, for example, every other line or every other pixel in each block area.

【0018】なお、走査を終了するのは次の場合である
。 ・すべてのブロック領域の走査が終わった場合。 ・(ymax −ymin )の値が対象物であるパタ
ーン25のy方向の長さに略等しく、かつymin の
画素があるブロック領域を含めて3つ下のブロック領域
の走査が終わった場合。これは、パターン25のy方向
の長さが3個のy方向に連続したブロック領域の中に収
まる程度のものだからである。また、後者の場合、(x
max −xmin )の値が対象物であるパターン2
5のx方向の長さに略等しく、かつxmin の画素が
あるブロック領域を含めて3つ右のブロック領域の走査
が終わった場合は同様の理由で走査対象となるブロック
領域のx方向の範囲を短くする。そして、ブロック領域
同士の走査の順序をy方向にした場合の走査終了等につ
いては、以上の説明でxとyとを入れ換えたものになる
Note that scanning is terminated in the following cases. - When all block areas have been scanned. - When the value of (ymax - ymin) is approximately equal to the length in the y direction of the pattern 25 that is the object, and scanning of the block area three blocks below including the block area where the pixel ymin is located has been completed. This is because the length of the pattern 25 in the y direction is such that it fits within three continuous block areas in the y direction. Also, in the latter case, (x
Pattern 2 where the value of max − xmin ) is the object
If the scanning of the block area three blocks to the right including the block area that is approximately equal to the x-direction length of 5 and has xmin pixels is completed, the x-direction range of the block area to be scanned for the same reason. shorten. Regarding the end of scanning when the order of scanning between block areas is set in the y direction, x and y are interchanged in the above explanation.

【0019】(3) 次に、先に求めたxmax ,x
min,ymax ,ymin の値に基づいて図5に
示すような大きめの検出エリア52を、情報量の多い濃
淡画像メモリ33に設定する。
(3) Next, xmax, x obtained earlier
Based on the values of min, ymax, and ymin, a larger detection area 52 as shown in FIG. 5 is set in the grayscale image memory 33, which has a large amount of information.

【0020】(4) 次に、この検出エリア52の各画
素の多階調デ−タに基づいてパターン25の正確な位置
を決定する。すなわち、図6に示すような、パターン2
5を完全に取り込むことができるM×N(M,Nは正の
整数)の画素に相当するサイズのウィンドウと、このウ
ィンドウと同じ大きさでパターン25およびその背景部
分の各画素の多階調デ−タからなるテンプレート53と
を予め決めておき、このテンプレート53を検出エリア
52の例えば左上の画素から図示のようにx方向に1画
素ずつシフトさせていき、各シフト位置でのテンプレー
ト53と、濃淡画像メモリ33の原画像との相関値をプ
ロセッサ36での演算処理により求める。
(4) Next, the exact position of the pattern 25 is determined based on the multi-gradation data of each pixel in the detection area 52. That is, pattern 2 as shown in FIG.
A window with a size equivalent to M×N pixels (M and N are positive integers) that can completely capture the pattern 25 and the multi-gradation of each pixel of the pattern 25 and its background part with the same size as this window. A template 53 consisting of data is determined in advance, and this template 53 is shifted from the upper left pixel of the detection area 52 one pixel at a time in the x direction as shown in the figure, and the template 53 at each shift position is , a correlation value with the original image in the grayscale image memory 33 is obtained through arithmetic processing in the processor 36.

【0021】そして、この相関値は、テンプレート53
の平均濃度からのバラツキを表す指標である自己分散を
Sxxとし、原画像の自己分散をSyyとし、またテン
プレート53と原画像との間の共分散をSxyとして、
[0021] Then, this correlation value is
Let Sxx be the self-variance, which is an index representing the variation from the average density of , Syy be the self-variance of the original image, and Sxy be the covariance between the template 53 and the original image,

【数2】 で求められる。ここで、−1≦r≦1であり、“1”に
近づくほど、テンプレート53と原画像との重なり度が
大きいことを示している。
It is obtained by [Equation 2]. Here, −1≦r≦1, and the closer it is to “1”, the greater the degree of overlap between the template 53 and the original image.

【0022】また、Sxxは、テンプレート53の各画
素の多階調デ−タをxmnとして、
[0022] Furthermore, Sxx is defined as multi-gradation data of each pixel of the template 53 as xmn.

【数3】 で求められる。同様に、Syyは、ウィンドウ内の原画
像の各画素の多階調デ−タをymnとして、
[Equation 3] Similarly, Syy takes the multi-gradation data of each pixel of the original image in the window as ymn,

【数4】 で求められる。また、Sxyは、[Math 4] is required. Also, Sxy is

【数5】 で求められる。そして、テンプレート53と、濃淡画像
メモリ33の対応する原画像との相関値rは、
It is obtained by [Equation 5]. The correlation value r between the template 53 and the corresponding original image in the grayscale image memory 33 is

【数6】 で求められる。[Math 6] is required.

【0023】さらに、本発明では、テンプレート53が
固定されれば■′式の
Furthermore, in the present invention, if the template 53 is fixed, the

【数7】 の部分が定数になること、また相関値rは1より小さい
少数点であるため、プロセッサ36での演算処理におい
て丸め誤差が生じることなどを考慮して、
Considering that the part of [Formula 7] is a constant and that the correlation value r is a decimal point smaller than 1, rounding errors may occur in the arithmetic processing in the processor 36.

【数8】 但し、 C1 :1000 M  :テンプレート53のx方向のサイズN  :テ
ンプレート53のy方向のサイズxmn:テンプレート
53の各画素の多階調デ−タymn:濃淡画像メモリ中
の対応する各画素の多階調デ−タ の値を算出してこれを相関値としている。なお、C1 
,C2 およびC3 の値は予め求めてデ−タ用のRO
M34に格納しておく。
[Equation 8] However, C1: 1000 M: Size of the template 53 in the x direction N: Size of the template 53 in the y direction The value of multi-gradation data of each pixel is calculated and used as a correlation value. In addition, C1
, C2 and C3 are calculated in advance and used as RO for data.
Store it in M34.

【0024】したがって、0≦r2 ≦1000となり
、このr2 が最大となるテンプレート53のシフト位
置をパターン25の位置と決定する。なお、この■′式
では、元々のrの値が負である場合を認識できないので
、パターン25の位置を決定する前に■′式の分子の、
Therefore, 0≦r2≦1000, and the shift position of the template 53 where r2 becomes maximum is determined as the position of the pattern 25. Note that this formula ■' cannot recognize the case where the original value of r is negative, so before determining the position of pattern 25, the numerator of formula ■' is

【数9】 が負の値でないことを確認する必要がある。[Math. 9] We need to make sure that is not a negative value.

【0025】[0025]

【発明の効果】本発明によれば、濃淡画像メモリと二値
画像メモリを用意してそれぞれのメモリに対象物の画像
についての多階調デ−タと二値デ−タのそれぞれを格納
し、先ず二値画像メモリ中の二値デ−タに基づいて対象
物の大まかな位置を認識して、続いてこの位置情報に基
づいた検出エリアを、多階調デ−タを格納している濃淡
画像メモリ中に設定し、続いてこの検出エリアにおいて
対象物のテンプレートを1画素ずつシフトさせていき、
各シフト位置での当該テンプレートと、対応する原画像
との相関値をプロセッサで求めてこの相関値が最大のと
きのテンプレートの位置を対象物の位置を決定する構成
にしているので、対象物のない画素領域での多階調デ−
タに対する演算を省略でき、プロセッサでの処理時間を
短くするとともに位置決定の精度を確保することができ
る。
According to the present invention, a grayscale image memory and a binary image memory are prepared, and each memory stores multi-gradation data and binary data regarding an image of an object. First, the rough position of the object is recognized based on the binary data in the binary image memory, and then the detection area based on this positional information is stored as multi-tone data. Set it in the gray scale image memory, then shift the template of the object pixel by pixel in this detection area,
The processor calculates the correlation value between the template and the corresponding original image at each shift position, and the position of the template at which this correlation value is maximum is used to determine the position of the target object. Multi-tone data in a pixel area where
The calculation for the data can be omitted, the processing time in the processor can be shortened, and the accuracy of position determination can be ensured.

【0026】さらに、前記相関値の演算過程においても
、例えば自己分散Sxxを求める際、前記■′式をいっ
たん■′式に変形したように平均値だけを別に算出する
必要がない状態にしてから演算処理を実行し、また0≦
r2 ≦1000となるように相関値rを変形する構成
にしているので、プロセッサでの処理負担を軽くすると
ともに演算処理過程での丸め誤差等の発生を抑えること
ができる。
Furthermore, in the calculation process of the correlation value, for example, when calculating the self-variance Sxx, it is necessary to first transform the above-mentioned formula ``■'' into the formula ``■'', so that it is not necessary to separately calculate only the average value. Executes arithmetic processing, and also 0≦
Since the correlation value r is modified so that r2≦1000, it is possible to reduce the processing load on the processor and to suppress the occurrence of rounding errors and the like during the arithmetic processing process.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の原理説明図である。FIG. 1 is a diagram explaining the principle of the present invention.

【図2】本発明の、プリント板上に搭載する部品の位置
を認識する装置の概要を示す説明図である。
FIG. 2 is an explanatory diagram showing an outline of an apparatus for recognizing the position of components mounted on a printed board according to the present invention.

【図3】多階調デ−タのそれぞれの濃度と、この濃度を
持つ画素数とを表す濃度ヒストグラムである。
FIG. 3 is a density histogram showing each density of multi-gradation data and the number of pixels having this density.

【図4】二値画像メモリを複数の画素からなるブロック
領域で等分割した状態を示す説明図である。
FIG. 4 is an explanatory diagram showing a state in which a binary image memory is equally divided into block areas each consisting of a plurality of pixels.

【図5】対象物の位置座標のxmax ,xmin ,
ymax ,ymin に基づいて設定した検出エリア
を示す説明図である。
[Fig. 5] Position coordinates of the object xmax, xmin,
It is an explanatory diagram showing a detection area set based on ymax and ymin.

【図6】検出エリアにおけるウィンドウとテンプレート
との状態を示す説明図である。
FIG. 6 is an explanatory diagram showing the state of a window and a template in a detection area.

【図7】従来の、対象物の位置認識方式の概要を示す説
明図である。
FIG. 7 is an explanatory diagram showing an overview of a conventional object position recognition method.

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

図1において、 1・・・対象物 2・・・テレビカメラ 3・・・濃淡画像メモリ 4・・・二値画像メモリ 5・・・ブロック領域 6・・・位置座標 7・・・検出エリア 8・・・テンプレート 9・・・プロセッサ In Figure 1, 1...Object 2...TV camera 3... Grayscale image memory 4... Binary image memory 5...Block area 6...Position coordinates 7...Detection area 8...Template 9...processor

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】  対象物をテレビカメラで撮影して求め
た画像デ−タをメモリに格納し、このメモリ中の画像デ
−タについてプロセッサで演算処理することにより、当
該対象物の位置を認識する方式において、前記メモリと
して濃淡画像メモリと二値画像メモリとを備え、当該濃
淡画像メモリには前記画像の多階調デ−タを格納し、ま
た当該二値画像メモリには前記画像の二値デ−タを格納
し、前記二値画像メモリを複数の画素からなるブロック
領域に分割し、この中の所定範囲のブロック領域のそれ
ぞれを走査することによって前記対象物の二値デ−タが
存在する画素の中の特定のものの位置座標を当該ブロッ
ク領域ごとに求め、この位置座標に基づいて、前記対象
物全体より大きめの検出エリアを前記濃淡画像メモリ上
に設定し、この検出エリアにおいて、予め対象物の各画
素の多階調デ−タを見込んで作成したテンプレートを画
素単位でシフトさせ、各シフト位置での当該テンプレー
トの各画素と、前記濃淡画像メモリ中の対応する各画素
との間の多階調デ−タ同士についての相関値を求め、こ
の相関値が最大となるときの前記テンプレートの位置を
前記対象物の位置であると決定し、先ず、前記二値デ−
タに基づいて対象物の大まかな位置を認識し、続いて前
記多階調デ−タに基づいて対象物の正確な位置を決定す
るようにしたことを特徴とするテレビカメラによる対象
物の位置認識方式。
[Claim 1] Image data obtained by photographing an object with a television camera is stored in a memory, and a processor performs arithmetic processing on the image data in the memory to recognize the position of the object. In the system, the memory includes a grayscale image memory and a binary image memory, the grayscale image memory stores multi-tone data of the image, and the binary image memory stores two-value data of the image. By storing value data, dividing the binary image memory into block areas each consisting of a plurality of pixels, and scanning each of the block areas within a predetermined range, the binary data of the object is obtained. The positional coordinates of a specific one among the existing pixels are determined for each block area, and based on the positional coordinates, a detection area larger than the entire object is set on the grayscale image memory, and in this detection area, A template created in advance based on the multi-gradation data of each pixel of the object is shifted pixel by pixel, and each pixel of the template at each shift position is compared with each corresponding pixel in the grayscale image memory. The position of the template at which the correlation value becomes maximum is determined to be the position of the object, and first, the position of the template is determined to be the position of the object.
The position of the object by the television camera is characterized in that the approximate position of the object is recognized based on the data, and then the exact position of the object is determined based on the multi-tone data. Recognition method.
【請求項2】  二値デ−タを求める際の閾値は、多階
調デ−タのそれぞれの濃度と、この濃度を持つ画素数と
を示す濃度ヒストグラムを作成してこの濃度ヒストグラ
ムの明暗いずれかの濃度の方から当該画素数を累積し、
この累積値が予め分かっている対象物の画素数に最も近
いときの濃度であることを特徴とする請求項1記載のテ
レビカメラによる対象物の位置認識方式。
2. The threshold value when obtaining binary data is determined by creating a density histogram showing each density of multi-tone data and the number of pixels having this density, and then calculating the brightness and darkness of this density histogram. Accumulate the number of pixels from that density,
2. The method for recognizing the position of an object using a television camera according to claim 1, wherein the cumulative value is the density closest to a previously known number of pixels of the object.
【請求項3】  位置座標は、所定範囲のブロック領域
のそれぞれについて所定の方向に走査するとき、前記対
象物の画像デ−タが最初に認識される画素の、二値画像
メモリにおけるx座標およびy座標であることを特徴と
する請求項1記載のテレビカメラによる対象物の位置認
識方式。
3. The positional coordinates are the x coordinates and 2. The method for recognizing the position of an object using a television camera according to claim 1, wherein the y-coordinate is the y-coordinate.
【請求項4】  相関値は、 【数1】 但し、 r  :相関値 c1 :定数 M  :テンプレートのx方向のサイズN  :テンプ
レートのy方向のサイズxmn:テンプレートの各画素
の多階調デ−タymn:濃淡画像メモリ中の対応する各
画素の多階調デ−タ により求めることを特徴とする請求項1記載のテレビカ
メラによる対象物の位置認識方式。
4. The correlation value is: [Formula 1] where: r: Correlation value c1: Constant M: Size of the template in the x direction N: Size of the template in the y direction xmn: Multi-gradation data of each pixel of the template 2. A method for recognizing the position of an object using a television camera according to claim 1, wherein: time is determined by multi-tone data of each corresponding pixel in a grayscale image memory.
JP2417126A 1990-12-28 1990-12-28 Position recognizing system of object using tv camera Withdrawn JPH04233402A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2417126A JPH04233402A (en) 1990-12-28 1990-12-28 Position recognizing system of object using tv camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2417126A JPH04233402A (en) 1990-12-28 1990-12-28 Position recognizing system of object using tv camera

Publications (1)

Publication Number Publication Date
JPH04233402A true JPH04233402A (en) 1992-08-21

Family

ID=18525259

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2417126A Withdrawn JPH04233402A (en) 1990-12-28 1990-12-28 Position recognizing system of object using tv camera

Country Status (1)

Country Link
JP (1) JPH04233402A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005284509A (en) * 2004-03-29 2005-10-13 Matsushita Electric Ind Co Ltd Image processor
JP2010054246A (en) * 2008-08-26 2010-03-11 Panasonic Electric Works Co Ltd Method for detecting joint and method for inspecting external appearance of joint using the method
JP2014112228A (en) * 2005-02-28 2014-06-19 Inphase Technologies Inc Processing data pixels in holographic data storage system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005284509A (en) * 2004-03-29 2005-10-13 Matsushita Electric Ind Co Ltd Image processor
JP4525130B2 (en) * 2004-03-29 2010-08-18 パナソニック株式会社 Image processing device
JP2014112228A (en) * 2005-02-28 2014-06-19 Inphase Technologies Inc Processing data pixels in holographic data storage system
JP2010054246A (en) * 2008-08-26 2010-03-11 Panasonic Electric Works Co Ltd Method for detecting joint and method for inspecting external appearance of joint using the method

Similar Documents

Publication Publication Date Title
US5157740A (en) Method for background suppression in an image data processing system
US7313289B2 (en) Image processing method and apparatus and computer-readable storage medium using improved distortion correction
KR890005006B1 (en) Image processing system & method
US7489832B2 (en) Imaging apparatus, image processing method for imaging apparatus and recording medium
US20010012390A1 (en) Pattern inspection equipment, pattern inspection method, and storage medium storing pattern inspection program
EP0568697B1 (en) Method of correcting shading
CN113362238A (en) Test image processing method and device, electronic equipment and storage medium
JP2014164528A (en) Character recognition device, character recognition method, and program
CN112419207A (en) Image correction method, device and system
US5621825A (en) Image processor, image processing method and apparatus applying same
CN111767752B (en) Two-dimensional code identification method and device
US6650362B1 (en) Movement detecting apparatus with feature point extractor based on luminance gradient in current frame
JPH04233402A (en) Position recognizing system of object using tv camera
JP3582988B2 (en) Non-contact image reader
JP3253752B2 (en) Pattern evaluation method
JP3260425B2 (en) Pattern edge line estimation method and pattern inspection device
CN113850100A (en) Method and device for correcting two-dimensional code
JPS63153682A (en) Method and apparatus for processing contrast picture
JPH08172300A (en) Component-position recognition apparatus
CN111091513B (en) Image processing method, device, computer readable storage medium and electronic equipment
JP3041056B2 (en) Semiconductor pellet detection method
JP4465911B2 (en) Image processing apparatus and method
JP3175946B2 (en) Object position measuring method and device
JPH05314261A (en) Image recognizing method
CN115018868A (en) Computer image edge detection method

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980312