JPS62168290A - Image recognizing device - Google Patents

Image recognizing device

Info

Publication number
JPS62168290A
JPS62168290A JP61009746A JP974686A JPS62168290A JP S62168290 A JPS62168290 A JP S62168290A JP 61009746 A JP61009746 A JP 61009746A JP 974686 A JP974686 A JP 974686A JP S62168290 A JPS62168290 A JP S62168290A
Authority
JP
Japan
Prior art keywords
pixels
image
circular object
binary
single circular
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP61009746A
Other languages
Japanese (ja)
Inventor
Kazuo Mikami
和夫 三上
Suguru Ishihara
石原 英
Hiroshi Nakamoto
浩 中本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Tateisi Electronics Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP61009746A priority Critical patent/JPS62168290A/en
Publication of JPS62168290A publication Critical patent/JPS62168290A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To decrease a memory capacity and to execute a high speed processing by executing the image pickup of plural circular objects, binary- coding an outputted video signal, and deriving the coordinate of the center of gravity of a single circular object, based on the counting output of the number of picture elements of a binary image in an area for surrounding the single circular object to be recognized. CONSTITUTION:As for connected circular objects brought to an image pickup by a television camera 6, only a hexagonal area for surrounding a single circular object among them is set. A CPU 20 makes a window memory store its set information. On the other hand, a video signal whose synchronizing signal is separated by a synchronization separating circuit 8 is binary-coded to black and white by a binarization circuit 9. In the binary image, the number of picture elements contained in an area shown by an area signal is counted by a picture element counter 17 and given to the CPU 20, and also, a clock signal count value counted by horizontal and vertical counters 24, 27 is also given to the CPU 20, and based on these count values, the coordinate of the center of gravity of the single circular object to be recognized is derived.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は画1!?10識装置に関し、たとえばロボッ
トの視覚装置に適用され、複数の円形物体が連なってい
る場合に、そのうちの単一円形物体を認識するような画
像認識装置に関する。
[Detailed Description of the Invention] [Industrial Application Field] This invention is based on the first picture! ? The present invention relates to an image recognition device, which is applied to a robot's visual device, for example, and which recognizes a single circular object when a plurality of circular objects are connected.

[従来の技術] 第9図J3よび第10図は従来の画像認識装置によって
認識される画像の一例を示す図である。
[Prior Art] FIG. 9 J3 and FIG. 10 are diagrams showing examples of images recognized by conventional image recognition devices.

まず、第9図J3よび第10図を参照して、従来の画像
認識装置について簡単に説明する。第9図に承りように
、横型スロット1内にベアリングなどの円形物体2が複
数低連なっている場合において、そのうちの単一円形物
体2を認識する方法について説明りる。従来の画J&N
?、識装置は、スロット1内に連なっている複数の円形
物体2.2・・・をテレビカメラで撮像し、テレビカメ
ラの出力であるビデオ信号を21直化処理して、一旦画
像メモリに記憶させていた。そして、画像メモリに記憶
した画像データをソフト処理により、第10図に示すよ
うに、複数の円形物体2.2・・・の輪郭を抽出し、各
円形物体ごとに分類ラベリングしていた。
First, a conventional image recognition device will be briefly described with reference to FIG. 9 J3 and FIG. 10. As shown in FIG. 9, when a plurality of circular objects 2 such as bearings are arranged in a row in the horizontal slot 1, a method for recognizing a single circular object 2 among them will be explained. Conventional painting J&N
? , the identification device images a plurality of circular objects 2.2... connected in a slot 1 with a television camera, processes the video signal output from the television camera into 21 format, and temporarily stores it in an image memory. I was letting it happen. Then, by software processing the image data stored in the image memory, the contours of a plurality of circular objects 2, 2, . . . are extracted, and each circular object is classified and labeled, as shown in FIG.

[発明が解決しようどする問題点] 従来の画像認識装置では、上述のごとく、2値化した画
像データを−H画像メモリに記憶し、各円形物体の輪郭
を抽出し、ラベリングのlζめの処理が必要であるため
、大容量のバッファメモリが必要となる。しかも、一旦
バッファメLりに画像データを取込み、1画素ごとに読
出しおよび演算を行なう必要があるため、処理時間が0
.5secないし1 sec程度かかり、処理時間が長
くなってしまうという問題点があった。
[Problems to be Solved by the Invention] As described above, in the conventional image recognition device, the binarized image data is stored in the -H image memory, the outline of each circular object is extracted, and the lζth point of labeling is performed. Since processing is required, a large capacity buffer memory is required. Moreover, since it is necessary to first import image data into a buffer memory and then read and calculate each pixel, the processing time is reduced to zero.
.. There was a problem in that it took about 5 seconds to 1 second, resulting in a long processing time.

それゆえに、この発明の主たる目的は、大容量の画像メ
モリを必要とせず、極めて短時間に円形物体の画1象を
認識できるような画像認識装置を提供することである。
Therefore, the main object of the present invention is to provide an image recognition device that can recognize a single image of a circular object in an extremely short time without requiring a large capacity image memory.

[問題点を解決するための手段] この発明に係る画像認vJc装置は、複数の円形物体を
撮像して濃淡画像を表ねずビデオ信号を出力する撤象手
段と、湿間された搬像領域のうら、複数の円形物体のう
ちの認識すべき単一円形物体を囲む領域を表わす信号を
発生ずる領域信号発生手段と、1静像手段から出力され
たビデオ信号を2値化処理して縦横複数の画素よりなろ
2値画像を生成する2値処理手段と、2値画像のうち領
域信号で表、F″)される領域内に含まれる画素数を4
数する計数手段と、その計数結果に基づいて、認識しよ
うとする単一円形物体の重心座標を演けする演算処理手
段とから構成される。
[Means for Solving the Problems] The image recognition vJc device according to the present invention includes a retraction means that images a plurality of circular objects and outputs a video signal without displaying a gray scale image, and a damped image carrier. At the back of the area, an area signal generating means for generating a signal representing an area surrounding a single circular object to be recognized among the plurality of circular objects, and a video signal output from the static image means are binarized. A binary processing means that generates a binary image from a plurality of vertical and horizontal pixels, and a binary processing means that calculates the number of pixels included in an area of the binary image that is expressed by an area signal (F'') to 4.
The apparatus is comprised of a counting means for counting, and an arithmetic processing means for calculating the coordinates of the center of gravity of a single circular object to be recognized based on the counting results.

