JPS63305474A - Filter circuit - Google Patents

Filter circuit

Info

Publication number
JPS63305474A
JPS63305474A JP14118787A JP14118787A JPS63305474A JP S63305474 A JPS63305474 A JP S63305474A JP 14118787 A JP14118787 A JP 14118787A JP 14118787 A JP14118787 A JP 14118787A JP S63305474 A JPS63305474 A JP S63305474A
Authority
JP
Japan
Prior art keywords
filter
row
circuit
register
data
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
JP14118787A
Other languages
Japanese (ja)
Inventor
Kenji Okamoto
賢司 岡本
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.)
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Electric Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sumitomo Electric Industries Ltd filed Critical Sumitomo Electric Industries Ltd
Priority to JP14118787A priority Critical patent/JPS63305474A/en
Publication of JPS63305474A publication Critical patent/JPS63305474A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To optionally change the size of a filter by adding a function for changing the flow of data to a circuit system for executing filter processing based on a data flow system. CONSTITUTION:A filter circuit obtained by combining line filters corresponding to the number of filters with maximum size in series and the line filters are provided with multipliers 11-15, delay units 16-20 and address 31-35. In case of using the filter circuit for the filter with the maximum size, all the line circuits are connected in series. In case of using the filter circuit for a filter with a smaller size, only the line filter circuits corresponding to the filter size and used and combination of multipliers, delay units and adders corresponding to the filter size out of the filter circuits are used. Thus, the filter size can be switched.

Description

【発明の詳細な説明】 ■技術分野 この発明は、ディジタル画像処理分野における「実時間
フィルタ処理」を実現するための回路構成に関する。
DETAILED DESCRIPTION OF THE INVENTION Technical Field The present invention relates to a circuit configuration for realizing "real-time filter processing" in the field of digital image processing.

ディジタル画像というのは、ひとつの画面をたとえばn
×nの画素に分割し、画素ごとにひとつのデータを対応
させたものの集合よりなる画像のことである。画素デー
タは1ビツトの黒白画像のこともあるし、よりビット数
の多いカラー画像の場合もある。
A digital image is a single screen, for example,
It is an image that is divided into ×n pixels and is a set of data that corresponds to each pixel. The pixel data may be a 1-bit black and white image, or it may be a color image with a larger number of bits.

第4図は(nXn)の画像の、画素の定義などを説明す
る図である。
FIG. 4 is a diagram illustrating the definition of pixels of an (nXn) image.

横方向に番号を付し、1.2、…、ql…n とする。Numbers are given in the horizontal direction, 1.2,...,ql...n.

これを列番号という事がある。This is sometimes called the column number.

縦方向に番号を付し、1.2、…、pl…nとする。Numbers are given in the vertical direction, 1.2, . . . , pl...n.

これを行番号という事がある。This is sometimes called a line number.

p行目q列目の画素の座標を(p%q)と書く。The coordinates of the pixel in the pth row and qth column are written as (p%q).

前後を反対にする表記法もあるが、ここでは、行番号、
列番号の順とする。
There is also a notation that reverses the front and back, but here we use the line number,
Sort by column number.

この画素のディジタル化したデータの値をd(p%q)
と書く。
The value of the digitized data of this pixel is d(p%q)
Write.

フィルタというのは、画面の任意の場所に於ける画像の
特徴を抽出したりするためのもので、正方形状の小領域
に定数係数を対応させたものである。
A filter is used to extract features of an image at any location on the screen, and is made by associating constant coefficients with small square areas.

第4図に示すように、フィルタは例えばmXmの正方形
小領域よりなる。この小領域にも、画素というべきもの
が定義できる。横方向に列番号1.2、…、j、…m、
縦方向に行番号1.2、…、i、…mが付されている。
As shown in FIG. 4, the filter consists of, for example, a small square area of m×m. What should be called a pixel can also be defined in this small area. Row numbers 1.2, ..., j, ...m in the horizontal direction
Row numbers 1.2, . . . , i, . . . m are given in the vertical direction.

フィルタに於ける画素位置は(i、j)によって示す。The pixel position in the filter is denoted by (i,j).

によって示す。Indicated by

フィルタの画素はデータを持っているのではなく、定数
係数αijを持っている。従って、本来の画素ではない
が、画像上の画素に対応づける事ができる。
The pixels of the filter do not have data, but rather constant coefficients αij. Therefore, although it is not an original pixel, it can be associated with a pixel on the image.

定数係数(αij)の選び方により、局所的な画像の特
徴の有無を知る事ができる。
Depending on how the constant coefficients (αij) are selected, it is possible to know the presence or absence of local image features.

フィルタは、画面上のどの位置に設定する事もできる。Filters can be placed anywhere on the screen.

フィルタの画面上での位置を表現するために、次のよう
にする。
To express the position of the filter on the screen, do the following:

画面上にフィルタを置いた時、フィルタの右下に対応す
る画面上の画素番号を(p%Q)とする。
When the filter is placed on the screen, the pixel number on the screen corresponding to the lower right corner of the filter is (p%Q).

この場合、フィルタの位置を(1)%Q)という事にす
る。
In this case, the position of the filter is set to (1)%Q).

フィルタ位置の表わし方は、その他にもある。There are other ways to represent the filter position.

フィルタの中心の画素の番号で表わす事もできる。It can also be expressed by the number of the pixel at the center of the filter.

フィルタの左上の画素の番号で表わす事もできる。It can also be expressed by the number of the pixel at the top left of the filter.

ここでは右下の画素の番号(pxq)で、フィルタの位
置を表現する。
Here, the position of the filter is expressed by the number (pxq) of the lower right pixel.

さて、画面の(plq)の位置で、フィルタを作用させ
る、という事は、次の値A(pxq)を計算する、とい
う事である。
Now, applying the filter at the position (plq) on the screen means calculating the next value A(pxq).

