JPH0426514B2 - - Google Patents
Info
- Publication number
- JPH0426514B2 JPH0426514B2 JP60180344A JP18034485A JPH0426514B2 JP H0426514 B2 JPH0426514 B2 JP H0426514B2 JP 60180344 A JP60180344 A JP 60180344A JP 18034485 A JP18034485 A JP 18034485A JP H0426514 B2 JPH0426514 B2 JP H0426514B2
- Authority
- JP
- Japan
- Prior art keywords
- circuit
- scanning line
- runs
- holes
- input
- 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.)
- Expired - Lifetime
Links
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Image Analysis (AREA)
Description
【発明の詳細な説明】
本発明は、テレビジヨンカメラ等の映像信号か
ら画像内に存在する物体の個数及び穴数を計数す
る方式に関するものである。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a method for counting the number of objects and holes present in an image from a video signal from a television camera or the like.
最近、製品の自動検査やロボツトの視覚装置等
に画像処理技術が使われてきているが、高速に物
体の個数・穴数を計数することが大切な画像処理
技術の1つとなつている。 Recently, image processing technology has been used for automatic product inspection and robot vision devices, and one of the important image processing technologies is to quickly count the number of objects and holes.
たとえば、プレス打ち抜き部品のように高速に
大量生産される製品を画像処理で自動検査するに
は、1画面に多数の製品をまとめて写して高速に
個数を計数する必要がある。このとき同時に、プ
レスで打ち抜くべき穴があかなかつたり隣接した
穴がつながつてしまうなどの不良を検出するた
め、1画面中の貫通穴の総数を計数する。1個の
製品に存在すべき貫通穴の数は既知なので、画面
中の製品個数から存在すべき貫通穴の総数が算出
でき、この値と穴数計数結果が一致しないとき不
良品があると判定する。このような場合には、物
体の個数の計数と同時に穴数の計数も必要にな
る。 For example, in order to automatically inspect products that are mass-produced at high speed, such as press-cut parts, by image processing, it is necessary to display a large number of products on one screen and count the number of products at high speed. At the same time, the total number of through holes in one screen is counted in order to detect defects such as holes that should be punched with a press being incomplete or adjacent holes being connected. Since the number of through holes that should exist in one product is known, the total number of through holes that should exist can be calculated from the number of products on the screen, and if this value does not match the hole count result, it is determined that there is a defective product. do. In such a case, it is necessary to count the number of holes at the same time as counting the number of objects.
物体の個数及び穴数を計数する機能は、計算機
のソフトウエアで実現することができるが、処理
速度が遅いという問題がある。また処理速度を高
めるためハードウエアによる計数方式が提案され
ているが、物体に穴があつた場合、誤つた計数を
するという問題がある。たとえば、第1図に示す
ように各画素において4近傍のラプラシアンLを
とり、ラプラシアンLが零より小さいときは−
1、零のときは零、零より大きいときは+1と
し、その総和を4で割つた値を物体の個数とする
方法であるが、第1図bに示すように物体に穴が
1つ存在する場合は上記結果は零となり物体の固
数と一致しない。さらに穴の数が物体の数より多
数ある場合は、上記結果は負の値になるという欠
点がある。即ち、上記従来方法は個数の計数では
なく{(個数)−(穴数)}の計数である。 The function of counting the number of objects and the number of holes can be realized by computer software, but there is a problem that the processing speed is slow. In addition, hardware-based counting methods have been proposed to increase processing speed, but there is a problem in that if there is a hole in an object, it will result in incorrect counting. For example, as shown in Fig. 1, take the Laplacian L of four neighbors at each pixel, and if the Laplacian L is smaller than zero, -
1. When the number is zero, it is set as 0, and when it is larger than zero, it is set as +1, and the total sum divided by 4 is used as the number of objects, but as shown in Figure 1b, there is one hole in the object. In this case, the above result will be zero and will not match the solid number of the object. Furthermore, if the number of holes is greater than the number of objects, the above result has a negative value. That is, the above conventional method does not count the number of holes, but counts {(number of holes) - (number of holes)}.
また穴があると誤つた計数をするので前処理と
して穴を埋める方法が提案されているが、ハード
ウエア処理を行なつても1画面につき1回の走査
では実現できず、複数回の走査が必要となり、処
理速度の点で適用できないという問題がある。 In addition, since holes can lead to erroneous counts, a method has been proposed to fill in the holes as preprocessing, but even with hardware processing, this cannot be achieved with one scan per screen, and multiple scans are required. However, there is a problem in that it cannot be applied in terms of processing speed.
従つて、本発明の目的は、上記欠点をなくし、
非常に簡単な処理で高速に画像内の物体の個数及
び穴数を数え上げることができる個数・穴数計数
方式を提供することにある。 It is therefore an object of the present invention to eliminate the above-mentioned disadvantages and to
To provide a number/hole counting method capable of counting the number of objects and holes in an image at high speed with very simple processing.
以下、図面に従つて本発明を詳細に説明する。 Hereinafter, the present invention will be explained in detail with reference to the drawings.
第2図は、本発明の原理を説明するための画像
信号波形の1例である。同図中aは3個の物体を
含みそのうち1個に穴が1つ存在するような入力
画像を2値化した波形、bは現走査線と前走査線
の論理積をとつた波形、cは前走査線において
“1”のつながりである1つのランが現走査線に
おいて2つに分れたとき、後に位置するランを示
し、記憶回路に記憶するための波形、dはcで検
出したランが次の走査においてつながつているか
否かを判定するために前走査線の情報を読み出し
た波形、eは前走査線における1つのランが現走
査線において2つに分れた時、前に位置するラン
の情報として記憶回路に記憶するために1画素分
前に再生される波形、fはd同様の波形、gは前
走査線における2つのランが現走査線において1
つになつたとき出力される波形、hはdの波形と
fの波形さらにgの波形の3つの論理積をとつた
波形を、それぞれ示すものである。なお同図中破
線は2値化波形と対比するために記入したもので
あり信号は“0”である。 FIG. 2 is an example of an image signal waveform for explaining the principle of the present invention. In the figure, a is a waveform obtained by binarizing an input image containing three objects, one of which has a hole, b is a waveform obtained by ANDing the current scanning line and the previous scanning line, and c indicates the run located after when one run, which is a series of "1"s in the previous scanning line, is divided into two in the current scanning line, and is the waveform to be stored in the memory circuit, and d is the waveform detected at c. The waveform used to read out the information of the previous scanning line to determine whether the runs are connected in the next scanning, e is the waveform used when one run in the previous scanning line is divided into two in the current scanning line. A waveform that is reproduced one pixel earlier to be stored in the memory circuit as information about the currently located run, f is a waveform similar to d, and g is a waveform that is reproduced one pixel before in order to be stored in the memory circuit as information about the currently located run.
The waveforms outputted when the current is reached are the waveforms obtained by performing the logical product of the d waveform, the f waveform, and the g waveform, respectively. Note that the broken line in the figure is drawn for comparison with the binarized waveform, and the signal is "0".
第3図および第4図は本発明の1実施例の回路
図である。 3 and 4 are circuit diagrams of one embodiment of the present invention.
第3図において、1は画像を入力するカメラ、
2は背景を“0”とし物体を“1”とする2値化
回路、3は1走査線分のシフトレジスタ、4a,
4bは2ビツト分のシフトレジスタ、5は各入力
の論理積をとるアンド回路、6は第4図で詳細に
説明する穴検出回路、7a,7b,7cはそれぞ
れ入力が“0”から“1”に変化するときカウン
トアツプし16ビツト出力する計数回路、8は各入
力をx,y,zとするとき(x−y+z)なる演
算を行う演算回路、9は入力画像より同期信号を
分離する同期信号分離回路、10は貫通穴のある
複数の物体が置かれたパレツトをカメラの下方を
経由して順送するパレツト搬送装置を、それぞれ
示すものである。 In FIG. 3, 1 is a camera that inputs images;
2 is a binarization circuit that sets the background to "0" and the object to "1"; 3 is a shift register for one scanning line; 4a,
4b is a 2-bit shift register, 5 is an AND circuit that takes the AND of each input, 6 is a hole detection circuit, which will be explained in detail in FIG. 8 is an arithmetic circuit that performs the calculation (x-y+z) when each input is x, y, z, and 9 separates the synchronization signal from the input image. A synchronization signal separation circuit 10 indicates a pallet conveying device for sequentially conveying a pallet on which a plurality of objects having through holes are placed via a position below the camera.
第4図は第3図の6に示した穴検出回路の1例
を示すもので、61,71はi1端子が“1”でi2
端子が“1”から“0”に変化したとき“1”を
出力し、i1端子が“0”であるときは常に“0”
を出力するフリツプフロツプ回路、62a,62
b,72,73は各入力の論理積をとるアンド回
路、63a,63bは各入力の論理和をとるオア
回路、64a,64b,64cは入力の反転をす
るノツト回路、65a,65b,65cは入力が
“0”から“1”に変つた時点から一定時間のパ
ルスを出力するワンシヨツト回路、66a,66
bはs端子が“0”のときには端子i1の入力が端
子o1に出力され端子i2の入力が端子o2に出力さ
れ、s端子が“1”のときには端子i1の入力が端
子o2に出力され端子i2の入力が端子o1に出力され
るセレクト回路、67は入力が“0”から“1”
に変化したとき出力が反転する2進カウンタ回
路、68a,68bは入力が“0”から“1”に
変つたときカウントアツプし10ビツト出力する計
数回路、69a,69bはs端子が“0”のとき
にはio端子の入力がo端子に出力されi端子はハ
イ,インピーダンスとなり、s端子が“1”のと
きにはi端子の入力がio端子に出力されo端子は
ハイ,インピーダンスとなるようなスリーステー
トの入出力切替回路、70a,70bは1走査線
分の情報が記憶できる記憶回路を、それぞれ示す
ものである。6−2の回路構成は6−1とまつた
く同様である。ただし、6−1中に示した入力
I1,I2,I3をそれぞれ(2)側に接続した回路が
6−2である。 Figure 4 shows an example of the hole detection circuit shown in 6 in Figure 3. 61 and 71 are terminals i1 and i2 which are "1".
Outputs “1” when the terminal changes from “1” to “0”, and always outputs “0” when the i1 terminal is “0”.
Flip-flop circuits 62a, 62 that output
b, 72, 73 are AND circuits that take the AND of each input; 63a, 63b are OR circuits that take the OR of each input; 64a, 64b, 64c are not circuits that invert the input; 65a, 65b, 65c are One-shot circuit 66a, 66 that outputs a pulse for a certain period of time from the time the input changes from "0" to "1"
When the s terminal is "0", the input of the terminal i1 is output to the terminal o1, the input of the terminal i2 is output to the terminal o2, and when the s terminal is "1", the input of the terminal i1 is output to the terminal o2, and the terminal A select circuit in which the input of i2 is output to terminal o1, 67 has an input from "0" to "1"
68a and 68b are binary counter circuits whose output is inverted when the input changes from "0" to "1", counting circuits that count up and output 10 bits when the input changes from "0" to "1", and 69a and 69b are counter circuits whose s terminal is "0" When , the input of the io terminal is output to the o terminal and the i terminal becomes high and impedance, and when the s terminal is "1", the input of the i terminal is output to the io terminal and the o terminal becomes high and impedance. The input/output switching circuits 70a and 70b respectively represent storage circuits capable of storing information for one scanning line. The circuit configuration of 6-2 is exactly the same as that of 6-1. However, the input shown in 6-1
The circuit in which I1, I2, and I3 are each connected to the (2) side is 6-2.
かかる構成によつて、以下に説明する如くし
て、1画面の入力が終了した後即座に物体の個数
及び穴数が計数できる。 With this configuration, as described below, the number of objects and the number of holes can be counted immediately after the input of one screen is completed.
第3図において、パレツト搬送装置10の1つ
のパレツトの画像をカメラ1でとらえる。このと
きパレツト上には複数の物体が置かれており、貫
通穴のある物体も含まれている。カメラ1からの
入力信号を2値化回路2により背景を論理“0”
とし物体を論理“1”とするように2値化し、シ
フトレジスタ3,4a,4bにより2×2の局所
領域画像を抽出し、この2×2局所領域画像のう
ちの現走査線上の1画素(同図面中のC画素)を
計数回路7aに入力し、“0”から“1”への変
化点を計数することにより、1画面内のランの数
を計数する。第2図aの例では、計数値xは31と
なる。また前走査線(第3図中のA画素)と現走
査線(第3図中のC画素)の論理積をアンド回路
5で求めて計数回路7bに入力し、同様に“0”
から“1”への変化点を計数する。第2図bにカ
ウンタ7bへの入力波形を示すが、この場合カウ
ンタ7bの計数値yは29となる。この計数値xと
yの差(31−29=2)は、従来の技術でも求めら
れる{(物体の個数)−(穴数)}であるが、この値
に以下で詳細に説明する穴検出回路6の出力を計
数回路7cで計数した値即ち穴数を加える事によ
り、物体の個数を算出できる。即ち、演算回路8
の出力N1が物体の個数であり、計数回路7cの
出力N2が穴数である。 In FIG. 3, an image of one pallet of the pallet conveying device 10 is captured by the camera 1. At this time, a plurality of objects are placed on the pallet, including objects with through holes. The input signal from the camera 1 is converted into a logic “0” by the binarization circuit 2.
Then, the object is binarized so as to have a logic "1", a 2x2 local area image is extracted using the shift registers 3, 4a, and 4b, and one pixel on the current scanning line of this 2x2 local area image is (C pixel in the figure) is input to the counting circuit 7a and the number of runs in one screen is counted by counting the points of change from "0" to "1". In the example of FIG. 2a, the count value x is 31. Also, the AND circuit 5 calculates the AND of the previous scanning line (pixel A in FIG. 3) and the current scanning line (pixel C in FIG. 3), inputs it to the counting circuit 7b, and similarly outputs "0".
Count the points of change from to "1". FIG. 2b shows the input waveform to the counter 7b; in this case, the count value y of the counter 7b is 29. The difference between the counted values x and y (31-29=2) is {(number of objects) - (number of holes)}, which can also be obtained using conventional technology, but this value can also be calculated using hole detection, which will be explained in detail below. By adding the output of the circuit 6 to the value counted by the counting circuit 7c, that is, the number of holes, the number of objects can be calculated. That is, the arithmetic circuit 8
The output N1 of is the number of objects, and the output N2 of the counting circuit 7c is the number of holes.
以下に、穴の検出方法について説明する。 Below, a method for detecting holes will be explained.
第5図に穴を検出する原理を示す。即ち、図中
a部に示すように前走査線における1つのランが
現走査線において2つのランに分ける位置をとら
え、次の走査でそれぞれのランが図中b,c部に
示すように、つながつていくことを確認し、それ
ぞれつながつてきた2つのランが図中d部に示す
ように1つのランになつた時、つながつてきた2
つのランに挟まれてきた論理“0”の領域はもは
や背景と連結することはありえないので穴と認識
し1パルス出力する。これを実現するための1回
路例が第4図であり、回路6−1は第5図中に示
すa部をとらえb部を確認する回路、回路6−2
は第5図中に示すa部をとらえc部を確認する回
路、回路6−3は第5図中に示すd部をとらえる
回路、回路6−4は上記3つの出力の論理積をと
るアンド回路である。このアンド回路の出力パル
ス数が、穴の数と一致する。 Figure 5 shows the principle of hole detection. That is, as shown in section a in the figure, one run in the previous scanning line captures the position where the current scanning line is divided into two runs, and in the next scan, each run is divided into two runs as shown in sections b and c in the figure. Confirm that they are connected, and when the two connected runs become one run as shown in section d in the figure, the two connected runs
Since the area of logic "0" sandwiched between two runs can no longer be connected to the background, it is recognized as a hole and one pulse is output. An example of a circuit for realizing this is shown in FIG. 4, where circuit 6-1 is a circuit that captures part a and confirms part b shown in FIG. 5, and circuit 6-2
is a circuit that captures part a and confirms part c shown in Figure 5, circuit 6-3 is a circuit that captures part d shown in Figure 5, and circuit 6-4 is an AND circuit that takes the AND of the above three outputs. It is a circuit. The number of output pulses of this AND circuit matches the number of holes.
以下に、更に詳細にその動作を第4図をもとに
説明する。 The operation will be explained in more detail below with reference to FIG.
フリツプ,フロツプ61とアンド回路62aの
構成により、前走査線の1つのランが現走査線に
おいて2つ以上に分れたとき、出力が“1”とな
る。第2図の例では同図cのd走査線に示すよう
にパルスが出力される。この情報は、オア回路6
3bをとおり現走査線が奇数ラインのときは入出
力切替回路69aをとおり記憶回路70aに記憶
され、現走査線が偶数ラインのときは、入出力切
替回路69bをとおり記憶回路70bに記憶され
る。このときのアドレスは現走査線のC画素の情
報をもとに、ノツト回路64b,セレクト回路6
6b,計数回路68bあるいは68aにより決め
られ、書き込み信号は、現走査線のD画素の情報
から、ノツト回路64a,ワンシヨツト回路65
a,オア回路63a,セレクト回路66aによつ
てランの終りの画素のとき1パルス出力される。
即ち、第2図cのd走査線の例ではアドレス1,
2,4には“0”が書き込まれ、アドレス3,5
には“1”が書き込まれる。この記憶された情報
は次の走査のとき該当する位置で読み出される。
即ち、奇数ラインのときは記憶回路70bから読
み出され、偶数ラインのときは記憶回路70aか
ら読み出され、入出力切替回路69bあるいは6
9aをとおりアンド回路62bの入力となる。読
み出されるアドレスは前走査線のA画素の情報を
もとにセレクト回路66b,計数回路68a(あ
るいは68b)により決められ、読み出し信号は
前走査線のA画素の情報をもとにワンシヨツト回
路65b,セレクト回路66aにより前走査線の
ランの始まりの画素のときに1パルス出力され
る。第2図dにその状態を示すが、走査線eにお
いて第1,2,4番目のランでは“0”であるの
で出力なし、第3,5番目のランでは“1”であ
るので前走査線のランの始まりから“1”が出力
され、現走査線と前走査線において共にランが存
在しなくなるまで“1”が保たれる。この出力が
アンド回路62bの一方の入力で他方の入力は現
走査線のC画素の情報である。従つて、アンド回
路62bの出力は先にとらえたランが現走査線に
おいてつながつているとき“1”、つながつてい
ないとき“0”となる。この情報は再びオア回路
63b,入出力切替回路69aあるいは69bをと
おり記憶回路70aあるいは70bに記憶され
る。以下同様に繰返すことにより、第2図dのf
以下の走査線に示すように同図cで抽出されたラ
ンとつながつてきている場合“1”となり、つな
がりが切れると“0”となる。これにより穴が始
まり後方に位置するランのつながりが検出でき
る。 Due to the configuration of the flip/flop 61 and the AND circuit 62a, when one run of the previous scanning line is divided into two or more runs in the current scanning line, the output becomes "1". In the example of FIG. 2, pulses are output as shown in the d scanning line of c in the same figure. This information is OR circuit 6
3b, and when the current scanning line is an odd line, it passes through the input/output switching circuit 69a and is stored in the storage circuit 70a, and when the current scanning line is an even numbered line, it passes through the input/output switching circuit 69b and is stored in the storage circuit 70b. . At this time, the address is determined by the not circuit 64b and the select circuit 6 based on the information of the C pixel of the current scanning line.
6b, the counting circuit 68b or 68a, and the write signal is determined from the information of the D pixel of the current scanning line by the not circuit 64a and the one shot circuit 65.
a, the OR circuit 63a, and the select circuit 66a output one pulse when the pixel is at the end of the run.
That is, in the example of the d scanning line in FIG. 2c, addresses 1,
“0” is written to addresses 2 and 4, and addresses 3 and 5
“1” is written to. This stored information is read out at the appropriate location during the next scan.
That is, when the line is an odd number, it is read out from the memory circuit 70b, and when it is an even line, it is read out from the memory circuit 70a, and the input/output switching circuit 69b or 6
9a and becomes an input to the AND circuit 62b. The read address is determined by the select circuit 66b and the counting circuit 68a (or 68b) based on the information of the A pixel of the previous scanning line, and the read signal is determined by the one shot circuit 65b, based on the information of the A pixel of the previous scanning line. The select circuit 66a outputs one pulse at the start pixel of the run of the previous scanning line. The state is shown in Figure 2 d. In the 1st, 2nd, and 4th runs in the scanning line e, there is no output because it is "0", and in the 3rd and 5th runs it is "1", so there is no output "1" is output from the start of a line run, and "1" is maintained until no run exists in both the current and previous scan lines. This output is one input of the AND circuit 62b, and the other input is information on the C pixel of the current scanning line. Therefore, the output of the AND circuit 62b becomes "1" when the previously captured runs are connected in the current scanning line, and becomes "0" when they are not connected. This information passes through the OR circuit 63b and the input/output switching circuit 69a or 69b again and is stored in the storage circuit 70a or 70b. By repeating the same procedure, f in Fig. 2 d
As shown in the scanning line below, it becomes "1" if it is connected to the run extracted in c of the figure, and becomes "0" if the connection is broken. This makes it possible to detect the connection of runs located at the rear, starting from the hole.
次に穴が始まり前方に位置するランのつながり
の検出であるが、基本的には上記の説明と同様で
ある。ただ1つ大きく異なる点は、第2図eに示
すようにランが2つに分れて穴が始まると判るの
は後方に位置しているランが現われたときであつ
て、前方のランが存在しているときは判らない。
その状態で、穴の始まりであるという情報を1つ
前のアドレスに書込まなければならない。これを
解決するに、回路6−2に示すようにI1,I2の入
力を回路6−1の入力より1画素分先に再生され
るB,D画素とし、穴の始まりを1画素分先にと
らえ記憶回路のアドレスが変る前にその情報を抽
出し記憶する。I3は、このときの書き込みパルス
を生成するための入力である。第2図eのd走査
線に示すように、この場合第3番目のランの情報
をアドレス2に、第5番目の情報をアドレス4に
記憶する。即ち、アドレス1,3,5は“0”、
アドレス2,4は“1”となる。次の走査におい
て、この2,4番目のランとつながつているラン
の抽出方法は前記と全く同様であり、その出力波
形は第2図fのようになる。これにより穴が始ま
り前方に位置するランのつながりが検出できる。 The next step is to detect the connection of runs located in front of the hole starting from the hole, which is basically the same as the above explanation. The only major difference is that, as shown in Figure 2e, the run splits into two and the hole begins when the rear run appears, whereas the front run appears. I don't know when it exists.
In this state, information indicating that the hole is the beginning must be written to the previous address. To solve this problem, as shown in circuit 6-2, the inputs of I1 and I2 are set to pixels B and D, which are reproduced one pixel ahead of the input of circuit 6-1, and the beginning of the hole is set one pixel ahead of the input of circuit 6-1. The information is extracted and stored before the address of the capture memory circuit changes. I3 is an input for generating a write pulse at this time. In this case, the information of the third run is stored at address 2 and the information of the fifth run is stored at address 4, as shown in scan line d in FIG. 2e. That is, addresses 1, 3, and 5 are “0”,
Addresses 2 and 4 become "1". In the next scan, the method of extracting runs connected to the second and fourth runs is exactly the same as described above, and the output waveform is as shown in FIG. 2f. This makes it possible to detect the connection of runs located in front of the hole.
次に穴の終りをとらえるには、回路6−3に
C,A画素を入力しフリツプ,フロツプ71とア
ンド回路72により実現できる。この出力波形は
第2図gのようになる。 Next, in order to detect the end of the hole, it can be realized by inputting the C and A pixels to the circuit 6-3 and using the flip-flop 71 and the AND circuit 72. This output waveform is as shown in Fig. 2g.
以上回路6−1,6−2,6−3の3出力を回
路6−4(アンド回路73)に入力することによ
り、回路6−4の出力は第2図hに示すように、
対象物に穴が1個存在するときは1パルス出力さ
れる。穴が複数個あるときはそれと同じ数のパル
スが出力される。 By inputting the three outputs of the circuits 6-1, 6-2, and 6-3 to the circuit 6-4 (AND circuit 73), the output of the circuit 6-4 becomes as shown in FIG. 2h.
When there is one hole in the object, one pulse is output. If there are multiple holes, the same number of pulses will be output.
これにより穴数が計数でき、前述したように対
象物の個数も正確に計数できる。 This allows the number of holes to be counted, and as described above, the number of objects can also be counted accurately.
以上、詳細に説明したように、本発明によれ
ば、画面内に物体の個数及び穴数の計数を簡単な
処理で行い得ること、計数を高速で行い得るこ
と、計数装置のハードウエア構成を小型化できる
こと等の顕著な効果が得られる。 As described in detail above, according to the present invention, it is possible to count the number of objects and holes within a screen by simple processing, to perform counting at high speed, and to improve the hardware configuration of the counting device. Remarkable effects such as miniaturization can be obtained.
第1図は従来の計数方法を説明するための説明
図、第2図は本発明の処理を説明するための説明
図、第3図は本発明の1実施例の全体回路図、第
4図は本発明の穴検出回路の1実施例の回路図、
第5図は穴の検出方法を説明するための説明図で
ある。
1…カメラ、2…2値化回路、3,4a,4b
…シフトレジスタ、5…アンド回路、6…穴検出
回路、7a,7b,7c…計数回路、8…演算回
路、9…同期信号分離回路、10…パレツト搬送
装置、61,71…フリツプ,フロツプ回路、6
2a,62b,72,73…アンド回路、63
a,63b…オア回路、64a,64b,64c
…ノツト回路、65a,65b,65c…ワンシ
ヨツト回路、66a,66b…セレクト回路、6
7…2進カウンタ回路、68a,68b…計数回
路、69a,96b…入出力切替回路、70a,
70b…記憶回路。
Fig. 1 is an explanatory diagram for explaining the conventional counting method, Fig. 2 is an explanatory diagram for explaining the processing of the present invention, Fig. 3 is an overall circuit diagram of one embodiment of the present invention, and Fig. 4 is an explanatory diagram for explaining the conventional counting method. is a circuit diagram of one embodiment of the hole detection circuit of the present invention,
FIG. 5 is an explanatory diagram for explaining the hole detection method. 1...Camera, 2...Binarization circuit, 3, 4a, 4b
...Shift register, 5...AND circuit, 6...hole detection circuit, 7a, 7b, 7c...counting circuit, 8...arithmetic circuit, 9...synchronous signal separation circuit, 10...pallet transport device, 61, 71...flip, flop circuit ,6
2a, 62b, 72, 73...AND circuit, 63
a, 63b...OR circuit, 64a, 64b, 64c
...Knot circuit, 65a, 65b, 65c...One shot circuit, 66a, 66b...Select circuit, 6
7... Binary counter circuit, 68a, 68b... Counting circuit, 69a, 96b... Input/output switching circuit, 70a,
70b...Memory circuit.
Claims (1)
し、走査線上での“1”のつながりであるランの
数を1画面分計数し、同時に現走査線と前走査線
の信号の論理積をとつた結果のランの数を計数
し、更に前走査線の1つのランが、現走査線にお
いて2つのランに分れる位置を抽出し、2つに分
れたランがそれぞれ次の走査においてつながつて
いる部分を抽出し、つながつてきた2つのランが
1つのランになつたとき、穴であると認識し計数
し、以上3つの値をもとに物体の個数及び穴数を
算出することを特徴とする個数・穴数計数方式。1. Binarize the image signal obtained by scanning the image, count the number of runs that are connections of "1" on the scanning line for one screen, and at the same time calculate the logical product of the signals of the current scanning line and the previous scanning line. The number of resulting runs is counted, and the position where one run in the previous scan line is divided into two runs in the current scan line is extracted, and the two divided runs are connected in the next scan. When the two connected runs become one run, it is recognized as a hole and counted, and the number of objects and holes is calculated based on the above three values. Features a number of pieces/holes counting method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP18034485A JPS6240593A (en) | 1985-08-17 | 1985-08-17 | Number of objects and holes counting system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP18034485A JPS6240593A (en) | 1985-08-17 | 1985-08-17 | Number of objects and holes counting system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6240593A JPS6240593A (en) | 1987-02-21 |
| JPH0426514B2 true JPH0426514B2 (en) | 1992-05-07 |
Family
ID=16081581
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP18034485A Granted JPS6240593A (en) | 1985-08-17 | 1985-08-17 | Number of objects and holes counting system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6240593A (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5962994A (en) * | 1982-09-30 | 1984-04-10 | Matsushita Electric Works Ltd | Counter |
-
1985
- 1985-08-17 JP JP18034485A patent/JPS6240593A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6240593A (en) | 1987-02-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4056716A (en) | Defect inspection of objects such as electronic circuits | |
| EP0206713A2 (en) | Coarse flaw detector for printed circuit board inspection | |
| JPS62214481A (en) | Image quality judgment device | |
| JPS63265371A (en) | Diagram connecting device | |
| JPS62126487A (en) | Edge detecting circuit for binary image | |
| JPS6198272A (en) | Apparatus for detecting balling pin | |
| JPH0426514B2 (en) | ||
| JP2710527B2 (en) | Inspection equipment for periodic patterns | |
| JPS5924361B2 (en) | 2D image comparison inspection device | |
| JPS5946036B2 (en) | Multiple pattern recognition device | |
| JP2758180B2 (en) | Edge signal processing circuit | |
| JPS61205811A (en) | Defect detection method | |
| JPH0260265B2 (en) | ||
| JPH0332723B2 (en) | ||
| JPH0353382A (en) | pattern inspection equipment | |
| JP3111563B2 (en) | Inspection equipment for printed wiring boards | |
| SU1136191A2 (en) | Device for recognition of defects of images of objects | |
| EP0323760B1 (en) | Digital signal processing device | |
| JPS6162982A (en) | Musical score staff detection device | |
| JPH0371659B2 (en) | ||
| JPS6159575A (en) | Pattern inspecting system | |
| JPS63254578A (en) | Pattern recognition device | |
| JPS6280779A (en) | Character reader | |
| JPH03252545A (en) | Wiring pattern inspection device | |
| JPS62127987A (en) | Method of checking printed board pattern |