[作用] この発明の画像認識装置では、複数の円形物体をl1i
l象し、出力されたビデオ信号82直化し、認識し」;
うとする甲−円形物体を囲む領域内にJ、iける2(ム
画像の画素数を計数し、その計数出力に基づいて単一円
形物体の重心座標を演算する。
[Operation] In the image recognition device of the present invention, a plurality of circular objects can be
image, convert the output video signal 82, and recognize it.
The number of pixels of the image is counted within the area surrounding the circular object to be captured, and the coordinates of the center of gravity of the single circular object are calculated based on the counted output.

[発明の実施例] 第2図はこの発明の詳細な説明するための図であり、第
3図はこの発明の一実施例におけるビデオ信号のタイム
チャートである。
[Embodiment of the Invention] FIG. 2 is a diagram for explaining the invention in detail, and FIG. 3 is a time chart of a video signal in an embodiment of the invention.

まず、第2図J3よび第3図を参照して、この発明の原
理について説明する。第2図において、縦横の各枡目は
画素を示しており、各画素には水平座標アドレスX1.
X2・・・×2.6および垂直座標アドレスY1.Y2
・・・Y256が割当てられる。
First, the principle of the present invention will be explained with reference to FIG. 2 J3 and FIG. 3. In FIG. 2, each vertical and horizontal grid represents a pixel, and each pixel has a horizontal coordinate address X1.
X2...×2.6 and vertical coordinate address Y1. Y2
...Y256 is assigned.

画a30は物体7を1lfa 像しT iI′7たビT
 J’ fir 号を2値化処理して求めた2IfJi
iiii像であって、たとえば物体7の部分が黒画素、
行田部分が白画素として表わされている。なお、第2図
において、Gは画像30の重心を示していで、その座標
(XG 、 YG)は次の第(1)ないし第(3)式で
示すごとく、Σの関数式として表わされろ。
Image a30 is a 1lfa image of object 7.
2IfJi obtained by binarizing the J' fir number
iii image, for example, the object 7 is a black pixel,
The Gyoda portion is represented as a white pixel. In FIG. 2, G indicates the center of gravity of the image 30, and its coordinates (XG, YG) can be expressed as a function of Σ as shown in the following equations (1) to (3).

なお、画像30は2値画像であるから、前述の濃度の重
み関数r(Xl、Y、)は、次のm(3)式で表わされ
るごとく、11 Q II 、  II i 11のい
ずれかの値をとる。
Note that since the image 30 is a binary image, the density weighting function r(Xl, Y,) described above is either 11 Q II or II i 11 as expressed by the following m(3) formula. Takes a value.

上述のごとく、第(1)式ないし第(3)式において、
ΣY、−N、  は垂直座標アドレスに関する1次モー
メントであり、4・・N、、42;X、は水平座標アド
レスに関する0次モーメントであり、ΣY ・ΣX1は
水平・垂直座標アドレスに関す鳴   J      
・ す る相関モーメントであり、第2図に示す実施例において
、それぞれモーメントの具体例が図の左右両側に表わし
である。
As mentioned above, in equations (1) to (3),
ΣY, -N, is the first moment regarding the vertical coordinate address, 4...N,,42;
- In the embodiment shown in FIG. 2, specific examples of the moments are shown on both the left and right sides of the figure.

第2図に示した実施例の場合、ビデオ信号の各水平走査
ラインごとに2ffl!画像30の水平座標アドレスに
関するO次モーメントN、  ;!′3よび1次モーメ
ントΣx1をハード的に求め、次の水平走査ラインで垂
直座標アドレスに関する1次モーメントY、  N、 
 をソフF〜的に降出するととしに、各水平走査ライン
ごとに有効垂直走査期間にわたる累積加算値ΣN、、Σ
Y、  N・ 、ΣΣX+ 、ΣYjJ   JJ  
J ΣX、をそれぞれ求め、次の垂直帰線消去期間に前述の
累積加算値に基づいて、第(1)ないし第(3)式の演
陣を実行して、重心Gの座標(XG 。
For the embodiment shown in FIG. 2, 2ffl! for each horizontal scan line of the video signal! The O-th moment N regarding the horizontal coordinate address of the image 30, ;! '3 and the first moment Σx1 are determined by hardware, and the first moments Y, N, regarding the vertical coordinate address are determined in the next horizontal scanning line.
Assuming that Σ is descended in a soft F~ manner, the cumulative addition value ΣN,, Σ over the effective vertical scanning period for each horizontal scanning line is
Y, N・, ΣΣX+, ΣYjJ JJ
J Σ

Yc )をソフト的に算出する。Yc) is calculated using software.