つまり、フィルタを右下が画素(psq)に合致するよ
う画面の上に置き、各画素の値dに、その画素の上にあ
るフィルタの数係数を乗算し、その和を演算する。
That is, the filter is placed on the screen so that the lower right side matches the pixel (psq), the value d of each pixel is multiplied by the coefficient of the filter above that pixel, and the sum is calculated.

フィルタの右下がm行、m列である。フィルタのi行j
列の数係数αijである。(pxq)がm行m列に対応
しているから、(p −m+ i 、 q −m+ j
 )がフィルタのi行j列に対応する事になる。i行j
列からm行m列まで、行方向に(m−i)、列方向に(
m−j)だけ進めばよいからである。
The bottom right of the filter is m rows and m columns. filter i row j
The column number coefficient αij. Since (pxq) corresponds to m rows and m columns, (p −m+ i , q −m+ j
) corresponds to the i-th row and j-th column of the filter. i row j
From column to m rows and m columns, in the row direction (m-i), in the column direction (
This is because it is only necessary to advance by m−j).

フィルタのi行j列が、αijの数係数を持ち、これに
重なる画素が(p−m+i、 q−m+j )であり、
そのデータがd (p−m+i 、 q−m+j )で
あるがら、(1)式のように表現できるのである。
The i-th row and j-th column of the filter has a numerical coefficient of αij, and the pixels that overlap this are (p-m+i, q-m+j),
Although the data is d (p-m+i, q-m+j), it can be expressed as in equation (1).

A(psq)を(p、q)に対するフィルタ演算値と呼
ぶ。フィルタ演算値を求める事をフィルタ処理という。
A(psq) is called the filter calculation value for (p, q). Obtaining the filter calculation value is called filter processing.

0)従来技術 従来、フィルタ処理を行なうために、画像メモリに、全
画素のデータd(plq)を記憶させておき、これを順
次読み出して、数係数■ijを乗じてフィルタ演算値A
(p、q)を求めていた。
0) Prior Art Conventionally, in order to perform filter processing, data d(plq) of all pixels is stored in an image memory, and this data is sequentially read out and multiplied by a numerical coefficient ■ij to obtain a filter calculation value A.
I was looking for (p, q).

このようにするためには、画像メモリに、全画素のデー
タを書き込む必要がある。
In order to do this, it is necessary to write data for all pixels into the image memory.

しかし、画面は次々と更新されてゆく。However, the screen is updated one after another.

たとえば1秒間に30画面という高速で更新される。こ
れをビデオレートという。画素は例えばn=512とす
ると、n X n=262144となる。
For example, it is updated at a high speed of 30 screens per second. This is called the video rate. For example, if n=512, then n x n=262144 pixels.

このように大量の画素のデータを1X30秒ごとに更新
してゆくことになる。画像メモリにデータを書込むが、
1/3o秒ごとに変わる。データを書込んでから(1)
式の演算を行なわなければならないが、このような高速
の演算は困難である。画面が変わるごとに、データ書込
み、フィルタ処理を平行して行なうという事ができない
In this way, a large amount of pixel data is updated every 1×30 seconds. Writing data to image memory,
It changes every 1/3o second. After writing data (1)
It is necessary to perform calculations on the expressions, but such high-speed calculations are difficult. Data writing and filter processing cannot be performed in parallel each time the screen changes.

ところが、画像処理分野で、フィルタ演算を実時間処理
に行ないたいという要求が強い。
However, in the field of image processing, there is a strong demand to perform filter calculations in real time.

実時間フィルタ演算を行なうためには、画素データをい
ったんメモリに書き込み、これを読み出して演算する、
という時間のかかる方法を採用する事ができない。
In order to perform real-time filter calculations, pixel data is first written into memory, then read out and calculated.
It is not possible to adopt such a time-consuming method.

本出願人は、既に、3×3のサイズのフィルタ演算を行
なう回路を開発している。
The applicant has already developed a circuit that performs a 3×3 size filter operation.

フィルタのサイズは3×3でも5X5でもよいが、サイ
ズは一定不変であって容易に変更する事ができない。
The size of the filter may be 3×3 or 5×5, but the size is fixed and cannot be easily changed.

第3図によって、実時間フィルタ演算回路を説明する。The real-time filter calculation circuit will be explained with reference to FIG.

画面上の画素を走査する順は、次のようである。The order in which pixels on the screen are scanned is as follows.

第1行目を左から右へまず走査する。ついで、第2行目
を左から右へ走査する。さらに、第3行目を左から右へ
走査する。このようにして、最下行にまで至る。
The first row is first scanned from left to right. Then, the second line is scanned from left to right. Furthermore, the third row is scanned from left to right. In this way, we reach the bottom row.

列番号が同じであって、行番号が異なるものは、走査順
としてn番の違いがある。
If the column numbers are the same but the row numbers are different, there is a difference of n in scanning order.

フィルタがmXmのフィルタとすると、フィルタの中に
含まれるある行の右端の画素から、次の行の左端の画素
に至るまでに(n−m)個の画素が走査される事になる
If the filter is an m×m filter, (n−m) pixels are scanned from the rightmost pixel of a certain row to the leftmost pixel of the next row included in the filter.

m=3であれば、ある行から、次の行までフィルタのな
い部分の(n−3)個の画素が走査されるという事にな
る。そうすると、(n−3)画素分の走査に要する時間
だけデータに遅延を与える遅延回路を通せば、フィルタ
のi行目に対応する画素データにひきつづいて(i+1
)行目に対応する画素データが得られるという事になる
If m=3, then (n-3) pixels in the area without a filter are scanned from one row to the next row. Then, if the data is passed through a delay circuit that delays the data by the time required to scan for (n-3) pixels, the pixel data corresponding to the i-th row of the filter will be followed by (i+1
) This means that the pixel data corresponding to the row is obtained.

第3図の回路はこういう着想のもとでなされた実時間フ
ィルタ処理回路である。
The circuit shown in FIG. 3 is a real-time filter processing circuit based on this idea.

