JPH0199183A - Image processor - Google Patents
Image processorInfo
- Publication number
- JPH0199183A JPH0199183A JP62256301A JP25630187A JPH0199183A JP H0199183 A JPH0199183 A JP H0199183A JP 62256301 A JP62256301 A JP 62256301A JP 25630187 A JP25630187 A JP 25630187A JP H0199183 A JPH0199183 A JP H0199183A
- Authority
- JP
- Japan
- Prior art keywords
- window
- signal
- area
- horizontal scanning
- scanning line
- 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
Links
Landscapes
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
発明の要約
TV左カメラ視野内に設定された複数の処理領域に対応
してウィンドウを設定し、これをメモリにあらかじめ記
憶しておく。カメラからの画像信号の読出しに同期して
ウィンドウを表わすウィンドウ信号を発生させる。各水
平走査線にそうウィンドウ信号中に現われる処理領域の
順序、(ター〉・をあらかじめ設定しておくとともに、
水平走査線ごとにその水平走査線で現われるウィンドウ
の順序パターンを指定するデータを設定しておく。DETAILED DESCRIPTION OF THE INVENTION [Summary of the Invention] Windows are set corresponding to a plurality of processing areas set within the field of view of a TV left camera, and these windows are stored in advance in a memory. A window signal representing a window is generated in synchronization with reading out an image signal from the camera. In addition to setting in advance the order of processing areas that appear in the window signal for each horizontal scanning line,
For each horizontal scanning line, data specifying the order pattern of windows appearing on that horizontal scanning line is set.
各水平走査線において、ウィンドウ信号と画像信号との
AND論理信号における画素数を各水平走査線上のウィ
ンドウごとに計数する。一方、各水平走査線ごとに対応
する順序パターンを読出してウィンドウの現われる順序
にしたがって、上記の計数値を各処理領域ごとに累積加
算することにより、各処理領域における画像面積データ
を得る。In each horizontal scanning line, the number of pixels in the AND logic signal of the window signal and the image signal is counted for each window on each horizontal scanning line. On the other hand, image area data for each processing area is obtained by reading out the corresponding order pattern for each horizontal scanning line and cumulatively adding the above-mentioned count values for each processing area in accordance with the order in which the windows appear.
この処理は1フイールド走査期間で終了し、しかもきわ
めて多数の(たとえば数百の)ウィンドウについて一挙
に行なえる。またメツシュ・ウィンドウのように規則正
しく配列された多数のウィンドウを設定した場合には、
上記の順序パターンの種類が少なくなるので、ウィンド
ウ順序に関するデータの圧縮が可能となり、このデータ
をストアするメモリ領域が小さくてすむ。This processing is completed in one field scanning period, and can be performed on a very large number (for example, several hundred) of windows at once. Also, if you set up many windows arranged regularly like a mesh window,
Since the number of types of order patterns described above is reduced, data related to the window order can be compressed, and the memory area for storing this data can be reduced.
発明の背景
この発明は、撮像装置(TV左カメラいしはビデオ・カ
メラ)から得られる対象物の画像信号(映像信号)を処
理して対象物の画像上における面積を演算する画像処理
装置に関する。BACKGROUND OF THE INVENTION The present invention relates to an image processing device that processes an image signal (video signal) of an object obtained from an imaging device (TV left camera or video camera) to calculate the area of the object on the image.
撮像装置を用いた目視検査装置、ロボットの目として位
置づけられる視覚センサ等においては撮像された対象物
の特徴量をいかに抽出するかということが基本的な課題
となっている。特徴量には対象物の輪郭3面積2重心位
置等がある。撮像装置の視野内に複数の対象物(または
1対象物の複数の部分)が存在する場合には、これらの
対象物(部分)ごとに特徴量を求める必要がある。A fundamental challenge in visual inspection devices using imaging devices, visual sensors that serve as the eyes of robots, and the like is how to extract the feature amounts of an imaged object. The feature amounts include the contour, area, center of gravity, and the like of the object. When multiple objects (or multiple parts of one object) exist within the field of view of the imaging device, it is necessary to obtain feature amounts for each of these objects (parts).
撮像装置の視野内に設定された複数の領域における対象
物の画像の面積を演算する場合についてみると、従来か
らシリアル処理方式とパラレル処理方式とがある。シリ
アル処理方式は、1画面の撮像ごとに1つの領域につい
て面積演算を行ない、これを複数回繰返すものである。When calculating the area of an image of an object in a plurality of areas set within the field of view of an imaging device, conventionally there are a serial processing method and a parallel processing method. In the serial processing method, area calculation is performed for one area for each image of one screen, and this is repeated multiple times.
したがって多数のすべての領域についての処理が終了す
るまでの間に時間がかかり、実時間画像処理を考えたと
きに難点がある。パラレル処理方式は各領域内の面積演
算処理を行なう回路を領域の数だけ用意して、複数の領
域における処理を一挙に行なうものである。この方式に
よると実時間処理が可能であるが、ハードウェア(上記
の回路)が膨大となり、そのスペース、コストの点で実
用性に問題がある。Therefore, it takes a long time to finish processing all the areas, which is a problem when considering real-time image processing. In the parallel processing method, as many circuits as there are regions are prepared to perform area calculation processing in each region, and processing in a plurality of regions is performed at once. Although real-time processing is possible according to this method, the amount of hardware (the circuit described above) is enormous, and there are problems with practicality in terms of space and cost.
上記のシリアル処理方式、パラレル処理方式のいずれに
おいても、領域の数が数個程度であれば、上記の難点が
あるとはいうものの実用化が一応は可能と考えられる。In both the serial processing method and the parallel processing method described above, it is considered possible to put them into practical use if the number of regions is about a few, although they have the above-mentioned drawbacks.
しかしながら領域の数がそれ以上になると、たとえば数
十個、画側以上になるといずれにしても実用化の可能性
は皆無といってよい。However, if the number of areas exceeds that number, for example several tens, or more than the image side, there is no possibility of practical use.
発明の概要
この発明は、処理すべき領域の数に関係なく比較的簡単
な構成でかつ迅速に各領域内における画像の面積演算を
行なうことのできる画像処理装置を提供することを目的
とする。SUMMARY OF THE INVENTION An object of the present invention is to provide an image processing apparatus that has a relatively simple configuration and can quickly calculate the area of an image in each area regardless of the number of areas to be processed.
この発明による画像処理装置は、撮像装置の視野内に設
定された複数の処理領域をあらかじめ記憶する第1の記
憶手段、上記第1の記憶手段に記憶されている処理領域
を撮像装置の走査と同期して読出しかつ処理領域を表わ
す領域信号を発生する手段、上記第1の記憶手段に設定
された複数の処理領域が水平走査線ごとに現われる順序
のパターンをあらかじめ記憶しておく第2の記憶手段、
各水平走査線ごとにその水平走査線で現われる処理領域
の順序パターンを指定するデータを記憶しておく第3の
記憶手段、複数の処理領域ごとにそれらの領域における
累積面積値を記憶するための第4の記憶手段、撮像装置
から読出された画像信号に基づいて上記領域信号を参照
して各水平走査線上の処理領域ごとに所定の特徴画像を
表わす画素数を計数する手段、および各水平走査線ごと
に第3の記憶手段を参照して、第2の記憶手段における
その水平走査線で現われる処理領域の順序パターンを指
定し、その水平走査線で現われる処理領域ごとに、上記
の指定された順序パターンにおける順序にしたがって、
上記第4の記憶手段に記憶されている対応処理領域の累
積面積値に上記計数手段による計数値を加算して上記第
4の記憶手段に記憶されている累積面積値を更新する手
段を備えていることを特徴とする。The image processing device according to the present invention includes a first storage means that stores in advance a plurality of processing regions set within the field of view of the imaging device, and a processing region stored in the first storage means that is scanned by the imaging device. means for synchronously reading out and generating an area signal representing a processing area; a second memory storing in advance a pattern of the order in which the plurality of processing areas set in the first storage means appear for each horizontal scanning line; means,
a third storage means for storing, for each horizontal scanning line, data specifying the order pattern of processing areas appearing in that horizontal scanning line; a fourth storage means, means for counting the number of pixels representing a predetermined characteristic image for each processing area on each horizontal scanning line by referring to the area signal based on the image signal read from the imaging device; For each line, the third storage means is referred to, and the order pattern of processing areas appearing in that horizontal scanning line in the second storage means is specified, and for each processing area appearing in that horizontal scanning line, the above specified According to the order in the ordered pattern,
means for updating the cumulative area value stored in the fourth storage means by adding the counted value by the counting means to the cumulative area value of the corresponding processing area stored in the fourth storage means; It is characterized by the presence of
上記の複数の処理領域における面積演算処理は最大、撮
像装置におけるlフィールド走査期間(一般に1 /
Go see −16,7m5)で完了する。したがっ
てこの発明によるときわめて迅速な処理が可能であり、
実時間処理を要求されるファクトリイ・オートメーショ
ンにおける自動目視検査等にきわめて有効である。また
、各水平走査線に対して順序パターンの指定データを設
けておけば。The area calculation processing in the plurality of processing regions described above is performed within the maximum l field scanning period (generally 1 /
Go see -16,7m5) to complete. Therefore, according to this invention, extremely rapid processing is possible;
It is extremely effective for automatic visual inspections in factory automation that require real-time processing. Also, if order pattern designation data is provided for each horizontal scanning line.
複数の水平走査線に共通の順序パターンを使用すること
が可能となる。一般(;処理領域の数が膨大になっても
一般には上記の順序パターンの種類はそれほど増加しな
いので、ハードウェア構成とくにメモリの容量が極端に
増大することはなく。A common ordering pattern can be used for multiple horizontal scan lines. General (; Even if the number of processing areas becomes enormous, the number of types of order patterns mentioned above generally does not increase that much, so the hardware configuration, especially the memory capacity, does not increase dramatically.
すなわち全体的な回路構成に大きな影響を与えることは
なく、構成を比較的簡素に保つことができる。この発明
はとくにメツシュ状の処、理領域群のように処理領域を
規則正しく配列した場合に好適である。このようにして
、処理領域の数をきわめて多数(たとえば数百側でも充
分可能)に設定することが可能となり、−画面中にきわ
めて多数の処理領域を設定できるので画像処理の精度を
高めることができるとともに複雑な形状の認識も可能と
なる。That is, the overall circuit configuration is not significantly affected, and the configuration can be kept relatively simple. This invention is particularly suitable for mesh-like processing or when processing areas are regularly arranged like a group of processing areas. In this way, it is possible to set a very large number of processing areas (for example, several hundreds is sufficient), and - because it is possible to set a very large number of processing areas on the screen, it is possible to increase the accuracy of image processing. This also makes it possible to recognize complex shapes.
実施例の説明
第1図は撮像装置の視野とそこに設定されたウィンドウ
(処理領域)とを示している。この実施例では撮像装置
の画面は横256画素(x 1〜x25B”縦242画
素(y−y)の画素から構成されている。横方向に並ん
だ256個の画素が水平方向の走査線を構成する。DESCRIPTION OF THE EMBODIMENTS FIG. 1 shows a field of view of an imaging device and a window (processing area) set therein. In this embodiment, the screen of the imaging device is composed of 256 pixels horizontally (x1 to x25B) and 242 pixels vertically (y-y).The 256 pixels arranged horizontally form a horizontal scanning line. Configure.
このような画面上において任意の位置に任意の形状のウ
ィンドウが任意の個数設定される。第1図では説明の便
宜上3つのウィンドウW1〜W3が設定され、これらの
ウィンドウはいずれも方形である。ウィンドウについて
の条件はきわめてわずかである。たとえばウィンドウの
大きさは2X2画素以上であること、ウィンドウの水平
方向の間隔は1または2画素以上あけること(垂直方向
についてはウィンドウが重ならない限り接していてもよ
い)等である。水平方向のウィンドウ間隔は後述する高
速メモリ等における動作速度に関連して決定される。し
たがって、最大1万個以上のウィンドウを一画面に設定
することが可能である。ウィンドウの形は方形に限らず
任意に設定できる。An arbitrary number of windows of arbitrary shapes are set at arbitrary positions on such a screen. In FIG. 1, three windows W1 to W3 are set for convenience of explanation, and all of these windows are rectangular. There are very few requirements on windows. For example, the size of the window must be 2×2 pixels or more, and the horizontal interval between the windows must be 1 or 2 pixels or more (in the vertical direction, the windows may be adjacent as long as they do not overlap). The window interval in the horizontal direction is determined in relation to the operating speed of a high-speed memory, etc., which will be described later. Therefore, it is possible to set up to 10,000 or more windows on one screen. The shape of the window is not limited to a rectangle and can be set arbitrarily.
各ウィンドウ内にはハツチングで示すような(作図の便
宜上2値化されている)画像が含まれている。この発明
は、これらの画像の面積(ハツチングされた画素の数)
をウィンドウごとに演算して求めるものである。ウィン
ドウWlについて言うと、このウィンドウW はX%X
9.Y2〜y の間に設定されている。水平走査線y2
上における画像の面積(画素数)はN1□−3,y3上
においてはN−3,)/4上においてはN−4、Y
上においてはN−2,y6上においてはN −2であ
る。したがって、ウィンドウW1内における画像の面積
はΣN11−3+3+4+2+2−14となる。他のウ
ィンドウW 、W 等においても同じようにしてその内
部の画像の面積が求められる。Each window contains an image (binarized for convenience of drawing) as shown by hatching. This invention calculates the area (number of hatched pixels) of these images.
is calculated for each window. Regarding window Wl, this window W is X%X
9. It is set between Y2 and y. horizontal scanning line y2
The area (number of pixels) of the image on the top is N1□-3, N-3 on y3, N-4 on )/4, and N-4 on Y3.
It is N-2 on the top, and N-2 on y6. Therefore, the area of the image within the window W1 is ΣN11-3+3+4+2+2-14. The area of the image inside the other windows W 1 , W 2 , etc. is determined in the same way.
上記の例を用いて説明したこの発明による面積演算処理
の手順は次のように簡潔にまとめることができる。The procedure of the area calculation process according to the present invention explained using the above example can be summarized briefly as follows.
(1)1水平走査線ごとに、この水平走査線上のウィン
ドウにおける画像の面積(画素数)を。(1) For each horizontal scanning line, calculate the area (number of pixels) of the image in the window on this horizontal scanning line.
ウィンドウごとに個別に計測する。Measure each window individually.
(2)上記で求めた各ウィンドウの個別計測面積をウィ
ンドウごとにそれぞれ累積加算する。(2) The individual measurement areas of each window obtained above are cumulatively added for each window.
複数のウィンドウを区別するために各ウィンドウに番号
が付けられている。これを上述のWl。Each window is numbered to distinguish between multiple windows. This is the Wl mentioned above.
W 、W 、・・・、W で表わす(nはウィンド
ウ2 3 nの数に等しい
)。撮像装置からの画像信号の読出しは、よく知られて
いるように、水平走査線にそって行なわれ、読出される
水平走査線が垂直方向に順次移動していく。上水平走査
線上に複数のウィンドウが存在する。たとえば第1図に
おいて走査線y2上にはウィンドウW1とW3が。It is represented by W , W , . . . , W (n is equal to the number of windows 2 3 n). As is well known, image signals are read out from an imaging device along horizontal scanning lines, and the horizontal scanning lines to be read out sequentially move in the vertical direction. There are multiple windows on the top horizontal scan line. For example, in FIG. 1, windows W1 and W3 are on scanning line y2.
y 上にはWlとW2とW3がそれぞれかかっている。Wl, W2, and W3 are applied on y, respectively.
上記手順(1)において面積の計測は各ウィンドウごと
に行なわれるので、1水平走査線上にあるウィンドウを
相互に区別しなければならない。そのために、第2図(
A)に示すような垂直アドレス(又は水平ライン)・テ
ーブルと第2図(B)に示すようなウィンドウ・テーブ
ルとが設けられている。In step (1) above, the area is measured for each window, so windows on one horizontal scanning line must be distinguished from each other. To that end, we have shown Figure 2 (
A vertical address (or horizontal line) table as shown in A) and a window table as shown in FIG. 2(B) are provided.
各水平走査線を走査したときに出現するウィンドウの順
序が同じである複数の走査線が存在する。走査線y 上
ではウィンドウW 、W の順序で出現するが、走査線
y とy4上ではともにW、W、W3の順序で現われる
。また走査線y とy6にそうウィンドウの出現順序は
W 。There are multiple scan lines with the same order of windows appearing when each horizontal scan line is scanned. On scan line y, windows appear in the order W 1 and W 2 , but on both scan lines y 2 and y4, windows appear in the order W, W, W3. Also, the appearance order of windows on scan lines y and y6 is W.
W2である。このように複数の水平走査線についてウィ
ンドウの出現順序が同じである順序パターンを記憶した
のが第2図(B)に示すウィンドウ・テーブルである。It is W2. The window table shown in FIG. 2(B) stores the order pattern in which windows appear in the same order for a plurality of horizontal scanning lines.
このウィンドウ・テーブルにおいて、先頭アドレスWT
1から始まる2つの記憶場所には走査線y2にそって現
われるウィンドウの順序を示すデータ(順序パターン)
があらかじめストアされている。この順序パターンのデ
ータは、後述するように具体的には各ウィンドウの面積
値エリアΦアドレス(WA 、WA3等)から構成さ
れている。先頭アドレスWT2からはじまる3つの記憶
場所には走査線y とy4とに共通に現われる順序パタ
ーンがストアされ、この順序パターンは出現するウィン
ドウの順序で配置されたウィンドウを表わすデータ(ア
ドレス・データWA1゜WA、WA3)からなる。同じ
ように先頭アドレスWT3からはじまる2つの記憶場所
には走査線y とy6とに共通の順序パターンが記憶さ
れている。ウィンドウ・テーブルにおいて、少なくとも
1つの順序パターンを記憶する複数の記憶場所(記憶場
所群または記憶エリア)には連続アドレスが付されてい
る。In this window table, the starting address WT
The two memory locations starting from 1 contain data (sequence pattern) indicating the order of windows appearing along scan line y2.
is stored in advance. Specifically, the data of this sequential pattern is composed of area value area Φ addresses (WA, WA3, etc.) of each window, as will be described later. The three memory locations starting from the top address WT2 store an order pattern that appears in common on scan lines y and y4, and this order pattern is composed of data (address data WA1°) representing windows arranged in the order of the windows that appear. WA, WA3). Similarly, a common order pattern for scanning lines y and y6 is stored in two storage locations starting from the top address WT3. In the window table, a plurality of storage locations (groups of storage locations or storage areas) that store at least one sequential pattern are given consecutive addresses.
垂直アドレス・テーブルには水平走査線数と同数の記憶
場所が設けられており、これらの記憶場所には連続アド
レスが付されている。この実施例では説明を簡単にする
ために第1〜第242水平走査線に対応して1〜242
番地のアドレスが割当てられている。そして各記憶場所
にはそれに対応する水平走査線上に現われるウィンドウ
の順序パターンを指定するために、その順序パターンが
記憶されているウィンドウ・テーブルの記憶場所群(記
憶エリア)の先頭アドレスまたはそれに関連するアドレ
ス・データがあらかじめ設定されている。The vertical address table has as many locations as there are horizontal scan lines, and these locations are sequentially addressed. In this embodiment, in order to simplify the explanation, the 1st to 242nd horizontal scanning lines correspond to the 1st to 242nd horizontal scanning lines.
A street address has been assigned. For each memory location, in order to specify the order pattern of windows that appear on the corresponding horizontal scanning line, the order pattern is stored at the start address of the memory locations (storage area) of the window table in which the order pattern is stored, or in relation to it. Address data is preset.
後に3つの実施例について述べるが、第1実施例におい
てはこの垂直アドレス・テーブルに記憶されるアドレス
・データは上記先頭アドレスよりも1つ少ない値(たと
えばWT −1,WT2−1など)であり(第2図(
A)の(a))、第2および第3の実施例においては先
頭アドレス(WTl。Three embodiments will be described later, but in the first embodiment, the address data stored in this vertical address table is one value less than the above-mentioned top address (for example, WT -1, WT2-1, etc.). (Figure 2 (
In (a) of A), the second and third embodiments, the start address (WTl.
WT2など)である(第2図(A)の(b))。WT2, etc.) ((b) in FIG. 2(A)).
これらの実施例においては垂直アドレス・チーフルのア
ドレスは水平同期信号を計数する垂直カウンタの計数値
によって指定される。したがって、たとえば第3走査線
y3の走査においてはこの垂直カウンタの計数値は3と
なり、垂直アドレス・テーブルからアドレス・データW
T2−1(第1実施例)またはWT2 (第2,3実
施例)が読出され、このアドレスによってウィンドウ・
テーブルの先頭アドレスが指定されるのでこの走査線y
にはW、W、W3 (面積値エリアのアドレスWA
、WA 、WA3)の順序でラインドウが出現する
ことが分る。In these embodiments, the address of the vertical address square is specified by the count value of a vertical counter that counts horizontal synchronization signals. Therefore, for example, in scanning the third scanning line y3, the count value of this vertical counter is 3, and the address data W is read from the vertical address table.
T2-1 (first embodiment) or WT2 (second and third embodiments) is read and the window is set by this address.
Since the start address of the table is specified, this scanning line y
W, W, W3 (area value area address WA
, WA, WA3).
もしウィンドウ・テーブルに、すべての水平走査線につ
いて、水平走査線にそって現われるウィンドウを表わす
データをその順序で記憶させるようにすると、きわめて
多数の(たとえば子側とか1万個とかの)ウィンドウが
設定された場合にはウィンドウ・テーブルのためのメモ
リの容量を大きくしなければならない。ウィンドウ出現
順序についての同じ順序パターンが重複して登録される
ことになるからである。この発明では複数の走査線につ
いて共通の順序パターンがあるときにはこれらを重複し
て記憶することはせず、記憶された1つの順序パターン
を各走査線について設定された垂直アドレス・テーブル
のデータによって指定するようにしているのでメモリ容
量を少なくすることができる。これは、とくにウィンド
ウが規則正しく配列されることにより順序パターンが重
複することが多い場合に特に有利である。If a window table stores data representing the windows that appear along a horizontal scanline in that order for every horizontal scanline, a very large number of windows (e.g., 10,000 children) If set, the amount of memory for the window table must be increased. This is because the same order pattern regarding the window appearance order will be registered multiple times. In this invention, when there is a common order pattern for multiple scanning lines, these are not stored redundantly, but one stored order pattern is specified by data in a vertical address table set for each scanning line. This allows the memory capacity to be reduced. This is especially advantageous if the windows are arranged regularly so that the ordering patterns often overlap.
各ウィンドウの個別計測面積をウィンドウごとに累積加
算するという上記手順(2)の処理を実行するために、
第2図(C)に示すように、各ウィンドウごとに累積面
積値をストアするための場所をもつ面積値エリアが設け
られている。このエリアにおいて、第1番目の記憶場所
は第1番目のウィンドウW1に対応し、アドレスW A
tが付されている。同じように第2,3番目の記憶場
所は第2.第3番目のウィンドウW、W3の累積面積値
をストアするためのものであり、アドレスWA、WA3
が付けられている。In order to execute the process of step (2) above, which cumulatively adds the individually measured area of each window for each window,
As shown in FIG. 2(C), an area value area having a place for storing cumulative area values is provided for each window. In this area, the first memory location corresponds to the first window W1, and the address W A
t is attached. Similarly, the second and third memory locations are 2nd. This is to store the cumulative area value of the third window W, W3, and the address WA, WA3
is attached.
第2図(B)に戻って、上述したウィンドウ・テーブル
には各ウィンドウを表わすデータとして」1記面積値エ
リアのそのウィンドウに対するアドレス(WA 、W
A2等)が各順序パターンごとに走査にしたがう出現の
順序でストアされることになる。また、このウィンドウ
・テーブルには各ウィンドウごとに2面積演算される画
像が2値レベルで白レベルのものか黒レベルのものかを
表わすデータをストアしておくことが好ましい。すなわ
ち、撮像装置からの画像信号は後述するように白黒2値
化され、そのうちの白レベルの画素数または黒レベルの
画素数が画像の面積として計測される訳であるが、白黒
レベルのどちらの画素を計数するのかを表わすのがこの
データである。このデータは後述する白黒反転回路の制
御のために用いられる。Returning to FIG. 2(B), the window table described above contains data representing each window as the address (WA, W) for that window in the area value area.
A2, etc.) are stored in the order of appearance according to the scan for each order pattern. Further, it is preferable to store data indicating whether the image whose two areas are calculated for each window is a white level image or a black level image at a binary level in this window table. In other words, the image signal from the imaging device is converted to black and white as described later, and the number of pixels at the white level or the number of pixels at the black level is measured as the area of the image. This data represents whether pixels are to be counted. This data is used to control a black and white inversion circuit which will be described later.
画像処理装置の具体的構成の説明に先だって1フイ一ル
ド画像についての処理の全体を概観しておくことは有意
義と思われる。Prior to explaining the specific configuration of the image processing device, it is thought to be useful to provide an overview of the entire processing for one field image.
第3図に1フイ一ルド期間において出力される垂直同期
信号VD、計測期間信号、水平同期信号HDおよびウィ
ンドウ信号WDが示されている。FIG. 3 shows the vertical synchronizing signal VD, measurement period signal, horizontal synchronizing signal HD, and window signal WD output during one field period.
ウィンドウ信号WDは撮像装置における走査と同期して
後述するウィンドウ・メモリから出力され、ウィンドウ
の設定された位置を各水平走査線において表わす。The window signal WD is output from a window memory, which will be described later, in synchronization with scanning in the imaging device, and represents the set position of the window in each horizontal scanning line.
第1水平走査期間(走査線yt)において、この第1水
平走査線上にある各ウィンドウにおける画像の面積が計
測される。この実施例では第1図に示すように第1水平
走査線上にはウィンドウは存在しない。すなわち水平同
期信号HDを垂直カウンタが計数してこのカウンタの値
が1になり。During the first horizontal scanning period (scanning line yt), the area of the image in each window on this first horizontal scanning line is measured. In this embodiment, as shown in FIG. 1, there is no window on the first horizontal scanning line. That is, the vertical counter counts the horizontal synchronizing signal HD, and the value of this counter becomes 1.
この値1によってアドレスされる垂直アドレス・テーブ
ルの記憶場所には何らのデータも記憶されていないので
ウィンドウは存在しないと判定され、上記の計測は行な
われない。Since no data is stored in the storage location of the vertical address table addressed by this value 1, it is determined that no window exists and the above measurement is not performed.
第2水平走査期間(走査線y2)において、水平同期信
号HDを計数する垂直カウンタの値は2となる。この値
2によってアドレスされる垂直アドレス・テーブルの記
憶場所にはアドレス・データWTI−1(またはWT、
)がストアされているので、このアドレス・データを先
頭アドレスとするウィンドウ・テーブルの記憶場所群(
記憶エリア)が参照され、アドレスWA、WA3の順■
序でストアされていることが分る。In the second horizontal scanning period (scanning line y2), the value of the vertical counter that counts the horizontal synchronization signal HD is 2. The vertical address table memory location addressed by this value 2 contains address data WTI-1 (or WT,
) is stored, the memory locations of the window table with this address data as the first address (
It can be seen that the data is stored in the order of addresses WA and WA3.
ウィンドウ信号が最初に立上ったときには。When the window signal first rises.
上記の順序パターンからそれがアドレスWA1のウィン
ドウ(すなわちウィンドウW1)であることが分り、か
つ図示しない白黒レベルφデータによってたとえば黒レ
ベルの画素を計数すべきことが分る。したがってウィン
ドウW1に対するウィンドウ信号がHレベルである闇黒
レベルの画素が計数され、この信号が立下ったときに面
積値エリアのアドレスWA1の記憶場所の累積面積値(
最初は零)にこの計数値が加算されてストアされる。From the above order pattern, it can be seen that this is the window of address WA1 (that is, window W1), and from the black and white level φ data (not shown), it can be seen that, for example, pixels at the black level should be counted. Therefore, the pixels of the dark level where the window signal for the window W1 is H level are counted, and when this signal falls, the cumulative area value (
This count value is added to (0 at first) and stored.
次にウィンドウ信号が再度立上るので上記の順序パター
ンからウィンドウW3であることが分り、同じようにウ
ィンドウ信号がHレベルの期間黒レベルの画素が加算さ
れる。ウィンドウ信号が立下ったときに面積値エリアの
アドレスWA3の記憶場所の累積面積値にこの計数値が
加算されてストアされる。Next, since the window signal rises again, it is determined from the above sequential pattern that it is window W3, and in the same way, pixels at black level are added while the window signal is at H level. When the window signal falls, this count value is added to the cumulative area value at the storage location of address WA3 in the area value area and stored.
第3水平走査期間(走査線y3)においても同じように
水平同期信号HDを計数した垂直カウンタの値3によっ
てアドレスされる垂直アドレス・テーブルからアドレス
・データW T 2 1またはW T 2が読出され
、これによって先頭アドレスが指定されるウィンドウ・
テーブルの記憶場所群(記憶エリア)から第3水平走査
線にはウィンドウがW、W、W3の順序パターンで出現
することが判明する。In the third horizontal scanning period (scanning line y3), address data W T 2 1 or W T 2 is similarly read out from the vertical address table addressed by the value 3 of the vertical counter that counts the horizontal synchronizing signal HD. , the window whose start address is specified by this
It is found from the storage locations (storage areas) of the table that windows appear in the order pattern of W, W, W3 on the third horizontal scanning line.
したがって、ウィンドウ信号が最初に立上ったときにこ
のウィンドウがウィンドウWiであることを認識し、ウ
ィンドウ信号がHレベルである闇黒レベルの画素が計数
される。このウィンドウ信号が立下ったときに面積値エ
リアのアドレスWA1の記憶場所の累積面積値にこの計
数値が加算されてストアされる。Therefore, when the window signal first rises, it is recognized that this window is the window Wi, and the pixels at the dark level where the window signal is at the H level are counted. When this window signal falls, this count value is added to the cumulative area value at the storage location of address WA1 in the area value area and stored.
さらに同じようにウィンドウ信号が再度、再々度立上っ
たときにこれらのウィンドウがウィンドウW、W3であ
ることが分り、ウィンドウ信号がHレベルの期間黒レベ
ルの画素がそれぞれ計数される。ウィンドウ信号が立下
ったときに面積値エリアのアドレスWA、WA3の記憶
場所の累積面積値に計数値がそれぞれ加算されてストア
される。Furthermore, when the window signal rises again and again in the same way, these windows are found to be windows W and W3, and the pixels at the black level during the period when the window signal is at the H level are counted. When the window signal falls, the count values are added to the cumulative area values of the storage locations at addresses WA and WA3 in the area value area and stored.
同様にして第4水平走査期間から第242水平走査期間
まで上記の処理が繰返され9面積値エリアの各記憶場所
の累積面積値が各水平走査線上の対応するウィンドウに
おける画素の計数ごとに加算されていく。そして、第2
42走査期間が、終了したときに9面積値エリアの各記
憶場所の累積面積値は各ウィンドウにおける画像の面積
を表わす値となる。Similarly, the above process is repeated from the 4th horizontal scanning period to the 242nd horizontal scanning period, and the cumulative area value of each storage location in the 9 area value areas is added for each pixel count in the corresponding window on each horizontal scanning line. To go. And the second
When the 42 scanning periods are completed, the cumulative area value of each storage location in the 9 area value areas becomes a value representing the area of the image in each window.
計測期間信号は上記の計測、演算の間Hレベルに保たれ
、最後の水平走査線にそう計測が終了したのち次の垂直
同期信号までLレベルに反転する。計測期間信号がLレ
ベルの期間において、上記の処理によって求められた各
ウィンドウにおける面積値を用いて対象物に関する所与
の判定処理が行なわれる。The measurement period signal is kept at H level during the above-mentioned measurement and calculation, and after the measurement is completed on the last horizontal scanning line, it is inverted to L level until the next vertical synchronization signal. During the period in which the measurement period signal is at the L level, a given determination process regarding the object is performed using the area value in each window determined by the above process.
以上のようにして、1フイ一ルド期間(−18,7m5
)の間に、多くのウィンドウ内における画像面積がそれ
ぞれ計測され、この計測値を用いた判定が行なわれるの
で、きわめて迅速な実時間処理が可能である。As described above, one field period (-18,7m5
), the image area within each of the many windows is measured, and judgments are made using these measured values, so extremely rapid real-time processing is possible.
第4図は第1実施例の画像処理装置を示し、第5図はそ
の動作を示すもので、とくに第1図における第3水平走
査線y3にそう部分であってウィンドウW とW2の計
測を行なう部分を示してい■
る。第5図においては作図の便宜上、ウィンドウW と
W2のウィンドウ信号間のLレベル期間がやや長く描か
れている。FIG. 4 shows the image processing device of the first embodiment, and FIG. 5 shows its operation. In particular, the measurement of the windows W and W2 is performed on the third horizontal scanning line y3 in FIG. ■ Indicates the part to be performed. In FIG. 5, for convenience of drawing, the L level period between the window signals of windows W 1 and W2 is drawn a little longer.
これらの図面を参照して、カメラ40は撮像管または固
体電子搬像素子(CODなど)を内蔵し。Referring to these drawings, a camera 40 has a built-in image pickup tube or a solid-state electron carrier device (COD, etc.).
対象物の画像信号を出力する。この画像信号は同期分離
回路41に送られ、この回路41において画像信号中の
各画素ごとのクロック・パルスCK、水平同期信号HD
および垂直同期信号VDが取出される。画像信号は次に
2値化回路42に送られ、適当なスレシホールド・レベ
ルで弁別されることにより白、黒レベルをもつ2値化号
に変換される。Outputs an image signal of the object. This image signal is sent to a synchronization separation circuit 41, which generates a clock pulse CK for each pixel in the image signal, and a horizontal synchronization signal HD.
and vertical synchronization signal VD are taken out. The image signal is then sent to the binarization circuit 42, where it is discriminated at an appropriate threshold level and converted into a binary code having white and black levels.
2値化された画像信号は白黒反転回路43.ゲート回路
24を経て画素カウンタ36に入力する。白黒反転回路
43はEX−OR(排他的論理和)回路からなり、上述
したウィンドウ・テーブルの白黒レベル・データに基づ
いてCPUl0によって制御される。このEX−OR回
路に与えられる白黒反転信号がLレベルのとき入力する
2値化された画像信号はそのままこの回路を通り、Hレ
ベルのとき反転されて出力される。ゲート回路24はウ
ィンドウ信号WDおよびタイミング信号T1によって制
御される。The binarized image signal is transferred to a black and white inversion circuit 43. The signal is input to the pixel counter 36 via the gate circuit 24. The black-and-white inversion circuit 43 is composed of an EX-OR (exclusive OR) circuit, and is controlled by the CPU10 based on the black-and-white level data of the window table described above. When the monochrome inversion signal applied to this EX-OR circuit is at L level, the input binary image signal passes through this circuit as it is, and when it is at H level, it is inverted and output. Gate circuit 24 is controlled by window signal WD and timing signal T1.
ウィンドウ・メモリ20は一種の画像メモリであって、
1画面分の2値データをストアできる容量をもつ。この
メモリ20には第1図に示すようなウィンドウWI−W
nが設定される。たとえばウィンドウ内の領域のビット
が1.ウィンドウ外のビットが0に書込まれることによ
ってウインドウの位置が記憶される。ウィンドウ・メモ
リ内の各画素に対応するビットはマルチプレクサ25を
経て入力するアドレス信号によってアドレス指定される
。マルチプレクサ25はCPUl0から与えられるアド
レス信号とアドレス・カウンタ26から与えられるアド
レス信号とを切換えるものである。The window memory 20 is a kind of image memory,
It has a capacity that can store one screen's worth of binary data. This memory 20 has a window WI-W as shown in FIG.
n is set. For example, if the bit in the area within the window is 1. The window position is stored by writing bits outside the window to 0. The bit corresponding to each pixel in the window memory is addressed by an address signal input via multiplexer 25. The multiplexer 25 switches between the address signal applied from the CPU10 and the address signal applied from the address counter 26.
ウィンドウ・メモリ20にウィンドウを設定するときに
はCPUl0によってアドレスが与えられるとともにメ
モリ20のデータ入出力端子に書込むべきデータが与え
られる。他方、上述の計測期間においてはウィンドウ・
メモリ20は読出しモードとなりアドレス・カウンタ2
6からアドレス信号が与えられる。When setting a window in the window memory 20, an address is given by the CPU 10, and data to be written to the data input/output terminal of the memory 20 is given. On the other hand, in the measurement period mentioned above, the window
Memory 20 is in read mode and address counter 2
An address signal is given from 6.
アドレス・カウンタ26は垂直同期信号VDによってク
リアされ、入力するクロック・パルスCKを計数してこ
の計数値によって表わされるアドレス信号を出力する。The address counter 26 is cleared by the vertical synchronizing signal VD, counts the input clock pulses CK, and outputs an address signal represented by the counted value.
またこの計数値が第242水平走査線にそう走査を終了
したことを示す値になったときに計測終了信号を出力す
る。この計測終了信号はI10制御回路13を経てCP
Ul0に与えられる。Further, when this count value reaches a value indicating that scanning has ended on the 242nd horizontal scanning line, a measurement end signal is output. This measurement end signal is sent to the CP via the I10 control circuit 13.
given to Ul0.
CPU1Oにはこの計測終了信号に加えて垂直同期信号
VDが与えられており、これらの入力信号に基づいてC
PUl0は第3図に示すような計測期間信号を作成して
I10制御回路13から出力する。In addition to this measurement end signal, the CPU 1O is given a vertical synchronization signal VD, and based on these input signals,
PU10 creates a measurement period signal as shown in FIG. 3 and outputs it from the I10 control circuit 13.
ウィンドウ・メモリ20が読出しモードにあるときには
上述のようにアドレス・カウンタ26から発生するアド
レス信号に基づいてそこにストアされているウィンドウ
・データが出力される。メモリ20から読出されたウィ
ンドウ・データはP/S(パラレル/シリアル)変換回
路21でシリアルな信号に変換され、ウィンドウ信号W
Dになってゲート回路22に送られる。ゲート回路22
は上記計測期間信号によって制御され、計測期間におい
てウィンドウ信号WDが出力される。このウィンドウ信
号WDはカメラ40からの画像信号と正しく同期してい
る。すなわち1画像信号が第℃走査線の第mビット目
を表わしているときにはウィンドつ信号も第で走査線の
第mビット目におけるウィンドウの有無を表わしている
。When the window memory 20 is in the read mode, the window data stored therein is output based on the address signal generated from the address counter 26 as described above. The window data read from the memory 20 is converted into a serial signal by a P/S (parallel/serial) conversion circuit 21, and the window data is converted into a serial signal.
D and is sent to the gate circuit 22. Gate circuit 22
is controlled by the measurement period signal, and a window signal WD is output during the measurement period. This window signal WD is correctly synchronized with the image signal from the camera 40. In other words, one image signal is the m-th bit of the °C-th scanning line.
, the window signal also indicates the presence or absence of a window at the m-th bit of the scanning line.
ウィンドウ信号WDはウィンドウが設定されているビッ
ト位置ではHレベルになり、ウィンドウが設定されてい
ない場所ではLレベルとなる信号である。このウィンド
ウ信号WDは上記ゲート回路24およびタイミング制御
回路23に与えられる。The window signal WD is a signal that is at an H level at a bit position where a window is set, and at an L level at a location where a window is not set. This window signal WD is applied to the gate circuit 24 and timing control circuit 23.
タイミング制御回路23は入力するウィンドウ信号WD
および水平同期信号HD、計測期間信号に基づいて第5
図に示されgような各種のタイミング信号T 、T
、T 、T 、 リード信号RD、 ライト
信号WRを発生する。タイミング信号T。は計測期間に
おいて水平同期信号HDの立下りの時点から一定の短い
時間Hレベルとなり。The timing control circuit 23 receives the input window signal WD.
and the horizontal synchronization signal HD, the fifth signal based on the measurement period signal.
Various timing signals T, T as shown in the figure
, T, T, generates a read signal RD and a write signal WR. timing signal T. remains at H level for a certain short period of time from the falling edge of the horizontal synchronizing signal HD during the measurement period.
後述するマルチプレクサ33およびウィンドウ・カウン
タ38を制御する。タイミング信号T1はウィンドウ信
号WDの立下りの時点から一定期間(たとえば1画素ま
たは2画素の走査期間程度)Hレベルとなる信号であり
、これは画素カウンタ36の禁止信号およびクリア信号
として働く。タイミング信号T2はウィンドウ信号WD
の立下りの時点から上記一定期間よりも短い期間Hレベ
ルとなる信号であって、これはマルチプレクサ33およ
びラッチ回路(ラッチ1)31を制御するために用いら
れる。タイミング信号T3はタイミング信号T2の立下
りの時点からある短い期間Hレベルになり、これはマル
チプレクサ33およびラッチ回路(ラッチ2)32を制
御する。リード信号RDはタイミング信号T3の立下り
の時点からタイミング信号T1の立下りの時点までLレ
ベルになり、他の期間はHレベルを保持するもので、H
レベル期間において後述する高速メモリ30をリード・
モードにする。ライト信号WRはリード信号RDがLレ
ベルである期間内の所定期間においてHレベルとなり、
Hレベルのときに高速メモリ30をライト・モードに設
定する。It controls a multiplexer 33 and a window counter 38, which will be described later. The timing signal T1 is a signal that remains at H level for a certain period of time (for example, about a scanning period of one or two pixels) from the falling edge of the window signal WD, and serves as an inhibit signal and a clear signal for the pixel counter 36. Timing signal T2 is window signal WD
This signal remains at H level for a period shorter than the above-mentioned fixed period from the time of falling of , and is used to control the multiplexer 33 and the latch circuit (latch 1) 31. The timing signal T3 is at H level for a short period from the falling edge of the timing signal T2, and this controls the multiplexer 33 and the latch circuit (latch 2) 32. The read signal RD is at the L level from the falling edge of the timing signal T3 to the falling edge of the timing signal T1, and remains at the H level during the other periods.
During the level period, the high-speed memory 30, which will be described later, is read.
mode. The write signal WR becomes H level during a predetermined period within the period when the read signal RD is L level,
When at H level, high speed memory 30 is set to write mode.
ゲート回路24はウィンドウ信号WDとタイミング信号
T1の反転信号とによって制御され、ウィンドウ信号W
DがHレベルの間のみ画像信号がこのゲート回路24を
通過する。The gate circuit 24 is controlled by the window signal WD and an inverted signal of the timing signal T1.
The image signal passes through this gate circuit 24 only while D is at H level.
高速メモリ30はたとえばキャッシュ・メモリであって
、上述した垂直アドレス・テーブルとウィンドウ・テー
ブルと面積値エリアを格納している。このメモリ30に
おける垂直アドレス・テーブルとウィンドウ・テーブル
と面積値エリアのアドレスはマルチプレクサ33を経て
入力するアドレス信号によって指定される。マルチプレ
クサ33には垂直カウンタ34から出力されるアドレス
信号YCTと、CPUl0から与えら、れるアドレス信
号と、ウィンドウ・カウンタ38がらデータ・バスを経
て入力するアドレス信号WCTと、ラッチ回路31から
データ・バスを介して与えられるアドレス信号とが入力
しており、上記タイミング信号T、T、T3やCPUl
0から与えられる制御信号(図示路)に基づいてこれら
のアドレス信号の1つを出力する。The high-speed memory 30 is, for example, a cache memory, and stores the above-mentioned vertical address table, window table, and area value area. The addresses of the vertical address table, window table, and area value area in this memory 30 are specified by an address signal inputted via a multiplexer 33. The multiplexer 33 receives the address signal YCT output from the vertical counter 34, the address signal applied from the CPU10, the address signal WCT input from the window counter 38 via the data bus, and the data bus from the latch circuit 31. The address signal given via the above timing signals T, T, T3 and the CPU1
One of these address signals is output based on a control signal (path shown) given from 0.
計測の開始における垂直アドレス・テーブルへのアドレ
ス・データ(WT、−1,WT2−1など)の書込み、
ウィンドウ・テーブルへのアドレス・データ(WA
、WA3など)からなる順序パターンの書込み1面積値
エリアの累積面積値のクリア、計測の終了時点における
面積値エリアからの面積値の読取りの動作はCPUl0
によって行なわれるので、このときには高速メモリ30
のアドレス指定はCPUl0によって行なわれる。Writing address data (WT, -1, WT2-1, etc.) to the vertical address table at the start of measurement,
Address data to window table (WA
, WA3, etc.), clearing the cumulative area value of the area value area 1, and reading the area value from the area value area at the end of measurement are performed by CPU10.
At this time, the high-speed memory 30
Addressing is performed by CPU10.
垂直カウンタ34は垂直同期信号VDによって計測期間
の初期にクリアされ、その後入力する水平同期信号HD
の立下りを計数し、その計数値によって表わされるアド
レス信号YCT (これは垂直アドレス・テーブルのア
ドレス)を出力する。The vertical counter 34 is cleared at the beginning of the measurement period by the vertical synchronization signal VD, and is then cleared by the input horizontal synchronization signal HD.
It counts the falling edges of YCT and outputs an address signal YCT (this is the address of the vertical address table) represented by the counted value.
タイミング信号T。がHレベルのときに垂直カウンタ3
4の出力アドレス信号YCTはマルチプレクサ33を経
て高速メモリ30に与えられる。このときリード信号R
DはHレベルであってメモリ30はリード・モードであ
るから垂直アドレス・テーブルのアドレス信号YCTに
よって指定される記憶場所のアドレス・データ(WT
−1,WT2−1など)が読出されてウィンドウ・カ
ウンタ38に与えられる。そしてタイミング信号T。の
立下りのタイミングでメモリ30の垂直アドレス・テー
ブルから読みだされたアドレス・データがウィンドウ・
カウンタ38にプリセットされる。このカウンタ38は
その後に入力するウィンドウ信号WDの立下りをこのプ
リセット値に加算しながら計数する。timing signal T. Vertical counter 3 when is at H level
The output address signal YCT of No. 4 is applied to the high speed memory 30 via the multiplexer 33. At this time, the read signal R
Since D is at H level and the memory 30 is in read mode, the address data (WT
-1, WT2-1, etc.) is read and applied to window counter 38. and timing signal T. The address data read from the vertical address table in memory 30 at the falling edge of
The counter 38 is preset. This counter 38 counts the falling edge of the window signal WD inputted thereafter while adding it to this preset value.
タイミング信号T2がHレベルのときにはウィンドウ・
カウンタ38の計数値である出力アドレス信号WCT(
これはウィンドウ・テーブルのアドレス)がマルチプレ
クサ33を経てメモリ3oに与えられる。タイミング信
号T3がHレベルのときにはラッチ回路31にラッチさ
れていたアドレス(ウィンドウ争テーブルから読出され
たアドレスWA、WA3等であって面積値エリアのアド
レスである)がマルチプレクサ33を経てメモリ3oに
与えられる。When the timing signal T2 is at H level, the window
The output address signal WCT (which is the count value of the counter 38)
This address (of the window table) is applied to the memory 3o via the multiplexer 33. When the timing signal T3 is at H level, the address latched in the latch circuit 31 (addresses WA, WA3, etc. read from the window contention table, which are the addresses of the area value area) is applied to the memory 3o via the multiplexer 33. It will be done.
加算器35は画素カウンタ36の計数値とメモリ3゜か
ら続出された面積値エリアの累積面積値とを加算するも
のであって、その加算結果はラッチ回路32に与えられ
、ここでラッチされたのち再びメモリ30の面積値エリ
アに戻される。ラッチ回路31(jメモリ30のウィン
ドウ・テーブルから読出されたアドレスWA、WA3等
をラッチして上述のようにマルチプレクサ33を経てメ
モリ30にアドレス信号として与えるものである。The adder 35 adds the count value of the pixel counter 36 and the cumulative area value of the area value area sequentially outputted from the memory 3°, and the addition result is given to the latch circuit 32, where it is latched. Afterwards, it is returned to the area value area of the memory 30. The latch circuit 31 (j) latches the addresses WA, WA3, etc. read from the window table of the memory 30 and supplies them as address signals to the memory 30 via the multiplexer 33 as described above.
CPUl0はその実行プログラムを格納したFROMI
Iと、計測された面積値等のデータをストアするととも
に処理の過程で発生したデータをストアするR A M
12と、上述のI10制御回路13とを備えている。CPUl0 is FROMI which stores the execution program.
I, and R A M which stores data such as measured area values and data generated during processing.
12 and the above-mentioned I10 control circuit 13.
CPUl0は上述のように、ウィンドウ◆メモリ20へ
のウィンドウ・データの書込み、高速メモリ30におけ
る垂直アドレス・テーブルの作成、ウィンドウ争テーブ
ルの作成1面積値エリアのクリア、最終的に計測された
面積値の読出し、ウィンドウごとの面積値に基づく対象
物の判定処理等を行なうものである。As described above, the CPU 10 writes window data to the window memory 20, creates a vertical address table in the high-speed memory 30, creates a window conflict table, clears the area value area, and finally measures the area value. , and performs object determination processing based on the area value of each window.
計測の開始にあたってその準備として、ウィンドウ・メ
モリ20へのウィンドウ・データの書込み、高速メモリ
30における垂直アドレス・チー5I′ルおよびウィン
ドウ・テーブルの作成1面積値エリアのクリアが行なわ
れる。In preparation for starting the measurement, window data is written to the window memory 20, and the vertical address table 5I' and window table creation 1 area value area in the high speed memory 30 are cleared.
そして計測期間信号が立上ると各ウィンドウごとの画像
の面積の計数および累積加算処理が行なわれる。この処
理を第5図に示す第3水平走査線のウィンドウW1に関
して説明すると次のようになる。Then, when the measurement period signal rises, the area of the image for each window is counted and cumulative addition processing is performed. This process will be explained with respect to the window W1 of the third horizontal scanning line shown in FIG. 5 as follows.
第3水平走査がはじまる前の時点では垂直カウンタ34
の計数値は2となっている。また面積値エリアのアドレ
スWA、の累積面積値はΣN11”=N11となってい
る。垂直カウンタ34の内容は第2水平走査における最
後のウィンドウwA3を指定する値WT1+1となって
いる。Before the third horizontal scan starts, the vertical counter 34
The count value is 2. Further, the cumulative area value of the address WA in the area value area is ΣN11''=N11.The content of the vertical counter 34 is a value WT1+1 that specifies the last window wA3 in the second horizontal scan.
第1の実施例では第2図(A)の(a)に示す垂直アド
レス・テーブルが用いられる。In the first embodiment, the vertical address table shown in FIG. 2(A) (a) is used.
水平同期信号HDが立下るとこれが垂直カウンタ34に
よって計数されこのカウンタ34の値は3となる。タイ
ミング信号Toが立上がるので、この値3がマルチプレ
クサ33を経て高速メモリ3oに与えられ、その内部の
垂直アドレス・テーブルのアドレス3が指定されその記
憶場所に記憶されているアドレス・データWT2−1が
読出され、信号Toの立下りのタイミングでウィンドウ
・カウンタ38にプリセットされる。ウィンドウ・カウ
ンタ38の値はWT2−1となる。When the horizontal synchronizing signal HD falls, it is counted by the vertical counter 34, and the value of this counter 34 becomes 3. As the timing signal To rises, this value 3 is given to the high-speed memory 3o via the multiplexer 33, and address 3 of the internal vertical address table is specified and the address data WT2-1 stored in that storage location. is read out and preset in the window counter 38 at the falling edge of the signal To. The value of the window counter 38 becomes WT2-1.
この後、ウィンドウ信号WDが立上るとウィンドウ・カ
ウンタ38の計数値がインクレメントされWT2となる
。そして、ウィンドウ信号WDがHレベルの間、2値化
された画像信号の黒レベルの画素数が画素カウンタ36
で計数される(カウンタ36は先のタイミング信号T1
の立下りで既にクリアされている)。Thereafter, when the window signal WD rises, the count value of the window counter 38 is incremented to become WT2. While the window signal WD is at H level, the number of black level pixels of the binarized image signal is counted by the pixel counter 36.
(The counter 36 receives the previous timing signal T1
(already cleared at the falling edge of ).
ウィンドウ信号WDが立下ると画素カウンタ36の計数
は停止する。タイミング信号T2がHレベルになるので
ウィンドウ・カウンタ38の計数値WT2がマルチプレ
クサ33を経てメモリ30にアドレス信号として与えら
れ、このときはリード信号RDがHレベルでリード・モ
ードとなっているので、ウィンドウ・テーブルのアドレ
スWT2の内容WA が読出され、タイミング信号T
2の立下■
りのタイミングでラッチ回路31にラッチされる。When the window signal WD falls, the pixel counter 36 stops counting. Since the timing signal T2 becomes H level, the count value WT2 of the window counter 38 is given as an address signal to the memory 30 via the multiplexer 33, and at this time, the read signal RD is at the H level and the read mode is set. The contents WA of the address WT2 of the window table are read and the timing signal T
It is latched by the latch circuit 31 at the falling edge of 2.
続いてタイミング信号T3が立上るのでラッチ回路31
にラッチされていたアドレスW A tがマルチプレク
サ33を経てメモリ30に与えられ、またリード・モー
ドであるから面積値エリアのアドレスWA の内容Σ
N11’= N11が読出され、加算器35に与えられ
る。加算器35では画素カウンタ3Bの計数値N1゜と
このΣN11が加算され、その結果が信号T3の立下り
のタイミングでラッチ回路32にラッチされる。Subsequently, the timing signal T3 rises, so the latch circuit 31
The address W A t latched in is given to the memory 30 via the multiplexer 33, and since the mode is read, the contents of the address WA in the area value area Σ
N11'=N11 is read out and given to the adder 35. The adder 35 adds the counted value N1° of the pixel counter 3B and this ΣN11, and the result is latched into the latch circuit 32 at the timing of the fall of the signal T3.
次にリード信号RDがLレベル、ライト信号WRがHレ
ベルになりメモリ30はライト・モードになる。ラッチ
回路31の出力アドレスWA1は依然としてマルチプレ
クサ33を経てメモリ30にアドレス信号として与えら
れている。したがって。Next, the read signal RD becomes L level, the write signal WR becomes H level, and the memory 30 enters the write mode. The output address WA1 of the latch circuit 31 is still applied to the memory 30 via the multiplexer 33 as an address signal. therefore.
ラッチ回路32にラッチされた加算結果ΣN11+N1
2が面積値エリアのアドレスW A 1の記憶場所に書
込まれることにより、ウィンドウW1についての面積値
の累積加算が行なわれる。Addition result latched in latch circuit 32 ΣN11+N1
2 is written to the storage location of address W A 1 in the area value area, thereby performing cumulative addition of area values for window W1.
最後にタイミング信号T1の立下りで画素カウンタ36
がクリアされ2次のウィンドウにおける画素の計数に備
える。Finally, at the falling edge of the timing signal T1, the pixel counter 36
is cleared in preparation for counting pixels in the secondary window.
第6図および第7図は第2の実施例を示している。これ
らの図において第4図および第5図に示したものと同一
物には同一符号を付し説明を省略し、異なる点について
のみ言及する。FIGS. 6 and 7 show a second embodiment. In these figures, the same components as those shown in FIGS. 4 and 5 are denoted by the same reference numerals, and the explanation thereof will be omitted, and only the different points will be mentioned.
タイミング制御回路23は入力するウィンドウ信号WD
、計測期間信号および水平同期信号HDに基づいて上記
第Iの実施例とは異なるタイミング信号T 、T
、T 、 リード信号RD、 ライト信号WRを出
力する。タイミング信号T。は第1の実施例と同じであ
る。タイミング信号T1はウィンドウ信号WDの立上り
で立上り、短い期間Hレベルとなる。タイミング信号T
2は信号T1の立下りの時点で立上り、ウィンドウ信号
WDが立下った少し後に立下る。リード信号RDはタイ
ミング信号T2の立下りで立下り、短い期間Lレベルと
なり、この間にライト信号WRがHレベルとなる。The timing control circuit 23 receives the input window signal WD.
, timing signals T, T, which are different from those of the above-mentioned first embodiment, based on the measurement period signal and the horizontal synchronization signal HD.
, T, outputs a read signal RD and a write signal WR. timing signal T. is the same as in the first embodiment. The timing signal T1 rises at the rise of the window signal WD and remains at H level for a short period of time. timing signal T
2 rises when the signal T1 falls, and falls a little after the fall of the window signal WD. The read signal RD falls at the fall of the timing signal T2 and remains at the L level for a short period of time, during which the write signal WR becomes the H level.
ゲート回路24はウィンドウ信号WDのみによって制御
される。Gate circuit 24 is controlled only by window signal WD.
画素カウンタ36はライト信号WRの立下りでクリアさ
れる。The pixel counter 36 is cleared at the fall of the write signal WR.
ラッチ回路31.32はそれぞれタイミング信号T、T
2の立下りによって制御される。マル■
チブレクサ33は上記のタイミング信号T。に加えてこ
れらのタイミング信号T 、T によって切換えら
れる。The latch circuits 31 and 32 are provided with timing signals T and T, respectively.
Controlled by the falling edge of 2. MULTI ■ Tibrexer 33 receives the above timing signal T. in addition to these timing signals T 1 and T 2 .
第2の実施例(後に示す第3の実施例も同じ)では第2
図(A)の(b)に示す垂直アドレス・テーブルが用い
られる。したがって第3水平走査期間におけるタイミン
グ信号T。の立下りのタイミングでウィンドウΦカウン
タ38にはアドレス番データW T 2がプリセットさ
れる。In the second embodiment (the same applies to the third embodiment shown later), the second
A vertical address table shown in Figure (A) (b) is used. Therefore, the timing signal T in the third horizontal scanning period. Address number data W T 2 is preset in the window Φ counter 38 at the falling timing of .
第3走査線においてウィンドウ信号の最初の立上がりが
あるとタイミング信号T1が立上り。When the window signal first rises on the third scanning line, the timing signal T1 rises.
ウィンドウ・カウンタ38のW T 2を表わすアドレ
ス信号が高速メモリ30に与えられるので、ウィンドウ
・テーブルからアドレス・データWA、が読出され、信
号T1の立下りのタイミングでラッチ回路31にラッチ
される。Since the address signal representing W T 2 of the window counter 38 is applied to the high speed memory 30, the address data WA is read from the window table and latched into the latch circuit 31 at the timing of the fall of the signal T1.
次にタイミング信号T2がHレベルになるので、ラッチ
回路31にラッチされていたアドレス・データWA1が
マルチプレクサ33を経てメモリ30に与えられ、これ
により9面積値エリアのデータΣN11が読出され、加
算器35に与えられる。ウィンドウ信号WDがHレベル
にある間2画素カウンタ36は2値化画像信号の黒レベ
ル画素を計数している。したがって、加算器35では更
新されつつある画素カウンタ36の計数値とデータΣN
11とが加算され、加算値が更新されていく。Next, since the timing signal T2 becomes H level, the address data WA1 latched in the latch circuit 31 is applied to the memory 30 via the multiplexer 33, and thereby the data ΣN11 of the 9 area value area is read out and the adder given to 35. While the window signal WD is at H level, the two-pixel counter 36 counts the black level pixels of the binary image signal. Therefore, in the adder 35, the count value of the pixel counter 36 which is being updated and the data ΣN
11 is added, and the added value is updated.
ウィンドウ信号WDが立下ると画素カウンタ36の計数
値は一定値になるので加算器35の加算結果も一定値Σ
N1、十N12となり、これがタイミング信号T2の立
下りの時点でラッチ回路32にラッチされる。When the window signal WD falls, the count value of the pixel counter 36 becomes a constant value, so the addition result of the adder 35 also becomes a constant value Σ
N1 and N12, which are latched by the latch circuit 32 at the falling edge of the timing signal T2.
次にライト信号WRがHレベルになってメモリ30がラ
イト・モードになると、ラッチ回路32にラッチされて
いた加算結果が面積値エリアのアドレスW A +にス
トアされる。ウィンドウ信号WDの立下りのタイミング
でウィンドウ・カウンタ3SJ
今インクレメントされる(計数値はW2+1となる)が
、マルチプレクサ33はラッチ回路31を選択している
ので、上記の加算結果のストア処理においてはラッチ回
路31の出力アドレスW A tによって面積値エリア
がアドレス指定される。この後。Next, when the write signal WR becomes H level and the memory 30 enters the write mode, the addition result latched in the latch circuit 32 is stored at address W A + in the area value area. The window counter 3SJ is now incremented at the falling edge of the window signal WD (the counted value becomes W2+1), but since the multiplexer 33 has selected the latch circuit 31, in the above storage process of the addition result, The area value area is addressed by the output address W A t of the latch circuit 31 . After this.
ライト信号WRの立下りによって画素カウンタ3Gがク
リアされる。The pixel counter 3G is cleared by the fall of the write signal WR.
この実施例では、ウィンドウ信号の立下りの後には累積
加算値のライト(ストア)処理が行なわれるにすぎない
ので2次のウィンドウ信号の立上りまでの期間を短くす
ることができる。これはウィンドウ相互間の水平方向間
隔をより狭くすることができる(たとえば1画素間隔に
できる)ことを意味する。In this embodiment, since the cumulative addition value is simply written (stored) after the fall of the window signal, the period until the rise of the secondary window signal can be shortened. This means that the horizontal spacing between the windows can be narrower (for example, one pixel apart).
第8図および第9図は第3の実施例を示すものであり、
構成がより簡素化されている。第9図は第2水平走査線
にそう動作を示しており、垂直カウンタ34の計数値Y
CTおよび水平同期信号HDの図示が省略されている。FIG. 8 and FIG. 9 show a third embodiment,
The configuration is more simplified. FIG. 9 shows such an operation on the second horizontal scanning line, and the count value Y of the vertical counter 34 is
Illustration of CT and horizontal synchronization signal HD is omitted.
ウィンドウ・カウンタ38の最後の計数値W1+2は意
味のないものである。The last count W1+2 of window counter 38 is meaningless.
第6図に示す第2実施例と異なる点は加算器35および
ラッチ回路32が省略されている点である。The difference from the second embodiment shown in FIG. 6 is that the adder 35 and latch circuit 32 are omitted.
ここでは、タイミング信号T。の立下りまたは1つ前の
ウィンドウの処理の後に立上るリード信号RDによって
タイミング信号T1を発生させ1次のウィンドウのウィ
ンドウ信号が立上る前に次のウィンドウに対するアドレ
ス・データWA、Cj一1〜n)をウィンドウ・テーブ
ルから読出し−ている。そして、タイミング信号T1の
立下りによって立上るタイミング信号T2によってその
アドレス・データWA、を用いて累積積算値ΣNjIを
面積値エリアから読出し、信号T2の立下りの時点で画
素カウンタ36にプリセットしている。したがって1次
にウィンドウ信号WDが立上って2値化された画素信号
が画素カウンタ3Bに与えられると画素カウンタ36は
プリセット値から入力信号を加算的に計数していくこと
になる。ウィンドウ信号が立下った時点における画素カ
ウンタ3Bの計数値が新たな累積加算値を表わし、これ
がその後面積値エリアの対応する記憶エリアにストアさ
れる。Here, the timing signal T. The timing signal T1 is generated by the read signal RD which rises after the falling edge of or the processing of the previous window, and the address data WA, Cj-1 to Cj for the next window is generated before the window signal of the primary window rises. n) from the window table. Then, the cumulative integration value ΣNjI is read out from the area value area using the address data WA by the timing signal T2 which rises in response to the fall of the timing signal T1, and is preset in the pixel counter 36 at the time of the fall of the signal T2. There is. Therefore, when the window signal WD rises to the primary level and the binarized pixel signal is applied to the pixel counter 3B, the pixel counter 36 counts the input signal additively from the preset value. The count value of the pixel counter 3B at the time when the window signal falls represents a new cumulative addition value, which is then stored in the corresponding storage area of the area value area.
第1図は撮像装置の画面とそこに設定されるウィンドウ
との関係を示す図である。
第2図(A) (B) (C)はメモリに設けられる垂
直アドレス・テーブルとウィンドウ・テーブルと面積値
エリアを示す図であり、第2図(A)において(a)は
第1実施例の、(b)は第2.第3実施例の垂直アドレ
ス・テーブルを示している。
第3図は1フイ一ルド期間における動作の概要を説明す
るためのタイム・チャートである。
第4図はこの発明の第1実施例を示すブロック図、第5
図はその動作を示すタイム・チャートである。
第6図は第2実施例を示すブロック図、第7図はその動
作を示すタイム・チャートである。
第8図は第3実施例を示すブロック図、″第9図はその
動作を示すタイム・チャートである。
10・・・CPU。
20・・・ウィンドウ・メモリ。
21・・・P/S変換回路。
23・・・タイミング制御回路。
30・・・高速メモリ。
31、32・・・ラッチ回路。
34・・・垂直カウンタ。
35・・・加算器、36・・・画素カウンタ。
38・・・ウィンドウ・カウンタ。
40・・・カメラ、42・・・2値化回路。
以 上
特許出願人 立石電機株式会社
代 理 人 弁理士 牛 久 健 司(外1名)FIG. 1 is a diagram showing the relationship between the screen of the imaging device and the windows set there. FIGS. 2(A), 2(B), and 2(C) are diagrams showing a vertical address table, a window table, and an area value area provided in the memory, and in FIG. 2(A), (a) shows the first embodiment. , (b) is the second. 7 shows a vertical address table of a third embodiment. FIG. 3 is a time chart for explaining the outline of the operation during one field period. FIG. 4 is a block diagram showing the first embodiment of the present invention, and FIG.
The figure is a time chart showing the operation. FIG. 6 is a block diagram showing the second embodiment, and FIG. 7 is a time chart showing its operation. FIG. 8 is a block diagram showing the third embodiment, and FIG. 9 is a time chart showing its operation. 10... CPU. 20... Window memory. 21... P/S conversion. Circuit. 23... Timing control circuit. 30... High speed memory. 31, 32... Latch circuit. 34... Vertical counter. 35... Adder, 36... Pixel counter. 38...・Window counter. 40...Camera, 42...Binarization circuit. Patent applicant: Tateishi Electric Co., Ltd. Representative, Patent attorney: Kenji Ushiku (1 other person)
Claims (1)
じめ記憶する第1の記憶手段、 上記第1の記憶手段に記憶されている処理領域を撮像装
置の走査と同期して読出しかつ処理領域を表わす領域信
号を発生する手段、 上記第1の記憶手段に設定された複数の処理領域が水平
走査線ごとに現われる順序のパターンをあらかじめ記憶
しておく第2の記憶手段、 各水平走査線ごとにその水平走査線で現われる処理領域
の順序パターンを指定するデータを記憶しておく第3の
記憶手段、 複数の処理領域ごとにそれらの領域における累積面積値
を記憶するための第4の記憶手段、撮像装置から読出さ
れた画像信号に基づいて上記領域信号を参照して各水平
走査線上の処理領域ごとに所定の特徴画像を表わす画素
数を計数する手段、および 各水平走査線ごとに第3の記憶手段を参照して、第2の
記憶手段におけるその水平走査線で現われる処理領域の
順序パターンを指定し、その水平走査線で現われる処理
領域ごとに、上記の指定された順序パターンにおける順
序にしたがって、上記第4の記憶手段に記憶されている
対応処理領域の累積面積値に上記計数手段による計数値
を加算して上記第4の記憶手段に記憶されている累積面
積値を更新する手段、 を備えた画像処理装置。[Scope of Claims] A first storage means for storing in advance a plurality of processing areas set within the field of view of an imaging device; a means for generating an area signal representing the processing area, a second storage means for storing in advance a pattern of the order in which the plurality of processing areas set in the first storage means appear for each horizontal scanning line; a third storage means for storing, for each horizontal scanning line, data specifying the order pattern of processing areas appearing in that horizontal scanning line; a fourth storage means, means for counting the number of pixels representing a predetermined characteristic image for each processing area on each horizontal scanning line by referring to the area signal based on the image signal read from the imaging device; For each line, the third storage means is referred to, and the order pattern of processing areas appearing in that horizontal scanning line in the second storage means is specified, and for each processing area appearing in that horizontal scanning line, the above specified The cumulative area value stored in the fourth storage means is obtained by adding the count value by the counting means to the cumulative area value of the corresponding processing area stored in the fourth storage means in accordance with the order in the order pattern. An image processing device comprising means for updating.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62256301A JPH0199183A (en) | 1987-10-13 | 1987-10-13 | Image processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62256301A JPH0199183A (en) | 1987-10-13 | 1987-10-13 | Image processor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0199183A true JPH0199183A (en) | 1989-04-18 |
Family
ID=17290758
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62256301A Pending JPH0199183A (en) | 1987-10-13 | 1987-10-13 | Image processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0199183A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0468941U (en) * | 1990-10-22 | 1992-06-18 |
-
1987
- 1987-10-13 JP JP62256301A patent/JPH0199183A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0468941U (en) * | 1990-10-22 | 1992-06-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9811751B2 (en) | Image pickup apparatus with boundary identifier for areas of interest | |
| US8699753B2 (en) | Object detecting device, image dividing device, integrated circuit, method of detecting object, object detecting program, and recording medium | |
| JP3237975B2 (en) | Image processing device | |
| JP2810660B2 (en) | Particle image analyzer | |
| JPH0199183A (en) | Image processor | |
| US5062142A (en) | Data processor producing a medial axis representation of an extended region | |
| JPS6280785A (en) | Image memory device | |
| JPH0199182A (en) | Image processor | |
| US20140313381A1 (en) | Image pickup apparatus | |
| JPS5975786A (en) | Thermography device | |
| CN115861740A (en) | Sample generation method and sample generation device in industrial detection | |
| JPH0199184A (en) | Image processor | |
| EP0380090A2 (en) | Image processing system | |
| JPH0370089A (en) | Picture processing device | |
| JPH0762795B2 (en) | Image extractor | |
| JPH11191866A (en) | Defective pixel interpolation device, imaging device, and computer-readable storage medium | |
| JPS5914782B2 (en) | Binary pattern digitization processing method | |
| JPH02199590A (en) | Image processor | |
| JPH10201745A (en) | X-ray equipment | |
| JPS62287385A (en) | Removing method for fine particle | |
| JPH04290176A (en) | Image accumulating device and image processing device provided therewith | |
| JPS5821107A (en) | pattern inspection equipment | |
| JPH11136578A (en) | Imaging device, computer-readable storage medium, and digital imaging device | |
| JPS63219086A (en) | Image area measuring instrument | |
| JPH0129643Y2 (en) |