第3図はこの発明の一実施例におけるビデオ信号のタイ
ムヂャートであって、特に、第3図(a )は垂直走査
期間におけるビデオ信号VD、を示し、第3図(b)は
水平走査期間にa3けるビデオ信号HD、を示している
。また、第3図において、VDは垂直同期信号を示し、
1−IDは水平同期信号を示し、1垂直走査期間(16
,6μsec >は201−1(但し、11−1は1水
平走査期間を意味し、635μsecである)の垂直帰
線消去期間と、残りの有効垂直走査期間とから層成され
ている。この有効垂直走査期間には、242本の水平走
査ラインを含み、また各水平走査ラインには、256個
の画素データを含んでいる。なお、第3図において、Y
l、Y2 、Y−・・・Y24□は第2図における垂直
座標アドレスに対応し、Xl、X2 、X−・・・×2
5Gは水平座標アドレスに対応している。
FIG. 3 is a time chart of the video signal in an embodiment of the present invention, in particular, FIG. 3(a) shows the video signal VD in the vertical scanning period, and FIG. 3(b) shows the video signal VD in the horizontal scanning period. A3 video signal HD is shown. In addition, in FIG. 3, VD indicates a vertical synchronization signal,
1-ID indicates a horizontal synchronization signal, and one vertical scanning period (16
, 6 μsec> is made up of a vertical blanking period of 201-1 (where 11-1 means one horizontal scanning period, which is 635 μsec) and the remaining effective vertical scanning period. This effective vertical scanning period includes 242 horizontal scanning lines, and each horizontal scanning line includes 256 pixel data. In addition, in Fig. 3, Y
l, Y2, Y-...Y24□ correspond to the vertical coordinate address in FIG. 2, Xl, X2, X-...×2
5G supports horizontal coordinate addresses.

第1図はこの発明の一実施例の具体的なブロック図であ
る。まず、第1図を参照して、この発明の一実施例の構
成について説明する。テレビカメラ6は物体7をたとえ
ば上方から搬像するものであって、物体7の濃淡画像を
表わすビデオ信号を出力する。このビデオ信号は同期分
離回路8に与えられ、同期分離回路8はそのビデオ信号
から水平同期信号HDおよび垂直同期信号VDを分離す
るとともに、クロック信号CKを発生し、同期信号の分
離されたビデオ信号を21a化回路9に与える。2値化
回路9は予め定められたスレッショルドレベルに基づい
て、ビデオ信号を各フィールドごとに白黒2直化して2
値画像パターン信号を出力する1、この2値画像パター
ン信号はビデオ合成回路10を介してビデオモニタ11
に与えられるとともに、ANDゲート16の一方入力端
に与えられる。
FIG. 1 is a concrete block diagram of an embodiment of the present invention. First, the configuration of an embodiment of the present invention will be described with reference to FIG. The television camera 6 conveys an image of the object 7, for example from above, and outputs a video signal representing a grayscale image of the object 7. This video signal is given to a sync separation circuit 8, which separates a horizontal sync signal HD and a vertical sync signal VD from the video signal, generates a clock signal CK, and generates a video signal from which the sync signal is separated. is given to the 21a conversion circuit 9. The binarization circuit 9 converts the video signal into black and white for each field based on a predetermined threshold level.
A binary image pattern signal is outputted to a video monitor 11 via a video synthesis circuit 10.
and one input terminal of the AND gate 16.

アドレスカウンタ12は垂直同期信号VDによってリセ
ットされ、クロック信号GKを計数し、水平方向のアド
レスを割数する。このアドレスカウンタ12の計数出力
はマルチプレクサ13を介してウィンドメモリ14に与
えられ、このウィンドメモリ14のアドレスを指定する
。このウィンドメモリ14は後述の第4図に示す複数の
円形物体31ないし33のうち単一の円形物体32を囲
むウィンド34を示V領域情報を記憶づるものである。
The address counter 12 is reset by the vertical synchronizing signal VD, counts the clock signal GK, and divides the horizontal address. The count output of this address counter 12 is given to the window memory 14 via the multiplexer 13, and specifies the address of this window memory 14. This window memory 14 stores V area information indicating a window 34 surrounding a single circular object 32 among a plurality of circular objects 31 to 33 shown in FIG. 4, which will be described later.

ウィンドメモリ14力日ら出力された領域情報は前述の
ANDゲー1−16の他方入力端に与えられるとともに
ビデオ合成回路10を介してビデオモニタ11に与えら
れる。したがって、ビデオモニタ11には、複数の円形
物体31ないし33の画像とウィンド34の画像とが表
示されることになる。
The area information output from the window memory 14 is applied to the other input terminal of the AND game 1-16, and is also applied to the video monitor 11 via the video synthesis circuit 10. Therefore, the images of the plurality of circular objects 31 to 33 and the image of the window 34 are displayed on the video monitor 11.

水1Lカウンタ24は1)0述の水平座標アドレスを割
当てるためのものであって、水平同期信号HDの立下が
りから、たとえば10画素分に相当する時間経過後より
クロック信号CKの計数を開始する。水平カウンタ24
の計数出力は加算器25に与えられ、加算器25の出力
はバッファ26に与えられる。バッファ26の出力はI
loに与えられるとともに、加n器25にも与えられる
。この加算器25およびバッファ26は、黒画素が存在
する水平座標アドレスについて、その累積加E[lff
4X1を求めてCPU20に出力するためのものであっ
て、水平カウンタ24の計数1fix+ とバッファ2
6の内容とを累積的に加算する。
The water 1L counter 24 is for 1) allocating the horizontal coordinate address mentioned in 0, and starts counting the clock signal CK after a time corresponding to, for example, 10 pixels has elapsed from the fall of the horizontal synchronization signal HD. . horizontal counter 24
The counting output of is given to an adder 25, and the output of the adder 25 is given to a buffer 26. The output of the buffer 26 is I
It is given to the adder 25 as well as to the adder 25. The adder 25 and buffer 26 calculate the cumulative addition E[lff
This is for calculating 4X1 and outputting it to the CPU 20, and it uses the count 1fix+ of the horizontal counter 24 and the buffer 2.
The contents of 6 are cumulatively added.

前述のANDゲート16はウィンド34内に含まれる画
素信号を出力するものであって、その出力を画素カウン
ター7と加算器25とに与える。
The aforementioned AND gate 16 outputs the pixel signal included in the window 34, and supplies the output to the pixel counter 7 and the adder 25.

画素カウンター7は1水平走査ラインごとに、ウィンド
34に囲まれた円形物体31ないし33を構成する画素
(この実施例では黒画素)の数を計数するためのもので
あって、その計数値N、はI1018を介してCPU2
0に与えられる。なお、前述のバッファ26の出力ΣX
141水平走査ラインごとに、l1018を介してC,
PU20に(jえられる。CPU20はこれらのデータ
に基づいて、所定の演算を98理を実行し、画像の重心
Gの座標(XG 、 Ya )を求める。
The pixel counter 7 is for counting the number of pixels (black pixels in this embodiment) constituting the circular objects 31 to 33 surrounded by the window 34 for each horizontal scanning line, and the count value N , is sent to CPU2 via I1018
given to 0. Note that the output ΣX of the buffer 26 mentioned above
For every 141 horizontal scan lines, C,
Based on these data, the CPU 20 executes a predetermined calculation using 98 principles to obtain the coordinates (XG, Ya) of the center of gravity G of the image.

なお、設定スイッチ1つはウィンドメモリ14に記憶さ
れるウィンド34を設定するものであって、この設定ス
イッチ19によって設定された領域情報はl1018を
介してCPU20に与えられる。CPU20は設定スイ
ッチ19で設定された領域表わす領域情報をP/S変換
器15を介してウィンドメモリ14に与える。なお、F
 ROMg2は重心座標を求めるための一連のプログラ
ムを記憶し、RAM23は各種データを記憶するほか、
処理を実行するためのワークエリアを含んで構成されて
いる。また、通信制御部21はCPU20による演算結
果を上位の制御器へ送信するものである。
Note that one setting switch sets the window 34 stored in the window memory 14, and the area information set by this setting switch 19 is given to the CPU 20 via l1018. The CPU 20 provides area information representing the area set by the setting switch 19 to the window memory 14 via the P/S converter 15. In addition, F
ROMg2 stores a series of programs for determining the coordinates of the center of gravity, and RAM23 stores various data.
It consists of a work area for executing processing. Further, the communication control unit 21 is for transmitting the calculation results by the CPU 20 to a higher-level controller.

第4図および第5図はこの発明の一実施例にJ:って認
識しようとする円形画像の一例を示す図であり、第6図
はこの発明の一実施例の具体的な動作を説明するだめの
フロー図である。
4 and 5 are diagrams showing an example of a circular image to be recognized as J: in an embodiment of the present invention, and FIG. 6 illustrates a specific operation of the embodiment of the present invention. It is a flow diagram of the process.

次に、第1図ないし第6図を参照して、この発明の一実
施例の具体的な動作について説明する。
Next, with reference to FIGS. 1 to 6, a specific operation of an embodiment of the present invention will be described.

まず、第4図に承り円形物体31ないし33が連なった
物体7をテレビカメラ6で搬像する。このとき、設定ス
イッチ19を操作して、単一の円形物体32を囲む六角
形のウィンド34を表わす領域を設定する。設定スイッ
チ19によって設定された設定情報はl1018を介し
てCPU20にりえられる。CPU20はその設定情報
に基づいて、領域情報をP /’ S変換器15に与え
る。P/S変換器15はその領域情報をパラレルシリア
ル変換してウィントメ七り14に記憶さぼる。
First, as shown in FIG. 4, an object 7 consisting of a series of circular objects 31 to 33 is imaged by the television camera 6. At this time, the setting switch 19 is operated to set an area representing a hexagonal window 34 surrounding the single circular object 32. Setting information set by the setting switch 19 is sent to the CPU 20 via l1018. The CPU 20 provides area information to the P/'S converter 15 based on the setting information. The P/S converter 15 converts the area information from parallel to serial and stores it in the window memory 14.

一方、テレビカメラ6から出力されたビデオ信号は同期
分離回路8に与えられ、水平同期信号1−IDと垂直同
期信号VDが分離されるとともに、り[lツク信号CK
が発止される。同期信号の分離されたビデオ信号は同期
分離回路8から2値化回路9にL7えられ、この2値化
回路9によってビデオ信号が白黒21a化され、2 +
fi化画像バクーン信号が出力される。この2値化画像
パターン信号はビデオ合成回路1oを介してビデオモニ
ター1に表示されるとともに、ANDゲート16の一方
入力端に与えられる。
On the other hand, the video signal output from the television camera 6 is given to the synchronization separation circuit 8, where the horizontal synchronization signal 1-ID and vertical synchronization signal VD are separated, and the
will be issued. The video signal from which the synchronization signal has been separated is sent from the synchronization separation circuit 8 to the binarization circuit 9 (L7), which converts the video signal into black and white 21a, and converts it into black and white 21a.
A fi image Bakun signal is output. This binary image pattern signal is displayed on the video monitor 1 via the video synthesis circuit 1o, and is also applied to one input terminal of the AND gate 16.

一方、アドレスカウンター2はクロック信号CKを馴致
し、マルチプレクサ13を介してその8!数出力をウィ
ンドメモリー4に勺える。それによって、ウィンドメモ
リー4からは第4図に示ずウィンド34を表わす領域情
報が出力される。この領域情報はビデオ合成回路10を
介してビデオモニタ11に与えられるとともに、AND
ゲート16を開く。したがって、ビデオモニター1には
、第4図に示づ−ように、連なった円形物体31ないし
33と単一の円形物体32を囲む・ウィンド34が表示
されることになる。J、た、ANDゲート16は1水平
走査ラインごとにウィンド34に囲よれる画素信8を出
力して画素カウンター7と加弾器25とに与える。画素
カウンター7はウィンド34に囲まれた画素数を4故し
、その51枚(直N・を、l1018を介してCPU2
0に与える。また、水平カウンタ24はクロック信号C
Kを計数し、その計数jiff X +を加算器25に
与える。そして、加算器25の出力がバッファ26に記
憶され、その出力写×1が加算器25に与えられるとと
もに、l1018を介してCPU20に与えられる。
On the other hand, the address counter 2 receives the clock signal CK and passes it through the multiplexer 13 to the 8! Sends a number output to window memory 4. As a result, area information representing the window 34 (not shown in FIG. 4) is output from the window memory 4. This area information is given to the video monitor 11 via the video synthesis circuit 10, and
Open gate 16. Therefore, a series of circular objects 31 to 33 and a window 34 surrounding a single circular object 32 are displayed on the video monitor 1, as shown in FIG. The AND gate 16 outputs a pixel signal 8 surrounded by a window 34 for each horizontal scanning line and supplies it to the pixel counter 7 and the accelerator 25. The pixel counter 7 calculates the number of pixels surrounded by the window 34 as 4, and outputs the 51 pixels (direct N) to the CPU 2 via the l1018.
Give to 0. The horizontal counter 24 also receives a clock signal C.
K is counted and the count jiff X + is given to the adder 25. Then, the output of the adder 25 is stored in the buffer 26, and the output copy x1 is given to the adder 25 and also to the CPU 20 via l1018.

さらに、垂直カウンタ27は水平同期信号1−I Dを
計数し、その計数値Y、を、l1018を介してCPU
20に与える。
Further, the vertical counter 27 counts the horizontal synchronizing signal 1-ID, and transmits the counted value Y to the CPU via l1018.
Give 20.

次に、第4図および第6図を参照して、単一円形物体3
2の重心を演算する方法について説明する。第4図<a
 >に示す六角形のウィンド34に囲まれた単一円形物
体32およびその両側の円形物体31および33の一部
の21自画象パターンに含まれる画素数を1水平走査ラ
インごとに計数すると、第4図(b)に示すような分布
になる。第4図(b)に示すに1は画像ノイズを除去す
るためのしきい値であり、K2はピーク値を判別するた
めのしきい値である。また、0点からA点および8点か
らD点は単一円形物体32に含まれる画素数であり、A
点から[3点の間は単一円形物体32とウィンド34で
囲まれた円形物体31および33の一部の画素数との合
計であり、0点とA点との間J3よび8点とD点との間
に比べ一部、画素数の増加および減少する割合が大きく
なっている。
Next, referring to FIGS. 4 and 6, the single circular object 3
A method for calculating the center of gravity of 2 will be explained. Figure 4<a
>If we count the number of pixels included in the 21 self-portrait pattern of the single circular object 32 surrounded by the hexagonal window 34 and parts of the circular objects 31 and 33 on both sides of it for each horizontal scanning line, The distribution will be as shown in Figure 4 (b). As shown in FIG. 4(b), 1 is a threshold value for removing image noise, and K2 is a threshold value for determining a peak value. Further, points 0 to A and points 8 to D are the number of pixels included in the single circular object 32, and A
From the point [3 points is the sum of the number of pixels of the single circular object 32 and some of the circular objects 31 and 33 surrounded by the window 34, and between the 0 point and the A point are the points J3 and 8. Compared to point D, the rate of increase and decrease in the number of pixels is greater in some areas.

そこで、この発明では、画素数の増加または減少の割合
が直前の1水平走査ラインにa3ける画素数の増加また
は減少よりも大きくなったとき、すなわちA点と8点ど
の間にお(プる画素数のバー数を禁止し、0点とA点と
の間J3よび8点とD点との間の画素数のみを計数する
ようにしている。
Therefore, in the present invention, when the rate of increase or decrease in the number of pixels is greater than the increase or decrease in the number of pixels in the previous one horizontal scanning line a3, that is, between point A and point 8, The number of bars for the number of pixels is prohibited, and only the number of pixels between the 0 point and the A point J3 and between the 8 point and the D point are counted.

今、Y4番目の水平走査ラインについて、画素カウンタ
ー7による黒画素の計数動作が完了した時点を想定する
と、まずCPU20はステップ(図示ではSPと略称す
る)で画素カウンター7の計数値N、を読取る。そして
、ステップSP2において、読取った計数III N 
、がしきい値に1を越えたか否かを判別づる。N・かに
1を越えていれば、ステップSP3においてエンドフラ
グがセットされているか否かを判別する。このエンドフ
ラグは1水平ラインごとに画素数を計数し、第4図(b
 )に示すD点までの画素数を計数したとぎにセラi〜
されるらのであり、初期状態ではセットされていない。
Now, assuming that the pixel counter 7 has completed counting black pixels for the Y4th horizontal scanning line, the CPU 20 first reads the count value N of the pixel counter 7 in step (abbreviated as SP in the figure). . Then, in step SP2, the read count III N
, exceeds a threshold value of 1 or not. If N.Crab exceeds 1, it is determined in step SP3 whether or not the end flag is set. This end flag counts the number of pixels for each horizontal line, and is calculated by counting the number of pixels for each horizontal line.
) After counting the number of pixels up to point D shown in
It is not set in the initial state.

このため、ステップSP4に進む。Therefore, the process advances to step SP4.

ステップSP4に13いて、直前の1水平走査ラインに
お(Jる画素数NFと次の1水平走査ラインにおける画
素数N、の差ΔNを演算する。初期状態においては、直
前の1水平走査ラインにおける画素数N F IL O
であるため、ΔNはN、−3となる。
At step SP4, the difference ΔN between the number of pixels NF in the previous horizontal scanning line and the number N of pixels in the next horizontal scanning line is calculated. Number of pixels N F IL O
Therefore, ΔN becomes N, -3.

そして、ステップSP5において、画素数の差ΔNが第
4図(1))に示す画素数のピーク点におけるしさ゛い
l1lJ1<2よりも小さいかJ、たけ等しいか否かを
判別ザる。ΔN≦]く2であれば、計@直N。・が画素
数のピーク値であると判別する。しかし、この時点では
ピーク1直に達していないので、ステップSP6に進む
Then, in step SP5, it is determined whether the difference ΔN in the number of pixels is smaller than or equal to the threshold l1lJ1<2 at the peak point of the number of pixels shown in FIG. 4 (1) by J. If ΔN≦]ku2, total @ direct N.・ is determined to be the peak value of the number of pixels. However, since peak 1 has not yet been reached at this point, the process proceeds to step SP6.

ステップSP6にa3いて、画素数の差ΔNが直前の画
素数の差ΔN F にりも大きいかまたは等しいか盃か
をfす別する。△NがΔNFよりし大きいときには、第
4図(1))に示す0点になるが、初期状態においては
ΔN「は0であるため、ステップSP7に進む。ステッ
プSP7において、INト1フラグがセットされている
か否かを判別する。
At step SP6 a3, it is determined whether the difference ΔN in the number of pixels is greater than or equal to the difference ΔN F in the number of pixels immediately before. When ΔN is larger than ΔNF, it becomes 0 point as shown in FIG. Determine whether it is set.

このI N l−1フラグは第4図(b)に示づ−A点
と8点との間を走査するとぎにセットされるしのであり
、その間における画素数のJ1数を禁止することを表わ
すものである。初期状態にJ3いては、INト1フラグ
がヒツトされていないので、ステップSP8に進む。ス
テップSP8においてスタートフラグをセットし、ステ
ップSP9に進む。
This I N l-1 flag is set when scanning between point A and point 8, as shown in FIG. It represents. In the initial state J3, the IN 1 flag is not hit, so the process advances to step SP8. A start flag is set in step SP8, and the process proceeds to step SP9.

ステップSP9にJ3いて、計数値N、を累栢加粋し、
累積加算値N(iiff記ΣN、に対応づる)を演算し
て、RAM23に記憶させる。ざらに、CPU20はス
テップ5P10において、重心カウンタ27の計数値Y
、を読取る。この時点では、垂直カウンタの計数値はY
lになっている。
At step SP9, J3 accumulates the count value N,
A cumulative addition value N (corresponding to iiff notation ΣN) is calculated and stored in the RAM 23. Roughly, in step 5P10, the CPU 20 calculates the count value Y of the center of gravity counter 27.
, read. At this point, the count value of the vertical counter is Y
It has become l.

CPU20はステップ3P11にJ3いて、禦積加陣値
NT・ (前記3Y、NJ  に対応づ′る)を演いし
て、その演算結末をRAM23に記憶させる。
The CPU 20 goes to step 3P11, performs the product addition value NT· (corresponding to the above-mentioned 3Y, NJ), and stores the calculation result in the RAM 23.

ステップSP12に43いて、バッファ26の内容ΣX
、 t  (Xi 、 Y、  >を読出し、ステップ
SPυ 13においてそ累積加算値NT2  (前記ΣΣX。
At step SP12, the contents of the buffer 26 ΣX
, t (Xi, Y, > is read out, and in step SPυ13, the cumulative addition value NT2 (the above ΣΣ

・f(Xi、Y、)に対応する)を潰砕する。そして、
ステラ7SP 14ニJ−;イT、 画素r!IN、 
 @直前の画素数NFとし、画素数の差△Nを直前の画
素数の差ΔNFとして設定Jる。さらに、ステップSP
15において、垂直カウンタ27の計数値Y、が’ 2
42 ”に達したか否か、すなわち最」 柊の242番目の水平走査ラインについてステップSP
1ないしSPl 4の処理が完了したか否かを判別する
。ここでは、まだ1番目の水平走査ラインについてステ
ップSPIないしSPl 4の処理が完了しただけであ
るため、次の割込lNT1があるまで待機し、その割込
があると、前述のステップSP1ないし5P15の動作
をti返ず。
- Crush f(corresponding to Xi, Y, )). and,
Stella 7SP 14 ni J-; i T, pixel r! IN,
@The previous number of pixels NF is set, and the difference ΔN in the number of pixels is set as the difference ΔNF in the previous number of pixels. Furthermore, step SP
15, the count value Y of the vertical counter 27 is '2
Step SP for the 242nd horizontal scanning line of Hiiragi
It is determined whether the processing from SP1 to SP14 is completed. Here, since the processing of steps SPI to SPl 4 has only been completed for the first horizontal scanning line, the process waits until the next interrupt lNT1, and when that interrupt occurs, the steps SP1 to 5P1 described above are completed. The operation of ti is not returned.

上述のステップS P 1ないしSPl 5の動作を繰
返し、第4図(b)に示す0点からA点までの画素数を
計数し、次の水平走査ラインの処理において、ステップ
SP6で画素数の差ΔNが直前の画素数の差ΔNFより
も大きいことを判別すると、ステップSP16にJ3い
て、I N I−1フラグをセットする。そし、ステッ
プSP1 /lに進み、その水平走査ラインにおける画
素数N−を直前の画素数NFとして設定し、ステップS
P15に進む。そして、次の水平走査ラインでは、ステ
ップSP7においてI N Hフラグがセットされてい
ることを判別し、ステップ8ないしステップ5P13の
処理を実行けず、直接ステップ5P14に進む。寸なわ
ら、第4図(b)に示すA点からビークJ:ではステッ
プSP8ないしSPI 3の実行を行なわない。
The operations of steps SP1 to SP15 described above are repeated to count the number of pixels from point 0 to point A shown in FIG. 4(b), and in processing the next horizontal scanning line, the number of pixels is counted in step SP6. When it is determined that the difference ΔN is larger than the previous difference ΔNF in the number of pixels, the process goes to step SP16 J3 and sets the I N I-1 flag. Then, proceed to step SP1/l, set the number of pixels N- in that horizontal scanning line as the immediately preceding number of pixels NF, and proceed to step S
Proceed to P15. Then, in the next horizontal scanning line, it is determined in step SP7 that the I N H flag is set, and the processing in steps 8 to 5P13 cannot be executed, and the process directly proceeds to step 5P14. However, steps SP8 to SPI3 are not executed from point A to beak J shown in FIG. 4(b).

画素数差ΔNがピーク点のしきい値に2よりも小さくな
ったことをステップSP5で判別すると、ステップSP
I 7に准み、画素数の差ΔNが直前の画素数の差ΔN
Fよりも小さくなったか否かを判別する。ピーク点を越
える水XIL走査ラインにおける画素数の差ΔNは直前
の画素数の差ΔNFよりも小さくなっていないので、直
ちにステップ5P14に進む。この動作を繰返し、第1
図(b)に示ずB点に達すると、画素数のXΔNが直前
の画素数の差ΔNFよりも小さくなるので、ステップS
P17でそれを判別し、ステップ5P18においてI 
N l−1フラグをリセットする。
When it is determined in step SP5 that the pixel number difference ΔN has become smaller than the peak point threshold value 2, step SP
Similar to I7, the difference ΔN in the number of pixels is the difference ΔN in the number of pixels immediately before.
It is determined whether or not it has become smaller than F. Since the difference ΔN in the number of pixels in the water XIL scan line exceeding the peak point is not smaller than the difference ΔNF in the number of pixels immediately before, the process immediately proceeds to step 5P14. Repeat this operation and
When reaching point B (not shown in figure (b)), the number of pixels XΔN becomes smaller than the difference ΔNF between the previous numbers of pixels, so step S
It is determined in P17, and I is determined in step 5P18.
Reset the Nl-1 flag.

すなわち、B点を越えると、B点とD点との間は単一円
形物体32の画素数のみであるため、ステップSP9な
いし5P13の動作を実行する。
That is, once point B is exceeded, the distance between point B and point D is only the number of pixels of the single circular object 32, so the operations of steps SP9 to 5P13 are executed.

そして、D点に至ると、画素数N がしきい値K1より
も小さくなるので、それをステップSP2で判別し、ス
テップ5P22においてスタートフラグのセットされて
いることを判別し、ステップ5P23においてエンドフ
ラグをレットタ”る。エンドフラグがセラ1−されると
、次の水平走査ラインの処理では、ステップSP3にお
いてエンドフラグがセットされていることを判別し、ス
テップSP14に進み、前)ホのステップSP4ないし
5P13のり」作を実行しない。そして、垂直カウンタ
27の)11数値が242になると、ステップ5P15
でそれを判別し、ステップSP19に進む。
When the point D is reached, the number of pixels N becomes smaller than the threshold value K1, so this is determined in step SP2, the start flag is determined to be set in step 5P22, and the end flag is flagged in step 5P23. When the end flag is set to 1-, in the processing of the next horizontal scanning line, it is determined in step SP3 that the end flag is set, and the process proceeds to step SP14, and the process proceeds to step SP4 of the previous step (E). Or 5P13 paste" is not executed. Then, when the vertical counter 27)11 value becomes 242, step 5P15
This is determined in step SP19, and the process proceeds to step SP19.

ステップ5P19において、前)蚤のステップ5P11
で求めた累槓加口値NT、とステップSP9で求めた累
積加障値Nとに基づいて、重心GのY座標Yaoを演算
し、RAM23に記憶さける。
In step 5P19, previous) flea step 5P11
The Y coordinate Yao of the center of gravity G is calculated based on the cumulative addition value NT obtained in step SP9 and the cumulative addition value N obtained in step SP9, and is stored in the RAM 23.

さらに、ステップ5P20において、ステップ5P13
で求めた累積加n1直NT2とステップSP9で求め1
.:累梢加詐値Nとに堪づいて、重心GのX座標XGO
を演算して、RAM23に記憶さぼる。さらに、ステッ
プ5P21において、各累積加算値N、NT+ 、NT
2などをクリアして一連の動作を終了する。
Furthermore, in step 5P20, step 5P13
Cumulative addition n1 direct NT2 obtained in step SP9 and 1 obtained in step SP9
.. : Based on the cumulative addition value N, the X coordinate of the center of gravity G is XGO.
is calculated and stored in the RAM 23. Furthermore, in step 5P21, each cumulative addition value N, NT+, NT
2, etc., and complete the series of operations.

第5図はこの発明の他の実施例によって認識される画像
の一例を示V図である。
FIG. 5 is a V diagram showing an example of an image recognized by another embodiment of the present invention.

前述の第4図に示したウィンド34は六角形の領域で単
一円形物体32を囲むようにしたが、この第5図に示し
た実施例では、十字形の領域からなるウィンド35にに
って111−の円形物体32を囲むとともに、両側の円
形物体31おj、び33の大部分を囲むようにした乙の
である。このようなウィンド35を用いることにJ、す
、第5図(b )に示Jにうに、0点からA点までの画
素数の変化に比べて、Δ点から怠激に画素数が増+11
1 L、、また8点では急激に画素数が減少するため、
前述の第6図に示したステップSP6および5P17に
おりる判断をより正確にやりやすくなるという効果かあ
る。なお、十字形の領域からなるウィンド35は第1図
に示した設定スイッチ1つによって任意の形状で設定で
きる。
Although the window 34 shown in FIG. 4 previously had a hexagonal area surrounding the single circular object 32, in the embodiment shown in FIG. 111- and most of the circular objects 31, 33 on both sides. By using such a window 35, as shown in FIG. 5(b), the number of pixels increases more slowly from point Δ than the change in the number of pixels from point 0 to point A. +11
1 L, and since the number of pixels decreases rapidly at 8 points,
This has the effect of making it easier to make the judgments in steps SP6 and 5P17 shown in FIG. 6 described above more accurately. Note that the window 35 consisting of a cross-shaped area can be set in any shape by using one setting switch shown in FIG.

第7図はこの梵明の他の実施例によって認識される′#
J@の一例を示す図であり、第8図は第7図に示した画
像を認識する処理動作を説明するためのフロー図である
Figure 7 is recognized by this other embodiment of Brahma'#
8 is a diagram showing an example of J@, and FIG. 8 is a flowchart for explaining the processing operation for recognizing the image shown in FIG. 7.

この第7図および第8図に示した実施例は、発光ダイオ
ードのような円形物体81ないし83が垂直方向に連な
っている場合に、中央の単一円形物体82を認識しよう
とするものである。このために、中火の円形物体82と
両側の円形物体81J3よび83の一部を囲むように四
角形の領域からなるウィンド84が設定される。そして
、ウィンド84に囲まれた画素数を層数ブると、画素数
の分mは第7図(b)に示すようになる。すなわち、円
形物体81と82の接するA点および円形物体82と8
3の接するB点はそれぞれ極小点になる。
The embodiment shown in FIGS. 7 and 8 attempts to recognize a single circular object 82 in the center when circular objects 81 to 83 such as light emitting diodes are arranged in a vertical direction. . For this purpose, a window 84 consisting of a rectangular area is set so as to surround a portion of the medium-heat circular object 82 and the circular objects 81J3 and 83 on both sides. When the number of pixels surrounded by the window 84 is multiplied by the number of layers, the number of pixels m becomes as shown in FIG. 7(b). That is, point A where circular objects 81 and 82 touch and circular objects 82 and 8
The B points where 3 touch each other become minimum points.

したがって、A点とB rmの極小点を検出し、Δ点と
B点の間の画素数を求めて所定の演算を実行すれば、甲
−円形物体82の重心Gの座標(Xa 。
Therefore, by detecting the minimum point of point A and Brm, calculating the number of pixels between point Δ and point B, and executing a predetermined calculation, the coordinate (Xa) of the center of gravity G of the circular object 82 can be obtained.

Yc )が求められることになる。なお、第7図(b)
におけるKOは極小点△、Bにおけるしきい値である。
Yc) is required. In addition, Fig. 7(b)
KO at is the threshold value at the minimum point Δ,B.

また、この実施例におけるハード構成は、前述の第1図
と同じものを用いることができ、FROM22に第8図
に示すようなプログラムを予め記憶しておけばよい。
Further, the hardware configuration in this embodiment can be the same as that shown in FIG. 1 described above, and a program as shown in FIG. 8 may be stored in the FROM 22 in advance.

次に、第8図を参照して、この実施例の具体的な動作に
ついて説明する。まず、ステップ5P31において、垂
直カウンタ27の51数出力Y、が極小点△のY、Pi
!!標アドレスYAよりも大ぎいかまたは等しくなった
か否かを判別ザる。Y、がYAよりも小さいときには、
ステップ5P32に進み、画素カウンタ17の計数値N
、を直曲の画素数NFとして設定する。ステップ5P3
3において、垂直カウンタ27の計数値Y、が極小点B
のY座標アドレスYaよりも大きいか否かを判別J”る
Next, the specific operation of this embodiment will be explained with reference to FIG. First, in step 5P31, the 51 number output Y of the vertical counter 27 is Y of the minimum point Δ, Pi
! ! It is determined whether it is greater than or equal to the target address YA. When Y is smaller than YA,
Proceeding to step 5P32, count value N of the pixel counter 17
, is set as the number of pixels NF of the straight curve. Step 5P3
3, the count value Y of the vertical counter 27 is the minimum point B.
It is determined whether the Y coordinate address Ya is larger than the Y coordinate address Ya.

この状態では、Y、がYaよりも小さいので、次の割込
INT2があるまで待機する。次の割込INT2が入る
と、館述のステップ5P31ないし5P33の動作を繰
返ず。そして、垂直カウンタ27の計数値Y、が極小点
AのY座標アドレスY4に一致すると、ステップ5P3
4に進み、画素カウンター7の計数1直N、を読取り、
ステップS」 P35において、画素カウンター7の計数出力である画
素数N・ と直曲の画素数NFとの差ΔNをυ 求める。
In this state, since Y is smaller than Ya, the process waits until the next interrupt INT2 occurs. When the next interrupt INT2 is input, the operations of steps 5P31 to 5P33 described in the description are not repeated. Then, when the count value Y of the vertical counter 27 matches the Y coordinate address Y4 of the minimum point A, step 5P3
Proceed to step 4, read the count 1N of the pixel counter 7,
In step S P35, the difference ΔN between the number of pixels N· which is the count output of the pixel counter 7 and the number of pixels NF of the straight curve is determined.

ステップ5P36にJ3いて、エンドフラグがセラ]〜
されているか否かを判別し、エンドフラグのしツーへさ
れていないことを判別すると、ステップ5P37におい
て、エツジフラグがセットされているか否かをYIJ別
する。ここではエツジフラグがセットされていないので
、ステップ5P38において画素数N、が極小点Aのし
きい値KOよりも小さいか盃かを判別する。そして、N
、がKOよりも小さいことを判別すると、極小点Δにお
ける画素数を引数したしのと判断し、ステップ5P39
においてエツジフラグをセットする。
J3 is at step 5P36 and the end flag is Sera]~
When it is determined that the end flag has not been set, it is determined in step 5P37 whether or not the edge flag is set. Since the edge flag is not set here, it is determined in step 5P38 whether the number of pixels N is smaller than the threshold value KO of the minimum point A or if it is a cup. And N
, is smaller than KO, it is determined that the number of pixels at the minimum point Δ is the argument, and step 5P39
Set the edge flag at .