第5図に示すような3×3のフィルタに対する処理であ
る。サフィックスが2つある数係数α1、などは煩雑で
あるので、フィルタの左上からの数係数をF工、F2、
…、F9とする。
This is processing for a 3×3 filter as shown in FIG. A numerical coefficient with two suffixes, such as α1, is complicated, so the numerical coefficients from the top left of the filter are F, F2, etc.
..., F9.

第3図の回路は、フィルタの1行目F0〜F3について
処理を行なう1行目フィルタ回路、フィルタの2行目F
4〜F6について処理を行なう2行目フィルタ回路、フ
ィルタの3行目F7〜F9について処理を行なう3行目
フィルタ回路よりなる。
The circuit in Figure 3 includes a first line filter circuit that processes the first line F0 to F3 of the filter, and a second line F
It consists of a second row filter circuit that processes filters 4 to F6, and a third row filter circuit that processes filters 3rd row F7 to F9.

入力データは、3行目フィルタ回路の方から伝えられる
。これは(n−3)クロック遅延回路102を経て、2
行目フィルタ回路に伝わる。これがさらに、(n−3)
クロック遅延回路101を経て1行目フィルタ回路に伝
わる。
Input data is transmitted from the third row filter circuit. This passes through (n-3) clock delay circuits 102,
It is transmitted to the row filter circuit. This further becomes (n-3)
The signal is transmitted to the first row filter circuit via the clock delay circuit 101.

1行目フィルタ回路のかけ算器、103.104.10
5は入力データと、フィルタの1行目の数係数F0、F
2、F3の乗算を行なう。2行目、3行目フィルタ回路
も同様である。
Multiplier of first row filter circuit, 103.104.10
5 is the input data and the numerical coefficients F0 and F in the first row of the filter.
2. Perform multiplication by F3. The same applies to the second and third row filter circuits.

出力データのフローは、入力データとは反対で、1行目
フィルタ回路の方から、3行目フィルタ回路へと進む。
The flow of output data is opposite to that of input data, from the first row filter circuit to the third row filter circuit.

この間に加算器121〜129と、1クロツク遅延器1
12〜120が交互に設けられている。
During this time, adders 121 to 129 and 1 clock delay unit 1
12 to 120 are provided alternately.

簡単のため、フィルタの1行目左上の数係数が乗じられ
るべき画素データをDlとし、以下衣へD2、D3とす
る。二行目の画素データをD4、D5、D6とする。三
行目はD7〜D9とする。さきほどの(1)式に対応さ
せると、Dg=d(ps q)  DI=d(p−2%
(1−2)である。
For simplicity, the pixel data to be multiplied by the numerical coefficient at the top left of the first row of the filter is designated as Dl, and hereinafter as D2 and D3. Let the pixel data of the second row be D4, D5, and D6. The third line is D7 to D9. Corresponding to the previous equation (1), Dg=d(ps q) DI=d(p-2%
(1-2).

入力データD0〜D3が連続して与えられ、(n 3)
クロック後にD4〜D6が連続して与えられる。さらに
(n−3)クロック後にD7〜D9のが連続して与えら
れる。
Input data D0 to D3 are given consecutively, (n 3)
After the clock, D4 to D6 are applied consecutively. Furthermore, after (n-3) clocks, D7 to D9 are applied successively.

Dlが遅延器102.101を通抜けて1行目フィルタ
回路の入力線131に至る。かけ算器103によりD工
×F1が演算される。この値は加算器121で“0”と
加算される。DIF工になる。
Dl passes through the delay devices 102 and 101 and reaches the input line 131 of the first row filter circuit. The multiplier 103 calculates D×F1. This value is added to "0" by the adder 121. Become a DIF engineer.

次のクロックで、DIF、は遅延器112を通り加算器
122に入力される。同時に、D2が1行目フィルタ回
路入力線131に至る。かけ算器104により、D 2
 X F 2が演算される。この値と、さき程のDIF
工とが加算器122で加算される。
At the next clock, DIF passes through the delay device 112 and is input to the adder 122. At the same time, D2 reaches the first row filter circuit input line 131. By the multiplier 104, D 2
X F 2 is calculated. This value and the DIF from earlier
and are added by an adder 122.

3番目のクロックで、この和が遅延器113を通り、加
算器123に入力される。同時にD3が入力線131に
現われる。かけ算器105により、D3XF3が演算さ
れる。加算器123で、これら3つの積が加算される。
At the third clock, this sum passes through the delay device 113 and is input to the adder 123. At the same time, D3 appears on input line 131. Multiplier 105 calculates D3XF3. Adder 123 adds these three products.

4番目のクロックで、加算器123の出力が遅延器11
4を経て、加算器124に入力される。同時に、2行目
ののデータD5が2行目フィルタ回路の入力線132に
至る。D4とD5の間には(n−3)個の画素が介在す
るので、この分を(n−3)クロック遅延回路101に
よって一時保持することになる。かけ算器106がD4
×F4を演算する。この値と、これまでの加算結果とが
加えられる。
At the fourth clock, the output of the adder 123 is sent to the delay device 11.
4 and is input to the adder 124. At the same time, the second row data D5 reaches the input line 132 of the second row filter circuit. Since there are (n-3) pixels between D4 and D5, this number is temporarily held by the (n-3) clock delay circuit 101. Multiplier 106 is D4
Calculate ×F4. This value and the previous addition results are added.

以下同様にして、9番目のクロック時に、これらの全て
の和DIFよ+…+D9F9が求められる事になる。
Thereafter, in the same manner, at the ninth clock, the sum DIF of all these +...+D9F9 is obtained.

このような回路は、実時間フィルタ処理を可能にする有
用な回路である。
Such circuits are useful circuits that enable real-time filtering.

しかしながら、この回路は、フィルタサイズが固定され
ているという問題がある。この例であれば3×3のフィ
ルタに対してしか使えない。柔軟性のない回路である。
However, this circuit has a problem in that the filter size is fixed. This example can only be used for a 3×3 filter. It is an inflexible circuit.

(つ)  目     的 3×3のフィルタであっても、5×5のフィルタであっ
ても使用する事ができるというように、フィルタサイズ
の変更に対応できる実時間フィルタ演算回路を提供する
事が本発明の目的である。
(1) Purpose: To provide a real-time filter calculation circuit that can accommodate changes in filter size, such as being able to use either a 3x3 filter or a 5x5 filter. This is the object of the present invention.

に)構 成 本発明のフィルタ回路は、フィルタの最大寸法の数だけ
の行フィルタ回路を直列に組合わせたものである。行フ
ィルタ回路はフィルタ最大寸法の数だけのかけ算器、遅
延器、加算器の組を備えている。
B) Structure The filter circuit of the present invention is a combination of row filter circuits in series, the number of which is equal to the maximum dimension of the filter. The row filter circuit has as many sets of multipliers, delays, and adders as there are filter maximum dimensions.

