JP2806436B2 - Arithmetic circuit - Google Patents
Arithmetic circuitInfo
- Publication number
- JP2806436B2 JP2806436B2 JP1318661A JP31866189A JP2806436B2 JP 2806436 B2 JP2806436 B2 JP 2806436B2 JP 1318661 A JP1318661 A JP 1318661A JP 31866189 A JP31866189 A JP 31866189A JP 2806436 B2 JP2806436 B2 JP 2806436B2
- Authority
- JP
- Japan
- Prior art keywords
- multiplication
- unit
- input
- data
- circuit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Image Processing (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデジタルデータ処理システムに用いられる演
算回路に係り、特にデジタル映像処理システムにおける
リアルタイムの映像処理・表示やリアルタイムの画像解
析等に有効な演算回路に関する。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic circuit used in a digital data processing system, and is particularly effective for real-time video processing / display and real-time image analysis in a digital video processing system. It relates to an arithmetic circuit.
従来、例えば、入力画像から抽出された特徴によりそ
の画像を認識する画像処理システム等において、処理結
果の精巧さ、再現性、定量性及び処理の多様さの理由に
より、デジタル処理系がしばしば用いられる。このデジ
タル処理系では、映像を画素の集合として取り扱う必要
があり、画素に関する演算は膨大なものとなる。例えば
512×512画素、1画素当たりRGB各8ビツトの画像デー
タについて粒度分布の測定を行うためには、処理速度20
MIPS程度の超大型コンピユータを用いて計算したとして
も数秒の処理時間が必要であり、リアルタイムに処理を
行うには充分な速さではない。そこで、画像処理のため
の専用ICにより映像処理の高速化が図られたものもある
が、この専用ICの用途は極めて狭く、広範囲の映像処理
には適用できない。2. Description of the Related Art Conventionally, for example, in an image processing system that recognizes an image based on features extracted from an input image, a digital processing system is often used because of the sophistication, reproducibility, quantitativeness, and variety of processing of the processing result. . In this digital processing system, it is necessary to handle an image as a set of pixels, and an enormous amount of calculations are performed on the pixels. For example
In order to measure the particle size distribution for image data of 512 × 512 pixels and 8 bits of RGB per pixel, the processing speed is 20
Even if calculations are performed using a very large computer of the order of MIPS, a processing time of several seconds is required, which is not fast enough to perform the processing in real time. In view of this, there has been a case where the speed of video processing has been increased by using a dedicated IC for image processing. However, the application of this dedicated IC is extremely narrow and cannot be applied to a wide range of video processing.
このような問題を解消するため、従来、演算部におい
て、画素データを複数個単位で保持して映像処理に必要
なパラメータを算出し、変換部において、演算部の処理
結果に基づいて積算等の処理を行う映像処理システムが
提案されている。Conventionally, in order to solve such a problem, a calculation unit holds pixel data in a plurality of units to calculate a parameter necessary for video processing, and a conversion unit performs integration and the like based on a processing result of the calculation unit. Video processing systems that perform processing have been proposed.
この映像処理システムの演算部において濃度平均、フ
ィルタ処理等を行う演算回路は、第11図に示すように構
成される。すなわち、フリツプフラツプ22、24、26を順
次接続してなる保持部28において、スキヤンラインに沿
って画素データが入力されると、複数個の画素データ
(ここでは連続する3個の画素データ)を保持して同時
に出力する。保持部28の出力には乗算部36が接続されて
いる。乗算部36は保持部28が保持する画素データの数と
同数、すなわち3個の乗算回路30、32、34を有してい
る。3個の乗算回路30、32、34には保持部28から出力さ
れた画素データが入力され、各々所定値を乗じた乗算結
果を出力する。出力された乗算結果は分配手段であるセ
レクタ37を介して統合部38へ入力され、統合部38では入
力された乗算結果を基にして映像処理に必要なパラメー
タを算出する。An arithmetic circuit that performs density averaging, filter processing, and the like in the arithmetic unit of this video processing system is configured as shown in FIG. That is, when pixel data is input along a scan line, a plurality of pixel data (here, three consecutive pixel data) are held in a holding unit 28 formed by sequentially connecting flip flops 22, 24, and 26. And output simultaneously. The output of the holding unit 28 is connected to a multiplication unit 36. The multiplying unit 36 has the same number of pixel data as the number of pixel data held by the holding unit 28, that is, three multiplying circuits 30, 32, and 34. The pixel data output from the holding unit 28 is input to the three multiplication circuits 30, 32, and 34, and the multiplication circuits 30, 32, and 34 output multiplication results each multiplied by a predetermined value. The output multiplication result is input to the integration unit 38 via the selector 37 as distribution means, and the integration unit 38 calculates parameters necessary for video processing based on the input multiplication result.
しかしながら、従来の演算回路においては、連続して
入力される画素データを複数個単位で保持した後で乗算
を行うため、乗算回路は保持部において保持する画素デ
ータの数と同数必要である。乗算回路は一般的に構成が
複雑であり、乗算回路を多数用いる従来の演算回路の回
路構成も複雑となる、という問題がある。However, in the conventional arithmetic circuit, since multiplication is performed after a plurality of pieces of continuously input pixel data are held in units, the number of the multiplication circuits is required to be equal to the number of pixel data held in the holding unit. The multiplication circuit generally has a complicated configuration, and there is a problem that the circuit configuration of a conventional arithmetic circuit using many multiplication circuits is also complicated.
本発明は上記事実を考慮して成されたもので、構成の
複雑な乗算回路を多数用いることがなく、回路構成が簡
単な演算回路を得ることを目的としている。The present invention has been made in view of the above-described facts, and has as its object to obtain an arithmetic circuit having a simple circuit configuration without using many multiplication circuits having a complicated configuration.
上記目的を達成するために請求項(1)記載の発明
は、入力された数値データに所定値を乗じて出力する単
一の乗算回路と、前記乗算回路から出力された乗算結果
を複数個単位で保持する乗算結果保持部と、複数の入力
を備え入力された乗算結果の各々に演算処理を施して1
つに統合する少なくとも1つの統合部と、前記乗算結果
保持部で保持された複数個の乗算結果の各々をそのまま
または複数の出力に分配して前記統合部に設けられてい
る複数の入力に出力する分配手段と、を有している。In order to achieve the above object, the invention according to claim 1 provides a single multiplication circuit for multiplying input numerical data by a predetermined value and outputting the multiplied result, and a multiplication result output from the multiplication circuit in a plurality of units. A multiplication result holding unit that holds a plurality of inputs and performs arithmetic processing on each of the input multiplication results to obtain 1
At least one integration unit for integrating the multiplication results, and distributing each of the plurality of multiplication results held in the multiplication result holding unit as it is or to a plurality of outputs and outputting to a plurality of inputs provided in the integration unit Distributing means.
請求項(2)記載の発明は、請求項(1)記載の発明
に、入力された数値データを複数個単位で保持するデー
タ保持部と、前記データ保持部で保持された複数個の数
値データのいずれかを前記乗算回路に出力する選択手段
と、を更に設けたことを特徴としている。According to a second aspect of the present invention, in the first aspect of the present invention, there is provided a data holding unit for holding input numerical data in a plurality of units, and a plurality of numerical data held in the data holding unit. And selecting means for outputting either of the above to the multiplying circuit.
請求項(1)では、乗算回路を用いて入力された数値
データに所定値を乗じて出力し、乗算結果保持部におい
て乗算回路から出力された乗算結果を複数個単位で保持
する。The multiplication circuit multiplies the input numerical data by a predetermined value and outputs the result. The multiplication result holding unit holds the multiplication results output from the multiplication circuit in a plurality of units.
このように、入力された数値データに対して先に乗算
を行い、乗算された結果を保持するので、乗算回路の数
が1個で済み、ゲート効率が向上し、演算回路の回路構
成が簡単となる。As described above, the input numerical data is multiplied first and the multiplied result is retained, so that only one multiplication circuit is required, the gate efficiency is improved, and the circuit configuration of the arithmetic circuit is simplified. Becomes
請求項(2)では、データ保持部において入力された
数値データを複数個単位で保持し、選択手段はデータ保
持部で保持された複数個の数値データのいずれかを乗算
回路に出力する。このため、演算内容に応じて、乗算回
路に入力する数値データの順番及び数値データを乗算回
路に入力する回数を選択することができ、演算回路にお
いて多様な演算が可能になる。According to claim (2), the data holding unit holds the input numerical data in a plurality of units, and the selecting unit outputs one of the plurality of numerical data held in the data holding unit to the multiplication circuit. For this reason, the order of the numerical data input to the multiplication circuit and the number of times the numerical data is input to the multiplication circuit can be selected according to the content of the operation, and various operations can be performed in the operation circuit.
以下、図面を参照して本発明を映像処理システムに適
用した実施例を詳細に説明する。Hereinafter, an embodiment in which the present invention is applied to a video processing system will be described in detail with reference to the drawings.
第3図において、映像処理システムは画素データが入
力される入力部60を有し、この入力部60に入力された画
素データは、順次、演算部62、変換部64で処理される。
演算部62では、数値演算あるいは状態演算等の演算処理
が行われ、変換部64においては、最終的な処理映像や特
徴量を求める後処理が行われる。In FIG. 3, the video processing system has an input unit 60 to which pixel data is input. The pixel data input to the input unit 60 is sequentially processed by an arithmetic unit 62 and a conversion unit 64.
The calculation section 62 performs calculation processing such as numerical calculation or state calculation, and the conversion section 64 performs post-processing for obtaining a final processed image or feature amount.
第4図に示すように画素データPi,jは一般に1スキ
ヤンラインに沿って順次配列されている。画像処理にお
いては一般に、第5図に示すように例えば3×3の画素
データP(i−1),(j−1)、P(i−1),j、P
(i−1),(j+1)、Pi,(j−1)、Pi,j、P
i,(j+1)、P(i+1),(j−1)、P
(i+1),j、P(i+1),(J+1)に対して種々
の処理が施される。なお、この処理領域の大きさを2×
2に設定してもよく、あるいはより大きな領域に設定し
てもよい。また、前記処理領域を正方形以外の形状の領
域、例えば中央画素と中央画素の上下左右に隣接する4
画素の領域としてもよい。通常はこのような3×3その
他の領域を保持するための近傍処理が必要であるが、本
実施例ではこの近傍処理部を省略している。As shown in FIG. 4, the pixel data P i, j are generally arranged sequentially along one scan line. In image processing, for example, as shown in FIG. 5, for example, 3 × 3 pixel data P (i-1), (j-1) , P (i-1), j , P
(I-1), (j + 1) , P i, (j-1) , P i, j , P
i, (j + 1) , P (i + 1), (j-1) , P
Various processes are performed on (i + 1), j , P (i + 1), (J + 1) . Note that the size of this processing area is 2 ×
2, or may be set to a larger area. Further, the processing area is defined as a region having a shape other than a square, for example, a center pixel and four pixels adjacent to the upper, lower, left and right sides of the center pixel.
It may be a pixel area. Normally, neighborhood processing for holding such a 3 × 3 or other area is necessary, but in this embodiment, this neighborhood processing unit is omitted.
次に、演算部62について説明する。画素データは演算
部62に入力され、ここで映像処理に必要なパラメータが
算出される。例えば処理領域内の各画素の平均濃度はこ
のようなパラメータの1つであり、この演算部62におい
て求めることができる。Next, the calculation unit 62 will be described. The pixel data is input to the calculation unit 62, where parameters necessary for video processing are calculated. For example, the average density of each pixel in the processing area is one of such parameters, and can be obtained by the calculation unit 62.
演算部62は第6図に示すように、状態演算部92及び本
発明の演算回路によって構成された数値演算部94を備え
ている。状態演算部92では、連結数、その画素が処理の
対象であるか否かの指標、オイラー数を求めるためのパ
ラメータT、F、D、E、処理画素とその近傍の状態を
表すコンパレート信号、及びその他が算出される。一
方、数値演算部94では、濃度平均、1次微分、2次微
分、フイルタ処理、及びその他の処理が行われる。これ
らの演算部92、94の処理はパイプライン処理により高速
化されている。As shown in FIG. 6, the operation unit 62 includes a state operation unit 92 and a numerical operation unit 94 constituted by the operation circuit of the present invention. In the state calculation unit 92, the number of links, an index of whether or not the pixel is the object of processing, parameters T, F, D, E for obtaining the Euler number, a comparator signal indicating the processing pixel and the state in the vicinity thereof , And others are calculated. On the other hand, in the numerical operation unit 94, density averaging, first derivative, second derivative, filter processing, and other processing are performed. The processing of these arithmetic units 92 and 94 is sped up by pipeline processing.
第1図は状態演算部92及び数値演算部94の構成を示し
ている。FIG. 1 shows the configuration of the state operation unit 92 and the numerical operation unit 94.
入力された画素データを格納するメモリを備えた入力
部60及びメモリ80、・・・、82の出力はマルチプレクサ
(MUX)78の入力に接続されている。マルチプレクサ78
の出力は数値演算部94に接続されており、数値演算部94
には入力部60及びメモリ80、・・・、82から出力される
画素データのいずれかがマルチプレクサ78により選択さ
れて入力される。.., 82 are connected to the inputs of a multiplexer (MUX) 78. The input unit 60 includes a memory for storing the input pixel data. Multiplexer 78
Is connected to a numerical operation unit 94.
, 82, one of the pixel data output from the input unit 60 and the memories 80,..., 82 is selected by the multiplexer 78 and input.
数値演算部94は、データ保持部10と、マルチプレクサ
18と、乗算部72と、乗算結果保持部52と、セレクタ74
と、統合部76と、が順次接続されて構成されている。デ
ータ保持部10、マルチプレクサ18、乗算部72、乗算結果
保持部52、セレクタ74、統合部76の各々には図示しない
制御装置から制御信号が入力され、この制御信号によっ
て本実施例の映像処理システムの基準タイミングとされ
ているクロツクに基づいた所定のタイミングで動作する
ように制御される。The numerical operation unit 94 includes a data holding unit 10 and a multiplexer.
18, a multiplying unit 72, a multiplication result holding unit 52, and a selector 74
And the integration unit 76 are sequentially connected. A control signal is input to each of the data holding unit 10, the multiplexer 18, the multiplication unit 72, the multiplication result holding unit 52, the selector 74, and the integration unit 76 from a control device (not shown). Is controlled so as to operate at a predetermined timing based on the clock used as the reference timing.
データ保持部10は3個のフリツプフロツプ12、14、16
が順に接続されて構成されており、各々のフリツフフロ
ツプ12、14、16には前記制御信号が入力されるようにな
っている。第1のフリツプフロツプ12には、第4図に示
すように画素データPi,jが1スキヤンラインに沿って
順に入力され、これを制御信号によって定まる所定時間
保持して第2のフリツプフロツプ14及びマルチプレクサ
18に出力する。第2のフリツプフロツプ14は第1のフリ
ツプフロツプ12から入力された画素データを、制御信号
によって定まる所定時間保持して第3のフリツプフロツ
プ16及びマルチプレクサ18に出力する。第3のフリツプ
フロツプ16は第2のフリツプフロツプ14から入力された
画素データを、制御信号によって定まる所定時間保持し
てマルチプレクサ18に出力する。従って、マルチプレク
サ18には1スキヤンラインに沿った3個の連続した画素
データが同時に入力されることになる。マルチプレクサ
18は、前記制御信号に同期した所定のタイミングで、入
力された3個の画素データを1個ずつ乗算部72に出力す
る。The data holding unit 10 has three flip-flops 12, 14, 16
Are sequentially connected, and the control signals are input to the flip-flops 12, 14, and 16, respectively. As shown in FIG. 4, pixel data P i, j are sequentially input to the first flip-flop 12 along one scan line , and the pixel data P i, j are held for a predetermined time determined by a control signal, and the second flip-flop 14 and the multiplexer are held.
Output to 18. The second flip-flop 14 holds the pixel data input from the first flip-flop 12 for a predetermined time determined by a control signal and outputs the pixel data to the third flip-flop 16 and the multiplexer 18. The third flip-flop 16 holds the pixel data input from the second flip-flop 14 for a predetermined time determined by a control signal and outputs the pixel data to the multiplexer 18. Therefore, three consecutive pixel data along one scan line are input to the multiplexer 18 at the same time. Multiplexer
Reference numeral 18 outputs the input three pieces of pixel data to the multiplying unit 72 one by one at a predetermined timing synchronized with the control signal.
乗算部72は、単一の乗算回路54とマルチプレクサ46と
乗数レジスタ58から構成されている。この乗数レジスタ
58には、入力された画素データに乗じる所定値(以下、
乗数という)が複数個記憶されている。乗数レジスタ58
は記憶している乗数の個数と同数の出力端子を有し、出
力端子の各々はマルチプレクサ56の入力端子の各々に接
続されている。マルチプレクサ56には図示しない制御装
置が接続されており、入力端子から入力された複数個の
乗数のいずれか1個を出力端子に導くように制御され
る。マルチプレクサ56の出力端子には乗算回路54が接続
されている。乗算回路54は入力された画素データにマル
チプレクサ56から入力された乗数を乗じ、乗算結果を乗
算結果保持部52へ出力する。The multiplier 72 includes a single multiplier 54, a multiplexer 46, and a multiplier register 58. This multiplier register
A predetermined value (hereinafter, referred to as a multiplication value) by which the input pixel data is multiplied
(Called a multiplier). Multiplier register 58
Has the same number of output terminals as the number of stored multipliers, and each of the output terminals is connected to each of the input terminals of the multiplexer 56. A control device (not shown) is connected to the multiplexer 56, and is controlled so as to guide any one of a plurality of multipliers input from an input terminal to an output terminal. A multiplier 54 is connected to the output terminal of the multiplexer 56. The multiplication circuit 54 multiplies the input pixel data by the multiplier input from the multiplexer 56 and outputs the multiplication result to the multiplication result holding unit 52.
乗算結果保持部52はデータ保持部10と同様の構成で、
3個のフリツプフロツプ66、68、70が順に接続されて構
成されており、各々のフリツプフロツプ12、14、16には
前記制御信号が入力されるようになっている。第1のフ
リツプフロツプ66には乗算回路54から出力された乗算結
果が順次入力され、これを制御信号によって定まる所定
時間保持して第2のフリツプフロツプ68及びセレクタ74
に出力する。第2のフリツプフロツプ68は第1のフリツ
プフロツプ70から入力された乗算結果を、制御信号によ
って定まる所定時間保持して第3のフリツプフロツプ70
及びセレクタ74に出力する。第3のフリツプフロツプ70
は第2のフリツプフロツプ68から入力された乗算結果
を、制御信号によって定まる所定時間保持してセレクタ
74に出力する。また、乗算結果保持部52の3個のフリツ
プフロツプ66、68、70の各々とセレクタ74との間には状
態演算部92が接続されている。従って、セレクタ74及び
状態演算部92には1スキヤンラインに沿った3個の連続
した画素データの乗算結果が同時に入力されることにな
る。The multiplication result holding unit 52 has the same configuration as the data holding unit 10,
The three flip-flops 66, 68, 70 are connected in order, and the flip-flops 12, 14, 16 receive the control signal. The multiplication results output from the multiplication circuit 54 are sequentially input to the first flip-flop 66, and the multiplication results are held for a predetermined time determined by the control signal, and the second flip-flop 68 and the selector 74 are held.
Output to The second flip-flop 68 holds the result of the multiplication input from the first flip-flop 70 for a predetermined time determined by the control signal, and holds the third flip-flop 70.
And output to the selector 74. Third flip flop 70
Holds the multiplication result input from the second flip-flop 68 for a predetermined time determined by the control signal, and
Output to 74. A state operation unit 92 is connected between each of the three flip-flops 66, 68, and 70 of the multiplication result holding unit 52 and the selector 74. Therefore, the result of multiplication of three consecutive pixel data along one scan line is input to the selector 74 and the state calculation unit 92 at the same time.
セレクタ74では各入力端子に入力された乗算結果の各
々を、そのまままたは複数の出力に分配して出力端子に
導く。統合部76は、セレクタ74から導かれた乗算結果
を、加減算その他の演算を施しつつ統合する。この統合
部76内の演算は階層的に行われ、各階層において同時に
異なる演算が行われて次段に渡されるパイプライン処理
となっており、これにより、数値演算部94全体として演
算速度を向上させている。In the selector 74, each of the multiplication results input to each input terminal is distributed as it is or to a plurality of outputs and guided to an output terminal. The integrating unit 76 integrates the multiplication results derived from the selector 74 while performing addition and subtraction and other operations. The operations in the integration unit 76 are performed in a hierarchical manner, and different operations are performed simultaneously in each hierarchy and are pipelined to the next stage, thereby improving the operation speed of the numerical operation unit 94 as a whole. Let me.
一方、状態演算部92では、入力された各画素データに
対して論理演算、パターンマツチング等の処理を行う。
数値演算部94の統合部76の出力及び状態演算部92の出力
は各々マルチプレクサ90に入力されている。マルチプレ
クサ90の出力はマルチプレクサ84の入力に接続され、マ
ルチプレクサ84の複数の出力は各々バツフア86、・・
・、88を介して各メモリ80、・・・、82に接続されてい
る。メモリ80、・・・、82には数値演算部94または状態
演算部92の処理結果データがセレクタ84及びバツフア8
6、・・・、88を介して格納される。また、メモリ80、
・・・、82に格納された処理データは必要に応じてマル
チプレクサ78を介して数値演算部94及び状態演算部92へ
送られ再度処理することもできる。80、・・・、82に格
納された処理データは変換部64に入力されて、最終的な
映像処理が行われ、あるいは特徴量が求められる。On the other hand, the state calculation unit 92 performs processing such as logical operation and pattern matching on the input pixel data.
The output of the integration unit 76 of the numerical operation unit 94 and the output of the state operation unit 92 are input to the multiplexer 90. An output of the multiplexer 90 is connected to an input of the multiplexer 84, and a plurality of outputs of the multiplexer 84 are respectively connected to buffers 86,.
, 88 are connected to the memories 80, ..., 82. The memories 80,..., 82 store processing result data of the numerical operation unit 94 or the state operation unit 92 with the selector 84 and the buffer 8 respectively.
6,..., 88 are stored. Also, memory 80,
.., 82 are sent to the numerical operation unit 94 and the state operation unit 92 via the multiplexer 78 as necessary, and can be processed again. The processing data stored in 80,..., 82 is input to the conversion unit 64, where final video processing is performed or a feature amount is obtained.
第7図には変換部64の一部を構成する変換回路40の基
本構成が示されている。変換回路40は高速メモリ42を備
えている。本実施例では高速メモリ42としてスタテイツ
クRAMを使用している。高速メモリ42のライトイネーブ
ル端子には図示しない制御装置が接続されており、高速
メモリ42の読出し、書き込みを制御するライトイネーブ
ル信号Sが入力される。高速メモリ42のデータ出力端子
D1は軽演算部44の2個の入力端子の一方に接続されてい
る。本実施例では軽演算部44として加算器を使用してい
る。軽演算部44は2個の入力端子の各々から入力される
2個のデータの加算結果を出力端子から出力する。軽演
算部44の出力端子D2はセレクタ46の2個の入力端子の一
方に接続されている。また、セレクタ46の2個の入力端
子の他方にはデータD4が入力される。セレクタ46は2個
の入力端子から各々入力されたデータのどちらか一方を
セレクタ46の出力端子に導くようになっている。セレク
タ46の出力端子は第1の高速メモリ42のデータ入力端子
D0に接続されている。FIG. 7 shows the basic configuration of the conversion circuit 40 that forms a part of the conversion unit 64. The conversion circuit 40 has a high-speed memory 42. In this embodiment, a static RAM is used as the high-speed memory 42. A control device (not shown) is connected to a write enable terminal of the high-speed memory 42, and a write enable signal S for controlling reading and writing of the high-speed memory 42 is input. High-speed memory 42 data output pin
D1 is connected to one of two input terminals of the light operation unit 44. In the present embodiment, an adder is used as the light operation unit 44. The light operation unit 44 outputs an addition result of two data input from each of the two input terminals from an output terminal. The output terminal D2 of the light operation unit 44 is connected to one of the two input terminals of the selector 46. The data D4 is input to the other of the two input terminals of the selector 46. The selector 46 guides one of the data respectively input from the two input terminals to the output terminal of the selector 46. The output terminal of the selector 46 is the data input terminal of the first high-speed memory 42.
Connected to D0.
次に本実施例の映像処理システムの作用を説明する。 Next, the operation of the video processing system according to the present embodiment will be described.
まず、本発明の演算回路が適用された数値演算部94に
おいて、デイジタル画像の図形のエツジを強調し図形を
鮮明化する手法のひとつであるSobelオペレータをy方
向について求める演算処理について説明する。First, a description will be given of a calculation process for obtaining a Sobel operator in the y direction, which is one of the techniques for enhancing the edge of a figure in a digital image and sharpening the figure in the numerical calculation unit 94 to which the calculation circuit of the present invention is applied.
このSobelオペレータは、3×3コンボリユーシヨン
において、中央画素の周囲の画素の濃度値に係数を乗じ
て加えたものを中央画素の濃度とする処理である。Sobe
lオペレータをy方向について求める場合の係数を第3
図に示す。すなわち、y方向のSobelオペレータ(ここ
ではラプラシアンに準じてΔyと表現する)による演算
は次のように定義される。In the 3 × 3 convolution, the Sobel operator multiplies the density value of pixels around the central pixel by a coefficient and adds the result to the central pixel density. Sobe
The coefficient for obtaining the l operator in the y direction is the third
Shown in the figure. That is, the operation by the Sobel operator in the y direction (here, expressed as Δy according to Laplacian) is defined as follows.
Δyfij=P(i−1),(j−1)+2Pi,(j−1)+
P(i+1),(j−1) −P(i−1),(j+1)−2Pi,(j+1)−P
(i+1),j+1) を演算することにより求められる。Δyf ij = P (i−1), (j−1) + 2P i, (j−1) +
P (i + 1), (j-1) -P (i-1), (j + 1) -2Pi , (j + 1) -P
(I + 1), j + 1) .
入力部60のメモリに格納された画素データは、第4図
に示すスキヤンラインに沿って順次読出され、データ保
持部10に入力される。データ保持部10では、連続する3
画素の画素データP(i−1),(j−1)、P
i,(j−1)、P(i+1),(j−1)を保持し、マ
ルチプレクサ18に同時に出力する。マルチプレクサ18は
入力された3個の画素データを所定のタイミングで1個
ずつ乗算部72の乗算回路54に出力する。マルチプレクサ
56では乗算回路54に画素データが入力されているタイミ
ングと同期して、乗数レジスタ58から入力される乗数を
選択する。そして、乗算回路56に乗数1、2、1を順次
出力する。乗算回路54では、入力される画素データP
(i−1),(j−1)に1、画素データP
i,(j−1)に2、画素データP
(i+1),(j−1)に1を各々乗じて乗算結果保持
部52に出力する。The pixel data stored in the memory of the input unit 60 is sequentially read out along a scan line shown in FIG. In the data holding unit 10, three consecutive
Pixel data P (i-1), (j-1) , P
i, (j-1) , P (i + 1), (j-1) are held and output to the multiplexer 18 simultaneously. The multiplexer 18 outputs the inputted three pieces of pixel data to the multiplying circuit 54 of the multiplying unit 72 one by one at a predetermined timing. Multiplexer
At 56, the multiplier input from the multiplier register 58 is selected in synchronization with the timing at which the pixel data is input to the multiplier 54. Then, the multipliers 1, 2, and 1 are sequentially output to the multiplication circuit 56. In the multiplication circuit 54, the input pixel data P
(I-1), (j-1) is 1, pixel data P
i, (j-1) is 2, pixel data P
(I + 1) and (j-1) are each multiplied by 1 and output to the multiplication result holding unit 52.
乗算結果保持部52では入力された乗算結果を保持し、
3個の乗算結果P(i−1),(j−1)、2P
i,(j−1)、P(i+1),(j−1)をセレクタ74
へ同時に出力する。本演算処理において、セレクタ74は
入力されたデータをそのまま統合部76へ出力する。The multiplication result holding unit 52 holds the input multiplication result,
Three multiplication results P (i-1), (j-1) , 2P
i, (j-1) , P (i + 1), (j-1) are selected by the selector 74.
Output simultaneously to In this calculation process, the selector 74 outputs the input data to the integration unit 76 as it is.
統合部76ではP(i−1),(j−1)+2P
i,(j−1)+P(i+1),(j−1)が演算され、
演算結果はマルチプレクサ90、84、及びバツフア86を介
してメモリ80に格納される。このとき、画素データP
i,jは第4図に示す通常のスキヤンライン方向とは異な
り、第10図に示すように縦方向に並べ変えられて配列さ
れる。すなわち、メモリ80の座標上(i,j)に格納され
るべき演算結果が座標(j,i)に格納されることにな
り、この結果、中央画素の座標(i,j)に対して上方向
に隣接する座標(i,j−1)に格納されるべき演算結果
が中央画素に対して左方向に隣接する座標(i−1,j)
に格納され、下方向に隣接する座標に格納されるべき演
算結果が中央画素に対して右方向に隣接する座標(i+
1,j)に格納されることになる。In the integration unit 76, P (i-1), (j-1) + 2P
i, (j-1) + P (i + 1), (j-1) are calculated,
The operation result is stored in the memory 80 via the multiplexers 90 and 84 and the buffer 86. At this time, the pixel data P
Unlike the normal scan line direction shown in FIG. 4 , i and j are rearranged and arranged in the vertical direction as shown in FIG. That is, the calculation result to be stored at the coordinates (i, j) of the memory 80 is stored at the coordinates (j, i), and as a result, the coordinates (i, j) of the center pixel are The operation result to be stored at the coordinates (i, j-1) adjacent in the direction is the coordinates (i-1, j) adjacent to the center pixel in the left direction.
And the operation result to be stored in the downwardly adjacent coordinates is the coordinate (i +
1, j).
また、データ保持部10は、画素データP
(i−1),(j−1)、Pi,(j−1)、P
(i+1),(j−1)の乗算結果P
(i−1),(j−1)、2Pi,(j−1)、P
(i+1),(j−1)が乗算結果保持部52に保持され
た時点で、スキヤンラインに沿った次の画素データP
(i+2),(j−1)が入力され、3画素の画素デー
タPi,(j−1)、P(i+1),(j−1)、P
(i+2),(j−1)をマルチプレクサ18に出力する
ようになっている。マルチプレクサ18ではこれらを1個
ずつ順次乗算部へ出力し、乗算部72において乗数1、
2、1が乗じられ、乗算結果保持部52、セレクタ74を経
て統合部76において統合される。1スキヤンラインでの
画素データの読出し、演算が終了すると、次のスキヤン
ラインの読出し、演算に移行し、以下、同様にして画素
データP(i−1),(j+1)、Pi,(j+1)、P
(i+1),(j+1)に対しても乗数1、2、1が乗
じられ和が求められてメモリ80に格納される。このよう
な処理が1画面(512×512画素)について行われる。The data holding unit 10 stores the pixel data P
(I-1), (j-1) , P i, (j-1) , P
Multiplication result P of (i + 1), (j-1)
(I-1), (j-1) , 2P i, (j-1) , P
When (i + 1) and (j-1) are held in the multiplication result holding unit 52, the next pixel data P along the scan line
(I + 2) and (j−1) are input, and pixel data P i, (j−1) , P (i + 1), (j−1) , P of three pixels
(I + 2) and (j-1) are output to the multiplexer 18. The multiplexer 18 sequentially outputs these one by one to the multiplier, and the multiplier 72 outputs the multiplier 1,
The multiplication result is multiplied by 2 and 1 and integrated by the integration unit 76 via the multiplication result holding unit 52 and the selector 74. When the reading of the pixel data on one scan line and the calculation are completed, the process proceeds to the reading and calculation of the next scan line, and thereafter, similarly, the pixel data P (i-1), (j + 1) , P i, (j + 1) ) , P
(I + 1) and (j + 1) are also multiplied by multipliers 1, 2, and 1 to obtain a sum, which is stored in the memory 80. Such processing is performed for one screen (512 × 512 pixels).
次いでメモリ80に格納されたデータがスキヤンライン
に沿って読出され、乗算部72に順次入力されるデータP
(i−1),j、Pi,j、P(i+1),jに乗算回路54で
各々乗数1、0、1が乗じられ、乗算結果保持部52、セ
レクタ74を経て統合部76でこれらの差が求められ、これ
により3×3コンボリユーシヨンにおけるy方向のSobe
lオペレータΔyによる演算Δyfijが求められる。Next, the data stored in the memory 80 is read out along the scan line, and the data P sequentially input to the multiplier 72 is read.
(I−1), j , P i, j , and P (i + 1), j are multiplied by multipliers 1, 0, and 1 in a multiplication circuit 54, respectively, and are passed through a multiplication result holding unit 52 and a selector 74 to an integration unit 76. Is obtained, and the Sobe in the y direction in the 3 × 3 convolution is obtained.
The operation Δyf ij by the l operator Δy is obtained.
この処理結果はメモリ82のPi,jに格納され、このよ
うな処理が1画面において全ての画素データに対して施
される。This processing result is stored in P i, j of the memory 82, and such processing is performed on all pixel data in one screen.
Sobelオペレータをx方向について求める場合につい
ては、中央画素の周囲の画素の濃度値に第9図に示す係
数を乗じて加えたものを中央画素の濃度とすればよい。
但しこの場合には、入力部60のメモリに格納された画素
データを読出す際に、スキヤンラインの1ラインを保持
するラインメモリを2個用いるか、または第10図に示す
ように縦方向にスキヤンして画素データを読出し、画素
データを縦方向に沿って連続させて数値演算部94へ入力
する必要がある。When the Sobel operator is determined in the x direction, the density of the pixels around the central pixel multiplied by the coefficient shown in FIG. 9 may be used as the density of the central pixel.
However, in this case, when reading out the pixel data stored in the memory of the input unit 60, two line memories holding one scan line are used, or as shown in FIG. It is necessary to scan and read out pixel data, and to input the pixel data to the numerical operation unit 94 in a continuous manner in the vertical direction.
数値演算部94では、以上説明した処理と同様に平滑
化、微分、その他の演算処理も行うことができる。The numerical operation unit 94 can also perform smoothing, differentiation, and other arithmetic processing in the same manner as the processing described above.
次に変換回路40で処理可能な画像処理として、2値画
像やラベル付けされた画像における面積の計算を説明す
る。メモリ等にラベル付けされた処理対象画像を格納し
ておき、各画素の画像値をアドレスとして高速メモリ42
に入力し、高速メモリ42では入力されたアドレスに格納
されているデータが出力される(高速メモリ42の各アド
レスに格納されているデータの初期値は0とする)。軽
演算部44では、このデータにD3(ここでは「1」に設定
する)を加算したデータが出力され、セレクタ16を介し
て高速メモリ42の同一アドレスに再び格納される。この
処理を処理対象画像のスキヤンが1回終了するまで繰り
返すことにより、画像中の各画素値の画素数が積算さ
れ、各ラベル領域の面積が求められる。Next, calculation of the area in a binary image or a labeled image will be described as image processing that can be performed by the conversion circuit 40. The labeled image to be processed is stored in a memory or the like, and the image value of each pixel is used as an address for the high-speed memory 42.
And the high-speed memory 42 outputs the data stored at the input address (the initial value of the data stored at each address of the high-speed memory 42 is 0). The light operation unit 44 outputs data obtained by adding D3 (set to “1” here) to this data, and stores the data again at the same address of the high-speed memory 42 via the selector 16. By repeating this process until the scan of the processing target image is completed once, the number of pixels of each pixel value in the image is integrated, and the area of each label region is obtained.
また、変換回路40は軽演算部44の演算内容を最大値抽
出、最小値抽出、論理演算等に変更することにより多様
な特徴抽出が可能である。Also, the conversion circuit 40 can extract various features by changing the operation contents of the light operation unit 44 to maximum value extraction, minimum value extraction, logical operation and the like.
このように、本実施例の数値演算回路94では、単一の
乗算回路54を用いて乗算処理を行い、乗算結果を乗算結
果保持部52において保持するようにしたので、数値演算
部94における、一定近傍単位の画素データの処理を単一
の乗算回路54で実現でき、ゲート効率が向上すると共に
構成が簡単となる。As described above, in the numerical operation circuit 94 of the present embodiment, the multiplication process is performed by using the single multiplication circuit 54, and the multiplication result is stored in the multiplication result storage unit 52. Processing of pixel data in a fixed neighborhood unit can be realized by a single multiplication circuit 54, thereby improving gate efficiency and simplifying the configuration.
また、一般に乗算回路の構成は複雑であり、乗算回路
を多数含めた回路を設計する場合、設計者の負荷は大で
ある。本発明の演算回路では乗算回路が1個で済むた
め、乗算回路を多数含めた演算回路を設計する場合と比
較して設計者の負荷は少なくて済む。In general, the configuration of the multiplication circuit is complicated, and when designing a circuit including many multiplication circuits, the load on the designer is heavy. In the arithmetic circuit of the present invention, since only one multiplication circuit is required, the load on the designer can be reduced as compared with the case where an arithmetic circuit including many multiplication circuits is designed.
なお、本実施例では演算回路の統合部として出力が1
系統の統合部76を示したが、第2図に示すように出力が
2系統の統合部96を用いてもよい。この統合部96では2
つの系統で入力端子を共用しており、入力されたデータ
に対して2つの異なる処理、例えば微分処理とフイルタ
処理とを同時に施すことができる。ここで、2つの系統
の処理結果を別々のメモリ等に格納するようにすれば、
例えば微分処理とフイルタ処理とを並列に処理すること
ができ、映像処理システム全体としての処理速度を向上
することができる。In this embodiment, the output is 1 as an integrated unit of the arithmetic circuit.
Although the system integration unit 76 is shown, an integration system 96 having two output systems as shown in FIG. 2 may be used. In this integration part 96, 2
The input terminals are shared by the two systems, and two different processes, for example, a differential process and a filter process, can be simultaneously performed on input data. Here, if the processing results of the two systems are stored in separate memories or the like,
For example, differential processing and filter processing can be performed in parallel, and the processing speed of the entire video processing system can be improved.
また、本実施例では乗数を乗数レジスタ58に記憶させ
マルチプレクサ56によって乗数を選択して乗算回路54へ
出力していたが、乗数をメモリ等の記憶手段に記憶させ
制御装置等によってアドレスを指定して乗数を選択し乗
算回路へ出力するようにしてもよい。Further, in this embodiment, the multiplier is stored in the multiplier register 58, the multiplier is selected by the multiplexer 56, and the selected multiplier is output to the multiplier 54.However, the multiplier is stored in storage means such as a memory, and the address is designated by the control device or the like. May be selected and output to the multiplication circuit.
さらに、本実施例ではデータ保持部10及び乗算結果保
持部52の各々を3個のフリツプフロツプを順次接続して
構成していたが、メモリ等の記憶手段を用いて構成して
スキヤンラインに沿って連続する3画素のデータを所定
のタイミングで同時に出力することもできる。Further, in this embodiment, each of the data holding unit 10 and the multiplication result holding unit 52 is configured by sequentially connecting three flip-flops. However, the data holding unit 10 and the multiplication result holding unit 52 are configured by using storage means such as a memory, and are arranged along a scan line. It is also possible to simultaneously output data of three consecutive pixels at a predetermined timing.
また、本実施例では乗算部72の前にデータ保持部10及
びマルチプレクサ18を設けていたが、これらを省略して
もよい。Further, in the present embodiment, the data holding unit 10 and the multiplexer 18 are provided before the multiplying unit 72, but these may be omitted.
さらに、本発明の演算回路は本実施例記載の映像処理
システムに限らず、様々なデジタルデータ処理システム
に適用可能である。Further, the arithmetic circuit of the present invention is not limited to the video processing system described in the present embodiment, but is applicable to various digital data processing systems.
以上説明したように本発明では、単一の乗算回路を用
い乗算結果保持部において乗算回路から出力された乗算
結果を複数個単位で保持するようにしたので、構成の複
雑な乗算回路を多数用いることがなく、回路構成が簡単
な演算回路を得ることができる、という優れた効果が得
られる。As described above, in the present invention, a single multiplication circuit is used, and the multiplication result output from the multiplication circuit is held in a plurality of units in the multiplication result holding unit. An excellent effect that an arithmetic circuit having a simple circuit configuration can be obtained without any problem can be obtained.
第1図は本発明に係る演算回路とその周辺の回路図、第
2図は本発明の他の実施例を示す回路図、第3図は本発
明の演算回路が適用可能な映像処理システムの基本構成
を示す概略ブロツク図、第4図は画素データの配列を説
明する説明図、第5図は3×3の処理領域を説明する概
念図、第6図は演算部の作用を説明する説明図、第7図
は変換回路の基本構成を示す回路図、第8図はSobelオ
ペレータをy方向に求める場合の係数を示す概念図、第
9図はSobelオペレータをx方向に求める場合の係数を
示す概念図、第10図は縦方向のスキヤンを説明する説明
図、第11図は従来の演算回路を示す回路図である。 10……データ保持部、 52……乗算結果保持部、 54……乗算回路、 60……入力部、 62……演算部、 64……変換部、 72……乗算部、 74……セレクタ、 76……統合部、 94……数値演算部。FIG. 1 is a circuit diagram showing an arithmetic circuit according to the present invention and its peripherals, FIG. 2 is a circuit diagram showing another embodiment of the present invention, and FIG. 3 is a video processing system to which the arithmetic circuit of the present invention can be applied. FIG. 4 is a schematic block diagram showing a basic configuration, FIG. 4 is an explanatory diagram for explaining an array of pixel data, FIG. 5 is a conceptual diagram for explaining a 3 × 3 processing area, and FIG. FIG. 7, FIG. 7 is a circuit diagram showing a basic configuration of the conversion circuit, FIG. 8 is a conceptual diagram showing coefficients for obtaining a Sobel operator in the y direction, and FIG. 9 is a diagram showing coefficients for obtaining a Sobel operator in the x direction. FIG. 10 is an explanatory diagram for explaining vertical scanning, and FIG. 11 is a circuit diagram showing a conventional arithmetic circuit. 10 Data holding unit, 52 Multiplication result holding unit, 54 Multiplication circuit, 60 Input unit, 62 Operation unit, 64 Conversion unit, 72 Multiplication unit, 74 Selector, 76: Integration unit, 94: Numerical operation unit
Claims (2)
の所定値を乗じて出力する単一の乗算回路と、前記乗算
回路から出力された乗算結果を時系列で複数個保持する
乗算結果保持部と、複数の入力を備え入力された乗算結
果の各々に演算処理を施して1つに統合する少なくとも
1つの統合部と、前記乗算結果保持部で保持された複数
個の乗算結果の各々をそのまままたは複数の出力に分配
して前記統合部に設けられている複数の入力に出力する
分配手段と、を有する演算回路。1. A single multiplication circuit for multiplying one input numerical data by one predetermined value and outputting the multiplied result, and holding a plurality of multiplication results output from the multiplication circuit in time series A multiplication result holding unit, at least one integration unit having a plurality of inputs, performing an operation process on each of the input multiplication results and integrating them into one, and a plurality of multiplication results held by the multiplication result holding unit And a distribution unit for distributing each of them as it is or to a plurality of outputs, and outputting to a plurality of inputs provided in the integration unit.
するデータ保持部と、前記データ保持部で保持する複数
個の数値データのいずれかを前記乗算回路に出力する選
択手段と、を有することを特徴とする請求項(1)記載
の演算回路。2. A data holding unit for holding inputted numerical data in a plurality of units, and a selecting means for outputting any one of the plurality of numerical data held by the data holding unit to the multiplying circuit. The arithmetic circuit according to claim 1, wherein:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1318661A JP2806436B2 (en) | 1989-12-07 | 1989-12-07 | Arithmetic circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1318661A JP2806436B2 (en) | 1989-12-07 | 1989-12-07 | Arithmetic circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH03177980A JPH03177980A (en) | 1991-08-01 |
| JP2806436B2 true JP2806436B2 (en) | 1998-09-30 |
Family
ID=18101626
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1318661A Expired - Lifetime JP2806436B2 (en) | 1989-12-07 | 1989-12-07 | Arithmetic circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2806436B2 (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS63187373A (en) * | 1987-01-29 | 1988-08-02 | Iizeru:Kk | Arithmetic circuit |
| JPS63273176A (en) * | 1987-04-30 | 1988-11-10 | Shinko Electric Co Ltd | Space filtering device |
-
1989
- 1989-12-07 JP JP1318661A patent/JP2806436B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH03177980A (en) | 1991-08-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4635292A (en) | Image processor | |
| US10210419B2 (en) | Convolution operation apparatus | |
| US9135553B2 (en) | Convolution operation circuit and object recognition apparatus | |
| JPS6239818B2 (en) | ||
| US20190378001A1 (en) | Neural network hardware acceleration with stochastic adaptive resource allocation | |
| CN101976431A (en) | Dynamic reconfiguration technology-based universal image processing platform and implementation method thereof | |
| JP6532334B2 (en) | Parallel computing device, image processing device and parallel computing method | |
| US4845767A (en) | Image signal processor | |
| US4736440A (en) | Process for the processing of digitized signals representing an original image | |
| US6643412B1 (en) | Method and apparatus for high speed convolution | |
| JP2806436B2 (en) | Arithmetic circuit | |
| Devendran et al. | Optimization of the Convolution Operation to Accelerate Deep Neural Networks in FPGA. | |
| JPH0756673B2 (en) | Image processing method by divided space filter | |
| US5438682A (en) | Data processing system for rewriting parallel processor output data using a sequential processor | |
| JPH0222421B2 (en) | ||
| JPH0320880A (en) | Conversion circuit | |
| JPH0414391B2 (en) | ||
| Kawada et al. | An approach for applying large filters on large images using FPGA | |
| US5276778A (en) | Image processing system | |
| JPH0687265B2 (en) | Spatial filter circuit | |
| US6760466B2 (en) | Automatic image replacement and rebuilding system and method thereof | |
| Lin et al. | A High-Throughout Real-Time Prewitt Operator on Embedded NEON+ ARM System | |
| EP0481101B1 (en) | Data processing system | |
| EP0321584A1 (en) | System for calculating sum of products | |
| JP2623089B2 (en) | Video processing system |