さらに、ステップ5P32および5P33の子力作を実
行し、次の割込[NT2が入ると、ステップ5P31な
いし5P36の動作を実行りろ。そして、ステップ5P
37において、エツジフラグのセットされたことを判別
し、ステップS P 40においてスタートフラグがセ
ットされたか否かを判別する。ここではスタートフラグ
がレットされていないので、ステップSP/11におい
て画素数の差ΔNがしきい値に1と等しいかまたは大き
くなったか否かを判別する。ΔN lfi K 1より
5大きくなったことを判別ザるど、ステップSP/I 
2にj3いてスタートフラグをヒツトする。すなわら、
極小点へをγり別すると、前述の第6図に示したステッ
プSP9ないし5P13と同様の動作をステップS P
 43ないし5P47で実行りろ。Jなりら、CPU2
0は累栢加囲値N、NT、およびNT2を累積ait停
ずろ。
Furthermore, execute the child operations of steps 5P32 and 5P33, and when the next interrupt [NT2 occurs, execute the operations of steps 5P31 to 5P36. And step 5P
In step S37, it is determined whether the edge flag has been set, and in step SP40, it is determined whether or not the start flag has been set. Since the start flag is not set here, it is determined in step SP/11 whether the difference ΔN in the number of pixels is equal to or larger than the threshold value 1. After determining that ΔN lfi K is 5 greater than 1, step SP/I
2 and hit the start flag. In other words,
After determining γ to the minimum point, steps SP9 to 5P13 shown in FIG. 6 described above are performed.
Run it with 43 or 5P47. J Nara, CPU2
0 is the cumulative ait stop of the cumulative addition values N, NT, and NT2.

次の水平走査ラインにおいては、スタートフラグが既に
セットされたので、ステップS P /I Oにおいて
スタートフラグのセラ1−されたことを判別し、ステッ
プ5P48においてトップフラグがセラl−されたか否
かを判別する。1〜ツブフラグはまだセットされていな
いので、ステップ5P49において画素数の差ΔNがO
と等しいかまたは小さいか否かを判別する。ΔN /)
t Oど等しいかあるいは小さくなったときには、円形
物体82の中心の画素数を目数したことになるので、ス
テップ5P50においてトップフラグをセットする。
In the next horizontal scanning line, since the start flag has already been set, it is determined in step S P /I O that the start flag has been set, and in step 5P48 it is determined whether the top flag has been set or not. Determine. Since the 1 to Tsubu flag has not been set yet, the difference ΔN in the number of pixels is determined to be O in step 5P49.
Determine whether it is equal to or less than. ΔN/)
When tO is equal to or smaller, the number of pixels at the center of the circular object 82 has been counted, so a top flag is set in step 5P50.