最大寸法のフィルタに対して使用する時は、これら全て
の回路を直列につないで使用する。第3図の回路と同様
になる。
When used for filters of maximum size, all of these circuits are connected in series. The circuit becomes similar to the circuit shown in FIG.

より小さい寸法のフィルタに対して使用する時は、フィ
ルタ寸法に等しい数だけの行フィルタ回路のみを使用す
る。行フィルタ回路の中でも、フィルタ寸法に等しい数
だけのかけ算器、遅延器、加算器の組のみを使用する。
When used with smaller size filters, only a number of row filter circuits equal to the filter size are used. Among the row filter circuits, only sets of multipliers, delays, and adders whose number is equal to the filter size are used.

このようにして、フィルタサイズの切換えを行なう事が
できるようにしている。
In this way, the filter size can be changed.

第1図はひとつの行フィルタ回路の回路構成図である。FIG. 1 is a circuit diagram of one row filter circuit.

この行フィルタ回路を直列につなぐ。第2図は5つの行
フィルタ回路f工〜f5を直列につないだ例を示してい
る。
Connect these row filter circuits in series. FIG. 2 shows an example in which five row filter circuits f to f5 are connected in series.

以下、最大フィルタサイズが5×5である例を説明する
。5×5でも3×3でも使うことのできるフィルタ演算
回路の例である。
An example in which the maximum filter size is 5×5 will be described below. This is an example of a filter calculation circuit that can be used in either 5×5 or 3×3.

第1図により行フィルタ回路の構成を説明する。The configuration of the row filter circuit will be explained with reference to FIG.

画素ごとに画面を走査して得られる入力データ列は、主
入力データ線2から、分岐して得られる。
The input data string obtained by scanning the screen pixel by pixel is obtained by branching from the main input data line 2.

この行フィルタ回路は入力データを入力線4から得る。This row filter circuit gets its input data from input line 4.

主入力データ線2のデータは遅延シフトレジスタ1を経
て、次の行フィルタ回路の主入力データ線3へ伝達され
る。
The data on the main input data line 2 is transmitted via the delay shift register 1 to the main input data line 3 of the next row filter circuit.

遅延シフトレジスフの遅延数lは、フィルタの寸法によ
って切換える。このため、コンピュータからのシフト段
数指令が遅延シフトレジスタ1に与えられている。
The delay number l of the delay shift register is changed depending on the dimensions of the filter. For this reason, a shift stage number command is given to the delay shift register 1 from the computer.

以下の回路は、第3図の回路とほぼ同様である。The following circuit is substantially similar to the circuit of FIG.

重複する部分も多いが、詳しく説明する。Although there are many overlaps, I will explain them in detail.

5×5のフィルタに対しても適用できるよう、5つのか
け算器、遅延器、加算器の組が、この行フィルタ回路に
設けられている。
Five multiplier, delay, and adder sets are provided in this row filter circuit so that it can also be applied to a 5×5 filter.

入力線4に対し、5つのかけ算器11.12、…、15
が設けられる。これは後に説明するように、実際にはか
け算をしないが、ここではかけ算器といい、入力データ
と、フィルタの値トの乗算の結果を与える回路という意
味で使う。
For input line 4, five multipliers 11.12,...,15
is provided. As will be explained later, this does not actually perform multiplication, but here it is called a multiplier, and is used here to mean a circuit that multiplies the input data and the filter value t.

かけ算器は、データ(D)と、フィルタの係数(α)と
の積を求めるものである。フィルタの係数はiljをサ
フィックスに持つ。行フィルタ回路fiが、i=i  
j=1〜5のデータについてフィルタ演算ヲする。
The multiplier calculates the product of the data (D) and the filter coefficient (α). The filter coefficients have ilj as a suffix. The row filter circuit fi has i=i
A filter operation is performed on the data of j=1 to 5.

第6図に5×5サイズのフィルタを示す。行フィルタf
iは、横方向に数係数α1j(i=1〜5)を持ってい
る。
FIG. 6 shows a 5×5 size filter. row filter f
i has a numerical coefficient α1j (i=1 to 5) in the horizontal direction.

行フィルタfiはこれらと、データd(p−m+H。The row filter fi uses these and the data d(p-m+H.

q−m+Hの積を計算し、この結果を加え合わせるもの
である。
The product of q-m+H is calculated and the results are added together.

すなわち、i番目のフィルタ回路fiの全体が第1図に
示されているのであるが、ここで行う演算は、行演算 Bi== Σ αij d (p −m+ i 、 q
 −m+ j )   (2)j=1 のみである。これが後で述べるように加算されて、A=
ΣBiを得るのである。
That is, the entire i-th filter circuit fi is shown in FIG. 1, and the operation performed here is a row operation Bi== Σ
-m+j) (2) Only j=1. These are added as described later, and A=
ΣBi is obtained.

そこで説明を簡単にするため、α1j=Gj1d (p
−5+i、 q−5+j ) =Djとする。つまり、
このフィルタで行う演算は B = DB Gt +H2G2 +D3G3 + D
a G4 +Ds Gs    (3)であるとする。
Therefore, to simplify the explanation, α1j=Gj1d (p
−5+i, q−5+j ) =Dj. In other words,
The calculation performed by this filter is B = DB Gt +H2G2 +D3G3 + D
Suppose that a G4 +Ds Gs (3).

フィルタ番号iを省略しただけである。The filter number i is simply omitted.

かけ算器11〜15の出力は、1ビツト遅延器16〜2
0を通って、たし算器31〜35に入る。
The outputs of multipliers 11-15 are sent to 1-bit delayers 16-2.
0 and enters adders 31-35.

1ビツト遅延器というのは、データを1クロック分だけ
保持する機能を持つ素子である。具体的にはレジスタで
ある。そこで、遅延器というかわりに、より具体的にレ
ジスタという事にする。
A 1-bit delay device is an element that has the function of holding data for one clock. Specifically, it is a register. Therefore, instead of calling it a delay device, I will refer to it more specifically as a register.

たし算器31〜35の間には、レジスタ21〜26が直
列につながれている。
Registers 21-26 are connected in series between adders 31-35.

入力データの流れは右から左となる。出力データの流れ
は左から右となる。反対方向である。
The input data flow is from right to left. The output data flow is from left to right. It's in the opposite direction.

レジスタ21から、たし算器、レジスタの交互列を経て
、レジスタ26に至るのは、主出力データ線6である。
From register 21, via an adder and alternating columns of registers, to register 26 is main output data line 6.

5×5フイルタの時に使う。Used when using a 5x5 filter.

この他にバイパスデータ線7と、0データ線8とが設け
られている。3×3フイルタの時に使うものである。
In addition, a bypass data line 7 and a 0 data line 8 are provided. This is used when using a 3x3 filter.

バイパスデータ線7は、レジスタ21の直前と、レジス
タ23の直後の出力データ線をバイパスしている。途中
にレジスタ27がある。
The bypass data line 7 bypasses the output data line immediately before the register 21 and the output data line immediately after the register 23. There is a register 27 on the way.

0データ線8は、接地端を持つ。途中に、レジスタ28
があり、レジスタ23の直後の出力データ線につながっ
ている。
0 data line 8 has a ground end. On the way, register 28
is connected to the output data line immediately after the register 23.

レジスタ23.27.28は重要な機能を果す。説明の
便宜のため、レジスタASB、 Cと呼ぶ。
Registers 23.27.28 serve important functions. For convenience of explanation, they will be referred to as registers ASB and C.

これらのレジスタA、 B、 Cには、フィルタサイズ
切換回路5のイネーブル信号線41.42.43がつな
がれている。それぞれのレジスタA、 B、 Cにイネ
ーブル信号a%b、 cが、適当に与えられる。
Enable signal lines 41, 42, and 43 of the filter size switching circuit 5 are connected to these registers A, B, and C. Enable signals a%b, c are appropriately applied to the respective registers A, B, and C.

イネーブルa、 b、 cであれば、これらのレジスタ
はデータを出力する。ディスエーブルi%■、τであれ
ば、データを出力しない。
If enable a, b, c, these registers output data. If disabled i%■, τ, no data is output.

フィルタサイズ切換回路5は、コンピュータからの指令
により、レジスタA%B1Cヘイネーブル、又はディス
エーブル信号を与える。
The filter size switching circuit 5 provides a register A%B1C hay enable or disable signal according to a command from the computer.

(4)  作   用  (5X5) 5×5サイズのフィルタ処理回路として使う場合の作用
を説明する。この場合、直列に接続された5つの行フィ
ルタ回路f工〜f5の全てを使う。第2図(a)に示す
ようになる。
(4) Effect (5×5) The effect when used as a 5×5 size filter processing circuit will be explained. In this case, all five row filter circuits f-f5 connected in series are used. The result is as shown in FIG. 2(a).

第1図の行フィルタ回路は、f工〜f5のうちのいずれ
かひとつである。入力データは、先はど述べたようにD
1〜D5とし、フィルタの値(α)はG工〜G5とする
The row filter circuit in FIG. 1 is one of f-f5. The input data is D as mentioned earlier.
1 to D5, and the filter value (α) is G to G5.

前段の行フィルタ回路の出力がYであるとする。Assume that the output of the preceding row filter circuit is Y.

最前段の行フィルタf0に対しては、Y−0と置けばよ
い。
For the row filter f0 at the frontmost stage, it is sufficient to set it as Y-0.

入力データは、画面をラスク順に走査したことによって
得られる画素データの系列である。
The input data is a series of pixel data obtained by scanning the screen in rask order.

(1)最初のクロックで、入力線4にデータD1が与え
られる。Dlというのは既に述べたようにd (p5+
i、 q−5+1 )の事である。
(1) Data D1 is applied to the input line 4 at the first clock. As already mentioned, Dl is d (p5+
i, q-5+1).

かけ算器11は、Dlと係数G工との積を求め、レジス
タ16をで与える。Goというのはα11の事である。
Multiplier 11 calculates the product of Dl and coefficient G, and provides register 16 with . Go means α11.

前段フィルタの出力Yがレジスタ21に保持されている
が、たし算器31はこれらを加えて(Y+DIG、)を
求める。
The output Y of the pre-stage filter is held in the register 21, and the adder 31 adds these to obtain (Y+DIG,).

(2)2番目のクロックで、入力線4にデータD2が与
えられる。これはd (p−5+ i、 q−5+2 
)である。
(2) Data D2 is applied to the input line 4 at the second clock. This is d (p-5+ i, q-5+2
).

かけ算器12がD2と02の積を求める。これがレジス
タ17に保持される。
Multiplier 12 calculates the product of D2 and 02. This is held in register 17.

同時に、たし算器31の値(Y+D、 G1)がレジス
タ22に与えられる。
At the same time, the value (Y+D, G1) of the adder 31 is given to the register 22.

たし算器32は、レジスタ22.17の出力の和(Y+
01°1+D2°2)を求める・(3)3番目のクロッ
クで、データD3が与えられる。
Adder 32 calculates the sum (Y+
01°1+D2°2) (3) Data D3 is given at the third clock.

かけ算器13でD3と03の積が求められて、レジスタ
18に保持される。
The multiplier 13 calculates the product of D3 and 03, and the result is held in the register 18.

同時にたし算器32の出力がレジスタ23に入る。たし
算器33は、レジスタ18,23の出力の和を計算しく
Y十〇IGよ+D2G2+D3G3)を得る。
At the same time, the output of the adder 32 enters the register 23. The adder 33 calculates the sum of the outputs of the registers 18 and 23 to obtain Y10IG+D2G2+D3G3).