トップフラグがセットされると、次の水平走査ラインに
おいては、ステップ5P48にJ3いてトップフラグの
レットされたことを判別し、ステップ5P51において
画素数の差ΔNがしきい値に1と等しいかまたは大己′
りなったが否かを判別する。ΔNが1〈1よりも大きけ
れば、前述のステップ5P43ないし5P47の処理を
実行づ“る。ΔNかに1よりも小さくなったときには極
小点已にjヱしたものと判別し、ステップ5P52にお
いてエンドフラグをセットする。そして、ステップ5P
32に進み、画素数N を直前の画素数NFとしてレッ
トJ′る。
When the top flag is set, in the next horizontal scanning line, it is determined in step 5P48 that the top flag has been set, and in step 5P51, it is determined whether the difference ΔN in the number of pixels is equal to the threshold value 1 or Daiki'
Determine whether or not it has occurred. If ΔN is larger than 1, the processing in steps 5P43 to 5P47 described above is executed. When ΔN is smaller than 1, it is determined that the minimum point has been reached, and the end is executed in step 5P52. Set the flag. Then, step 5P
Proceed to step 32, where the number of pixels N is set as the previous number NF of pixels and let J' is executed.

ステップS P 33において垂直カウンタ27のY座
標アドレスが極小点BのY座標アドレスYaに達したも
のと判別すると、ステップ5P53において重心GのY
座標アドレスYcを演算し、ステップ5P54において
重心GのXアドレスXGを演算する。さらに、ステップ
5P55において、RAM23に記憶した各累積加算値
N、NTI 。
If it is determined in step S P33 that the Y coordinate address of the vertical counter 27 has reached the Y coordinate address Ya of the minimum point B, the Y coordinate address of the center of gravity G is determined in step S P53.
The coordinate address Yc is calculated, and the X address XG of the center of gravity G is calculated in step 5P54. Furthermore, in step 5P55, each cumulative addition value N, NTI stored in the RAM 23.