(4)4番目のクロックでも同様である。(4) The same applies to the fourth clock.

たし算器34の出力は、(Y十DIGよ+D2G2+D
3G3+D4G4)となる。
The output of the adder 34 is (Y1DIG+D2G2+D
3G3+D4G4).

(5)5番目のクロックで、たし算器35の出力には、
B −(Y−1−DIGl+…+D5G5)の値が得ら
れる。
(5) At the fifth clock, the output of the adder 35 is:
A value of B-(Y-1-DIGl+...+D5G5) is obtained.

(6)  次のクロックで、レジスタ26にBの値が保
持される。
(6) At the next clock, the value of B is held in the register 26.

(7)  これ以後は、(i+1)番目の行フィルタ回
路の問題である。すなわち、第1図の前段値Yとしてレ
ジスタ21へ入力される(7クロツクロで)。
(7) From now on, the problem is the (i+1)th row filter circuit. That is, it is input to the register 21 as the pre-stage value Y in FIG. 1 (at 7 clocks).

次の行フィルタでも同じことが繰りかえされる。The same process is repeated for the next row filter.

ただし、遅延シフトレジスタ1のシフト段数lを適当に
設定しておかなければならない。
However, the number of shift stages l of the delay shift register 1 must be set appropriately.

フィルタ内に含まれる画素のi行目の最初のものから、
(i+1)行目の最初のものまで、画素数はn個ある。
From the first pixel in the i-th row of pixels included in the filter,
There are n pixels up to the first one on the (i+1)th row.

第1図の行フィルタ回路に於て、出力データラインに、
レジスタ21.22、〜26が並んでいる。
In the row filter circuit of Figure 1, the output data line is
Registers 21, 22, to 26 are lined up.

このため、出力データが行フィルタ回路を通り抜けるた
めに、6クロツク必要である。
Therefore, six clocks are required for the output data to pass through the row filter circuit.

この時、遅延シフトレジスタの遅延段数はl = n 
−6(4) とするのである。
At this time, the number of delay stages of the delay shift register is l = n
-6(4).

これは、レジスタの数による。もしもレジスタ26がな
ければ、直列レジスタ数が5になるのでl = n −
5(5) とする。反対にレジスタ26の隣にレジスタをひとつ追
加すれば、1=n−7となるのである。
This depends on the number of registers. If there were no register 26, the number of serial registers would be 5, so l = n −
5 (5). Conversely, if one register is added next to register 26, 1=n-7.

念のため、次段の行フィルタ回路での動作の最初を説明
する。l = n −6であるので、次行の最初のデー
タD1は、7クロツク目に入力線4に出現することにな
る。かけ算器11での処理がなされ、レジスタ16に入
る。
Just to be sure, we will explain the beginning of the operation in the next stage row filter circuit. Since l = n -6, the first data D1 of the next row will appear on the input line 4 at the seventh clock. It is processed by the multiplier 11 and entered into the register 16.

既に説明したように、7クロツク目で、前段の値がレジ
スタ21に入る。つまり、レジスタ16.21のデータ
入力が同時となっている。
As already explained, the value of the previous stage is entered into the register 21 at the seventh clock. In other words, data input to registers 16 and 21 is simultaneous.

逆にいえば、レジスタ16.21のデータ入力を同期さ
せるため、遅延シフトレジスタの段数lを、l = n
 −kとするのである。kだし、ここでkは出力データ
線のうち、ひとつの行フィルタに直列に接続されたレジ
スタ(この例では21〜26)の数である。
Conversely, in order to synchronize the data input of register 16.21, the number of delay shift register stages l is set to l = n.
-k. k, where k is the number of registers (21 to 26 in this example) connected in series to one row filter among the output data lines.

こうして、kクロックで、行フィルタの演算力なされる
。行フィルタはm個あるので、mkクロックで全ての演
算がなされる。kはmであってもよいが、(m+1)以
上でもよい。第3図の従来例はに=m=3としたもので
ある。
Thus, the calculation power of the row filter is completed in k clocks. Since there are m row filters, all operations are performed in mk clocks. Although k may be m, it may also be (m+1) or more. In the conventional example shown in FIG. 3, m=3.

実際には、かけ算器11〜15に於て、GXDという演
算を1クロツク内ではできない。現在のところ、80n
sec〜160nSeCのサイクルでかけ算処理の可能
な素子が存在しないからである。
In reality, the multipliers 11 to 15 cannot perform the GXD operation within one clock. Currently, 80n
This is because there is no element that can perform multiplication processing in a cycle of sec to 160 nSec.

そこで、メモリ素子にCDの積データを、GlDをアド
レスとして書きこんでおく。そして、GXDをアドレス
入力としてメモリに与えて、積CDを読出すことにする
。テーブルルックアップ法トいう。
Therefore, the product data of CD is written into the memory element using GID as an address. Then, GXD is given to the memory as an address input to read out the product CD. This is called the table lookup method.

スタティックRAMであって、1391sec〜150
nsccのサイクルタイムで読出し可能な素子が入手可
能である。
Static RAM, 1391sec to 150
Devices are available that can be read with cycle times of nscc.

G、Dをアドレスとしてもよいが、Gの値は、各かけ算
器に於て決まっている。そこでGを決めておき、Dのみ
をアドレスとして、積CDを書込んでおいてもよい。
Although G and D may be used as addresses, the value of G is determined for each multiplier. Therefore, G may be determined in advance, and the product CD may be written using only D as an address.

この場合、フィルタの数係数Gが変わるとメモリ素子の
内容を書換えなければならない。
In this case, if the number coefficient G of the filter changes, the contents of the memory element must be rewritten.

遅延シフトレジスタの段数lの決定について附かけ算器
11〜15に於けるかけ算は、1クロツクで行う事がで
きないかもしれない。前記のメモリ素子を用いる方法で
は、1クロツクでできるが、他の方法を使うと、もつと
遅くなることもある。
Regarding the determination of the number of stages l of the delay shift register, the multiplication in the auxiliary multipliers 11 to 15 may not be able to be performed in one clock. With the method using the memory element described above, it can be done in one clock, but if other methods are used, it may become slower.

このいう事もあって、入力から出力へのデータの伝達の
速さは、先に説明したものより遅いかもしれない。
For this reason, the speed of data transmission from input to output may be slower than what was explained earlier.

しかし、これは問題ない事である。However, this is not a problem.

入力から出力へのデータの変換は、全ての演算GDにつ
いて実行されているのである。したがって、入力から出
力へのデータ変換の遅れは、キャンセルされる。遅延シ
フトレジスタの段数lの決定に影響しない。
Data conversion from input to output is performed for all operations GD. Therefore, the delay in data conversion from input to output is canceled. This does not affect the determination of the number of stages l of the delay shift register.

つまり、入力から出力へのデータの流れの遅延によらず
lを決定できる。このために本発明の回路が可能になっ
ている。
In other words, l can be determined without depending on the delay in the flow of data from input to output. This makes the circuit of the invention possible.

(ロ)  作   用  (3X3) 次に、3×3のフィルタ演算について説明する。(b) For work (3X3) Next, a 3×3 filter calculation will be explained.

第2図(b)に示すような、行フィルタ回路f□、f2
を使用しない。行フィルタ回路f3、f4、f5を使用
する。しかも、f3、f4、f5の5つのかけ算器のう
ち、後の3つだけを使う。
Row filter circuits f□, f2 as shown in FIG. 2(b)
Don't use. Row filter circuits f3, f4, f5 are used. Moreover, of the five multipliers f3, f4, and f5, only the latter three are used.

そうすると、3×3のフィルタ処理を行なう事ができる
Then, 3×3 filter processing can be performed.

第6図のフィルタでいえば、αお〜α55の3×3の部
分を使うのである。
In the case of the filter shown in FIG. 6, a 3×3 portion from α to α55 is used.

このため、行フィルタ回路f3について、レジスタA、
Bをディスエーブル、Cをイネーブルとする。すると、
0データ線8からデータ0がたし算器33に与えられる
。a=0、b=o、c = 1という事である。
Therefore, for row filter circuit f3, register A,
B is disabled and C is enabled. Then,
Data 0 is applied from the 0 data line 8 to the adder 33. This means that a=0, b=o, and c=1.

行フィルタ回路f4、f5については、レジスタA1C
をディスエーブル、Bをイネーブルとする。
For row filter circuits f4 and f5, register A1C
is disabled and B is enabled.

a = 0、b=1、c = 0である。前段の値Yが
、バイパスデータ線7を通って、たし算器33に与えら
れる。
a=0, b=1, c=0. The previous value Y is applied to the adder 33 through the bypass data line 7.

行フィルタ回路f3〜f5は、 3つのかけ算器を含む
ことになる。
Row filter circuits f3-f5 will include three multipliers.