NT2などがクリアされる。NT2 etc. are cleared.

[発明の効果] 以上のように、この発明によれば、それぞれが連なった
複数の円形物体を[1し、そのビデオ出力を2値化して
2値画像信号を1gで、複数の円形物体のうちの1つの
円形物体を囲む領域内の画素数を1水平走査ラインごと
に計数し、その4故出力に基づいて、認識しJ:うとす
る91−円形物体の重心座標を演算するようにしたので
、従来の」、うに撮像した画像データを画像メモリに記
憶させる必要がなく、しかも1フイールドで単一円形物
体の重心座標を演算することができる。したがって、大
容量の画1象メモリを設ける必要がなく、しかも短時間
で111−円形物体を認識することができる。
[Effects of the Invention] As described above, according to the present invention, a plurality of circular objects, each of which is connected to another, is converted to The number of pixels in the area surrounding one of the circular objects is counted for each horizontal scanning line, and based on the output, the barycentric coordinates of the circular object to be recognized are calculated. Therefore, there is no need to store image data captured in the conventional manner in an image memory, and the coordinates of the center of gravity of a single circular object can be calculated in one field. Therefore, there is no need to provide a large-capacity image memory, and the 111-circular object can be recognized in a short time.

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

第1図はこの発明の一実施例の具体的なブロック図であ
る。第2図はこの発明の詳細な説明するための図である
。第3図はこの発明の一実施例におけるビデオ信号のタ
イムヂャートである。第4図はこの発明の一実施例によ
って認識しようとりる画像の一例を示す図である。第5
図はこの発明の他の実施例によって認識しJ:うとする
画像の一例を示す図である。第6図はこの発明の一実施
例の具体的な動作を説明するためのフロー図である。 第7図はこの発明の他の実施例ににって認識しようとJ
る画像の一例を示ず図である。第8図はこの発明の他の
実施例の具体的/J動作を説明するための)1コ一図で
ある。第9図および第10図は従来の画像認識装置によ
ってルΣ識した画像の一例を承り図である。 図において、6はテレビカメラ、7は円形物体、8は同
期分離回路、9は2値化回路、10はビデオ合成回路、
11はビデオモニタ、12はアドレスカウンタ、13は
マルチブレフナ、14はウィンドメモリ、15はP/S
変換器、16はANDゲート、17は画素カウンタ、1
8は1.10.19は設定スイッチ、20はCPU、2
2はPROM、23はRAM、2/lは水平カウンタ、
25は加ri器、26はバッフ1.27は垂直カウンタ
を示づ。 (ほか2名) 第1図 第3図 PX 第4図 第5図 (a)              (b)第6図 第9図 第10図
FIG. 1 is a concrete block diagram of an embodiment of the present invention. FIG. 2 is a diagram for explaining the invention in detail. FIG. 3 is a time chart of a video signal in one embodiment of the present invention. FIG. 4 is a diagram showing an example of an image to be recognized by an embodiment of the present invention. Fifth
The figure is a diagram showing an example of an image to be recognized by another embodiment of the present invention. FIG. 6 is a flowchart for explaining the specific operation of one embodiment of the present invention. FIG.
FIG. 3 is a diagram showing an example of an image. FIG. 8 is a single diagram for explaining the specific /J operation of another embodiment of the present invention. FIGS. 9 and 10 are diagrams showing examples of images recognized by a conventional image recognition device. In the figure, 6 is a television camera, 7 is a circular object, 8 is a synchronization separation circuit, 9 is a binarization circuit, 10 is a video synthesis circuit,
11 is a video monitor, 12 is an address counter, 13 is a multi-branch, 14 is a window memory, and 15 is a P/S.
Converter, 16 is an AND gate, 17 is a pixel counter, 1
8 is 1.10.19 is setting switch, 20 is CPU, 2
2 is PROM, 23 is RAM, 2/l is horizontal counter,
25 is a stimulator, 26 is a buffer 1, and 27 is a vertical counter. (2 others) Figure 1 Figure 3 PX Figure 4 Figure 5 (a) (b) Figure 6 Figure 9 Figure 10