ひとつの行フィルタ回路に含まれる出力データ線上のレ
ジスタの数は4つという事になる。遅延シフトレジスタ
の遅延段数4は (j = n −4(6) となる。
The number of registers on the output data line included in one row filter circuit is four. The number of delay stages of the delay shift register is 4 (j = n - 4 (6)).

(ト)効 果 本発明は、フィルタ処理を、データフロ一方式により行
なう回路方式に、データの流れを変える機能を加えてい
る。これによって、フィルタのサイズを自由に変化させ
ることができる。汎用性に富む回路となる。
(g) Effects The present invention adds a function to change the flow of data to a circuit system that performs filter processing using a data flow method. This allows the size of the filter to be changed freely. It becomes a highly versatile circuit.

これまでの説明では5×5と3×3のフィルタのサイズ
切換えについて述べている。しかし、回路を増減すれば
、7×7、或は9×9の切り換えを行うこともできる。
The explanation so far has been about switching between 5×5 and 3×3 filter sizes. However, by increasing or decreasing the number of circuits, it is also possible to switch between 7×7 and 9×9.

本発明は、あらゆる分野に於る画像処理装置に適用する
事ができる。
The present invention can be applied to image processing devices in all fields.

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

第1図は本発明のフィルタ回路の一部分を構成する行フ
ィルタ回路の回路図。 第2図は行フィルタ回路間の接続と出入力データフロー
を示す略図。(a)が5×5のフィルタの場合、(b)
が3×3のフィルタの場合である。 第3図は従来例にかかる3×3フイルタに対するフィル
タ回路図。 第4図はディジタル画面とフィルタの対応説明図。 第5図は第3図の回路で用いる3×3フイルタの数係数
対応図。 第6図は本発明で用いる5×5フイルタ、又は3×3フ
イルタの説明行列図。
FIG. 1 is a circuit diagram of a row filter circuit forming a part of the filter circuit of the present invention. FIG. 2 is a schematic diagram showing connections between row filter circuits and input/output data flows. If (a) is a 5×5 filter, (b)
is the case of a 3×3 filter. FIG. 3 is a filter circuit diagram for a 3×3 filter according to a conventional example. FIG. 4 is an explanatory diagram of the correspondence between the digital screen and the filter. FIG. 5 is a number coefficient correspondence diagram of the 3×3 filter used in the circuit of FIG. 3. FIG. 6 is an explanatory matrix diagram of a 5×5 filter or 3×3 filter used in the present invention.

Claims (2)

【特許請求の範囲】[Claims] (1)n×nの画素に分割された画像の任意の場所に於
て、m×mの数係数よりなるフィルタを対応させ、フィ
ルタの数係数と対応する位置の画素データの積の和を求
めるフィルタ処理を行なう回路であって、フィルタの最
大サイズに等しい数の行フィルタ回路f_1、f_2、
…を直列に設け、これらを互に反対方向にデータを伝え
る入力データ線と出力データ線とによって接続し、入力
データ線には遅延シフトレジスタ1を設け、各行フィル
タ回路の入力データにlクロックの遅延を与えて次の行
フィルタ回路へ送り出すこととし、各行フィルタ回路f
iは、フィルタの最大サイズに等しい数であって入力デ
ータD_1、D_2、…とその行のフィルタの係数G_
1、G_2、…との積を求めるかけ算器と、かけ算器の
出力を順次加算してゆくため出力データ線上に設けたフ
ィルタの最大サイズに等しい数のたし算器と、出力デー
タ線上に於てたし算器の間及びたし算器の外側に設けら
れたレジスタと、出力データ線上の1以上のたし算器、
レジスタをバイパスするためのバイパスデータ線7と、
バイパスデータ線7と同じ位置にデータ0を与える0デ
ータ線8と、バイパスデータ線7に設けたレジスタBと
、0データ線8に設けたレジスタCと、前記バイパスさ
れたレジスタのうち最後のレジスタAと、レジスタB、
Cとに択一的にイネーブル信号を与えるフィルタサイズ
切換回路とよりなる事を特徴とするフィルタ回路。
(1) At any location of an image divided into n×n pixels, a filter consisting of m×m numerical coefficients is made to correspond, and the sum of the products of the filter’s numerical coefficients and the pixel data at the corresponding position is calculated. Row filter circuits f_1, f_2, which are circuits that perform the desired filter processing and whose number is equal to the maximum size of the filter.
... are connected in series, and these are connected by an input data line and an output data line that transmit data in opposite directions, and a delay shift register 1 is provided on the input data line, and the input data of each row filter circuit is inputted with l clock pulses. A delay is given and the data is sent to the next row filter circuit, and each row filter circuit f
i is a number equal to the maximum size of the filter and includes the input data D_1, D_2, ... and the coefficient G_ of the filter in that row.
1, G_2,...; a number of adders equal to the maximum size of the filters installed on the output data line to sequentially add the outputs of the multipliers; a register provided between the adders and outside the adder, and one or more adders on the output data line;
a bypass data line 7 for bypassing the register;
A 0 data line 8 that gives data 0 to the same position as the bypass data line 7, a register B provided on the bypass data line 7, a register C provided on the 0 data line 8, and the last register among the bypassed registers. A and register B,
1. A filter circuit comprising a filter size switching circuit that selectively applies an enable signal to C and C.
(2)かけ算器を、スタティックRAMを用いたテーブ
ル参照法による回路によって構成し、コンピュータから
の制御によってRAMの内容を書き換える事により、フ
ィルタの数係数を変更できるようにした事を特徴とする
特許請求の範囲第(1)項のフィルタ回路。
(2) A patent characterized in that the multiplier is configured by a circuit using a table lookup method using static RAM, and the number coefficients of the filter can be changed by rewriting the contents of the RAM under control from a computer. A filter circuit according to claim (1).
JP14118787A 1987-06-05 1987-06-05 Filter circuit Pending JPS63305474A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14118787A JPS63305474A (en) 1987-06-05 1987-06-05 Filter circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14118787A JPS63305474A (en) 1987-06-05 1987-06-05 Filter circuit

Publications (1)

Publication Number Publication Date
JPS63305474A true JPS63305474A (en) 1988-12-13

Family

ID=15286183

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14118787A Pending JPS63305474A (en) 1987-06-05 1987-06-05 Filter circuit

Country Status (1)

Country Link
JP (1) JPS63305474A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6072083A (en) * 1983-09-28 1985-04-24 Fujitsu Ltd Operating circuit of sum of products
JPS6175956A (en) * 1984-09-21 1986-04-18 Fujitsu Ltd Window arithmetic circuit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6072083A (en) * 1983-09-28 1985-04-24 Fujitsu Ltd Operating circuit of sum of products
JPS6175956A (en) * 1984-09-21 1986-04-18 Fujitsu Ltd Window arithmetic circuit

Similar Documents

Publication Publication Date Title
US6522341B1 (en) Multi-layer image mixing apparatus
JP3251421B2 (en) Semiconductor integrated circuit
JPH0944356A (en) Processor and data processor
JPS61241877A (en) Space product sum arithmetic unit
JPS63305474A (en) Filter circuit
JPS58215813A (en) Digital signal processing device
JP2924528B2 (en) Labeling processing method and labeling processing apparatus
JPS6319911B2 (en)
JP2510220B2 (en) Image processing device
JPH05135169A (en) Two-dimensional spatial filter circuit
JPS60119116A (en) Two-dimensional arithmetic unit for calculating sum of products
JPH03148780A (en) Picture processor
JPH0620035A (en) Image data processor
JP2922451B2 (en) Signal processing device
JPS63170788A (en) Image processor
SU1564711A1 (en) Device for kalman filtering
JPH0418683A (en) Picture filtering device
KR960036801A (en) Affine Converter for Color Graphics Parallel Processing
JPH01319320A (en) Digital signal processor
JPS6379180A (en) Lsi for processing parallel image
JPS61234468A (en) Multiplier using dynamic ram
JPH0638041A (en) Image processor
JPS61136169A (en) High-speed arithmetic unit
JPS61107427A (en) Information transmitter
JPH03152677A (en) Inter-digital picture data comparing device