Claims (4)

【特許請求の範囲】[Claims] (1)複数の円形物体が連なつている場合に、そのうち
の単一円形物体を認識するための画像認識装置であつて
、 前記複数の円形物体を撮像して、濃淡画像を表わすビデ
オ信号を出力する撮像手段と、 前記撮像手段で撮像される撮像領域のうち、前記複数の
円形物体のうちの認識すべき単一円形物体を囲む領域を
表わす信号を発生する領域信号発生手段と、 前記撮像手段から出力されたビデオ信号を2値化処理し
て、縦横複数の画素よりなる2値画像を生成する2値処
理手段と、 前記2値処理手段によつて生成された2値画像のうち、
前記領域信号発生手段から発生された領域信号で表わさ
れる領域内の画素数を計数する計数手段と、 前記計数手段の計数出力に基づいて、前記認識しようと
する単一円形物体の重心座標を演算する演算処理手段と
を備えた、画像認識装置。
(1) An image recognition device for recognizing a single circular object among a plurality of circular objects when they are connected, which captures images of the plurality of circular objects and generates a video signal representing a grayscale image. an area signal generating means for generating a signal representing a region surrounding a single circular object to be recognized among the plurality of circular objects in an imaging area imaged by the imaging means; Binary processing means for binarizing the video signal output from the means to generate a binary image consisting of a plurality of vertical and horizontal pixels; and a binary image generated by the binary processing means;
a counting means for counting the number of pixels in the area represented by the area signal generated by the area signal generating means; and calculating the coordinates of the center of gravity of the single circular object to be recognized based on the count output of the counting means. An image recognition device comprising an arithmetic processing means that performs.
(2)前記演算処理手段は、前記計数手段の計数出力に
基づいて、前記単一円形物体における垂直方向の計測範
囲を選択して、前記重心座標を演算するようにした、特
許請求の範囲第1項記載の画像認識装置。
(2) The arithmetic processing means selects a measurement range in the vertical direction of the single circular object based on the count output of the counting means, and calculates the center of gravity coordinates. The image recognition device according to item 1.
(3)前記演算処理手段は、前記計数手段の計数出力に
基づいて、1水平走査ラインごとの画素数の最小点から
最小点までの垂直領域を選択して計測することにより、
前記単一円形物体の重心座標を演算するようにした、特
許請求の範囲第1項記載の画像認識装置。
(3) The arithmetic processing means selects and measures a vertical region from the minimum point to the minimum point of the number of pixels for each horizontal scanning line based on the count output of the counting means,
The image recognition device according to claim 1, wherein the image recognition device calculates the coordinates of the center of gravity of the single circular object.
(4)前記演算処理手段は、 前記ビデオ信号の各水平走査ラインごとに2値画像の水
平座標アドレスに関する0次モーメントおよび1次モー
メントを演算する手段と、前記ビデオ信号の各水平走査
ラインごとに2値画像の垂直座標アドレスに関する1次
モーメントを演算する手段と、 前記各モーメントのそれぞれについて、垂直走査期間に
おける累積加算値を演算する手段と、前記演算された累
積加算結果に基づいて、前記単一円形物体の重心を算出
する手段とを含む、特許請求の範囲第1項ないし第3項
のいずれかに記載の画像認識装置。
(4) The arithmetic processing means includes means for calculating a zero-order moment and a first-order moment regarding the horizontal coordinate address of the binary image for each horizontal scanning line of the video signal, and for each horizontal scanning line of the video signal. means for calculating a first-order moment with respect to a vertical coordinate address of a binary image; means for calculating a cumulative addition value in a vertical scanning period for each of the moments; 4. The image recognition device according to claim 1, further comprising means for calculating the center of gravity of a circular object.
JP61009746A 1986-01-20 1986-01-20 Image recognizing device Pending JPS62168290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61009746A JPS62168290A (en) 1986-01-20 1986-01-20 Image recognizing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61009746A JPS62168290A (en) 1986-01-20 1986-01-20 Image recognizing device

Publications (1)

Publication Number Publication Date
JPS62168290A true JPS62168290A (en) 1987-07-24

Family

ID=11728869

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61009746A Pending JPS62168290A (en) 1986-01-20 1986-01-20 Image recognizing device

Country Status (1)

Country Link
JP (1) JPS62168290A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04169979A (en) * 1990-09-11 1992-06-17 Sankyo Seiki Mfg Co Ltd Work decision device
JP2011180660A (en) * 2010-02-26 2011-09-15 Advanced Telecommunication Research Institute International Area-dividing device, area division program area division method and communication robot

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57206987A (en) * 1981-06-15 1982-12-18 Hitachi Ltd Optical character reader

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57206987A (en) * 1981-06-15 1982-12-18 Hitachi Ltd Optical character reader

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04169979A (en) * 1990-09-11 1992-06-17 Sankyo Seiki Mfg Co Ltd Work decision device
JP2011180660A (en) * 2010-02-26 2011-09-15 Advanced Telecommunication Research Institute International Area-dividing device, area division program area division method and communication robot

Similar Documents

Publication Publication Date Title
US10970807B2 (en) Information processing apparatus and storage medium
TW200301867A (en) Method and apparatus for determining relative movement in an optical mouse
JP2004535610A (en) System and method for robust separation of foreground and background image data for determination of the position of an object in front of a controllable display in a camera view
JP2015194901A (en) Track device and tracking system
JPS628072B2 (en)
JP5264457B2 (en) Object detection device
JPS62168290A (en) Image recognizing device
JP4676385B2 (en) Image composition method, image composition apparatus, and image composition program
JPH07234938A (en) Image position and motion detecting method
JP2019192048A (en) Imaging apparatus
JPS62172486A (en) Picture recognition device
JPS5838721B2 (en) Gazoushiyorihouhou
JPH0214387A (en) Plural peak points detecting system
JP2783917B2 (en) Image address generating apparatus and image address generating method
JPWO2021220893A5 (en)
JPH0474907A (en) Displacement measuring apparatus
JPS62111368A (en) Main axial angle detector
JPS623309A (en) Spindle angle detector
JP2000348199A (en) Method and device for texture mapping
JP3562871B2 (en) Image processing device
JPH04216179A (en) Picture processor
JPH0820215B2 (en) Digital image perimeter measuring device
JPH08272929A (en) Moving body three-dimensional position extraction device
JPH07175932A (en) Image processor
JPH08171642A (en) Picture recognition method