JPH04276886A - Histogram calculation cell and histogram calculation array - Google Patents

Histogram calculation cell and histogram calculation array

Info

Publication number
JPH04276886A
JPH04276886A JP3038284A JP3828491A JPH04276886A JP H04276886 A JPH04276886 A JP H04276886A JP 3038284 A JP3038284 A JP 3038284A JP 3828491 A JP3828491 A JP 3828491A JP H04276886 A JPH04276886 A JP H04276886A
Authority
JP
Japan
Prior art keywords
row
histogram
count information
histogram calculation
counter 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.)
Withdrawn
Application number
JP3038284A
Other languages
Japanese (ja)
Inventor
Hisayoshi Hayasaka
早坂 久義
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP3038284A priority Critical patent/JPH04276886A/en
Publication of JPH04276886A publication Critical patent/JPH04276886A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Input (AREA)

Abstract

PURPOSE:To speed up histogram calculation and to easily prepare LSI of histogram calculation by making it possible to calculate a horizontal and a vertical histogram through one time data processing at a time in a histogram calculating array for calculating a histogram from a binarization picture element matrix. CONSTITUTION:A plurality of histrogram calculated cells 11 are arranged is parallel that includes a counter circuit 12 for inputting processed data 15 therein, counting binary data of every column, and outputting counted values, and an increment circuit 13 for inputting therein row count information 17 where binary data of every column is accumulatively added from the preceding stage, adding the binary data of every column of processed data 15 to the row count information 17 to output row count information 18, wherein the horizontal histograms are prepared by inputting processed data in every histogram calculation cell 11 at a time by counted value 16 outputted from the counter circuit 12, and wherein vertical histrograms are prepared by the row count information 18 that is accumulatively added from the first stage and that is outputted at the final stage.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は,文字認識やパターン認
識などで用いられる,2値化画素マトリクスから水平ヒ
ストグラムおよび垂直ヒストグラムを算出するヒストグ
ラム計算アレイ,およびアレイを構成するためのヒスト
グラム計算セルに関する。
[Field of Industrial Application] The present invention relates to a histogram calculation array for calculating a horizontal histogram and a vertical histogram from a binarized pixel matrix, used in character recognition, pattern recognition, etc., and a histogram calculation cell for configuring the array. .

【0002】0002

【従来の技術】図4は,従来のヒストグラム計算アレイ
を示す図である。同図において,41〜48はカウンタ
回路,49はシーケンサ回路,50は画素マトリクス水
平/垂直変換回路である。
2. Description of the Related Art FIG. 4 is a diagram showing a conventional histogram calculation array. In the figure, 41 to 48 are counter circuits, 49 is a sequencer circuit, and 50 is a pixel matrix horizontal/vertical conversion circuit.

【0003】従来のヒストグラム計算アレイは,カウン
タ回路41〜48が並列配置された構造をしている。各
カウンタ回路は,“1”,“0”の2値データが所定数
連続した処理データが入力されると,“1”の度数をカ
ウントし,カウント値として出力する。
A conventional histogram calculation array has a structure in which counter circuits 41 to 48 are arranged in parallel. When each counter circuit receives processing data in which a predetermined number of consecutive binary data of "1" and "0" are input, it counts the frequency of "1" and outputs it as a count value.

【0004】図5は,従来のヒストグラム計算例を示す
図である。同図を参照しながら,図4に示す従来のヒス
トグラム計算アレイの動作を説明する。2値化画素マト
リクスの例として,図5(a)に示した8行×8列のも
のを用いる。各画素のうち,斜線を施したものは“1”
に対応し,白地のものは“0”に対応する。従来のヒス
トグラム計算アレイは,次に述べるように,水平ヒスト
グラムの計算と垂直ヒストグラムの計算とを2回に分け
て行っている。
FIG. 5 is a diagram showing an example of conventional histogram calculation. The operation of the conventional histogram calculation array shown in FIG. 4 will be explained with reference to the same figure. As an example of a binarized pixel matrix, the 8 rows by 8 columns shown in FIG. 5(a) is used. Of each pixel, the one with diagonal lines is “1”
, and those with a white background correspond to "0". The conventional histogram calculation array performs horizontal histogram calculation and vertical histogram calculation in two steps, as described below.

【0005】(1)水平ヒストグラム計算モードシーケ
ンサ回路49の制御の下で,図5(a)に示す2値化画
素マトリクスの各行を1つの処理データとして各カウン
タ回路へ入力する。すなわち,2値化画素マトリクスの
第1行を処理データ1としてカウンタ回路41へ入力し
,第2行を処理データ2としてカウンタ回路42へ入力
し,第3行を処理データ3としてカウンタ回路43へ入
力し,第4行を処理データ4としてカウンタ回路44へ
入力し,第5行を処理データ5としてカウンタ回路45
へ入力し,第6行を処理データ6としてカウンタ回路4
6へ入力し,第7行を処理データ7としてカウンタ回路
47へ入力し,第8行を処理データ8としてカウンタ回
路48へ入力する。
(1) Horizontal histogram calculation mode Under the control of the sequencer circuit 49, each row of the binarized pixel matrix shown in FIG. 5A is input to each counter circuit as one piece of processing data. That is, the first row of the binarized pixel matrix is input to the counter circuit 41 as processed data 1, the second row is inputted to the counter circuit 42 as processed data 2, and the third row is inputted to the counter circuit 43 as processed data 3. The fourth line is inputted as processed data 4 to the counter circuit 44, and the fifth line is inputted as processed data 5 to the counter circuit 45.
and input the 6th line to the counter circuit 4 as processing data 6.
6, the seventh line is inputted as processed data 7 to the counter circuit 47, and the eighth line is inputted as processed data 8 to the counter circuit 48.

【0006】各カウンタ回路は,入力された処理データ
中の“1”の度数をカウントし,水平カウント値として
出力する。第1行を例にすると,第1行の2値化データ
は,“01001000”であるので,カウンタ回路4
1は水平カウント値として“2”を出力する。同様にし
て,カウンタ回路42は水平カウント値“3”を出力し
,カウンタ回路43は水平カウント値“4”を出力し,
カウンタ回路44は水平カウント値“6”を出力し,カ
ウンタ回路45は水平カウント値“6”を出力し,カウ
ンタ回路46は水平カウント値“4”を出力し,カウン
タ回路47は水平カウント値“3”を出力し,カウンタ
回路48は水平カウント値“2”を出力する。
Each counter circuit counts the number of "1"s in the input processing data and outputs it as a horizontal count value. Taking the first row as an example, the binarized data in the first row is "01001000", so the counter circuit 4
1 outputs "2" as the horizontal count value. Similarly, the counter circuit 42 outputs a horizontal count value "3", the counter circuit 43 outputs a horizontal count value "4",
The counter circuit 44 outputs the horizontal count value "6", the counter circuit 45 outputs the horizontal count value "6", the counter circuit 46 outputs the horizontal count value "4", and the counter circuit 47 outputs the horizontal count value "4". The counter circuit 48 outputs a horizontal count value of "2".

【0007】カウンタ回路41〜48が出力した,2値
化画素マトリクスの第1行〜第8行の水平カウント値を
並べると,“2,3,4,6,6,4,3,2”となる
が,これが水平ヒストグラムである。
When the horizontal count values of the first to eighth rows of the binarized pixel matrix output by the counter circuits 41 to 48 are arranged, they are "2, 3, 4, 6, 6, 4, 3, 2". This is the horizontal histogram.

【0008】(2)垂直ヒストグラム計算モード水平ヒ
ストグラムの計算が終了した後,画素マトリクス水平/
垂直変換回路50によって,図5(a)に示す2値化画
素マトリクスを90度回転させる。その結果,図5(b
)に示す2値化画素マトリクスが得られる。(混乱を避
けるために,図中に“*”を付した。)
(2) Vertical histogram calculation mode After the horizontal histogram calculation is completed, the pixel matrix horizontal/
The vertical conversion circuit 50 rotates the binarized pixel matrix shown in FIG. 5(a) by 90 degrees. As a result, Figure 5 (b
) is obtained. (To avoid confusion, “*” has been added in the figure.)

【0009】シ
ーケンサ回路49の制御の下で,図5(b)に示す2値
化画素マトリクスの各行を1つの処理データとして各カ
ウンタ回路へ入力する。すなわち,2値化画素マトリク
スの第1行を処理データ1としてカウンタ回路41へ入
力し,第2行を処理データ2としてカウンタ回路42へ
入力し,第3行を処理データ3としてカウンタ回路43
へ入力し,第4行を処理データ4としてカウンタ回路4
4へ入力し,第5行を処理データ5としてカウンタ回路
45へ入力し,第6行を処理データ6としてカウンタ回
路46へ入力し,第7行を処理データ7としてカウンタ
回路47へ入力し,第8行を処理データ8としてカウン
タ回路48へ入力する。
Under the control of the sequencer circuit 49, each row of the binarized pixel matrix shown in FIG. 5(b) is input to each counter circuit as one piece of processing data. That is, the first row of the binarized pixel matrix is inputted as processed data 1 to the counter circuit 41, the second row is inputted as processed data 2 to the counter circuit 42, and the third row is inputted as processed data 3 to the counter circuit 43.
and input the fourth line to the counter circuit 4 as processing data 4.
4, input the fifth line as processed data 5 to the counter circuit 45, input the sixth line as processed data 6 to the counter circuit 46, input the seventh line as processed data 7 to the counter circuit 47, The eighth row is input to the counter circuit 48 as processed data 8.

【0010】各カウンタ回路は,入力された処理データ
中の“1”の度数をカウントし,垂直カウント値として
出力する。第1行を例にすると,第1行の2値化データ
は,“00011000”であるので,カウンタ回路4
1は垂直カウント値として“2”を出力する。同様にし
て,カウンタ回路42は垂直カウント値“4”を出力し
,カウンタ回路43は垂直カウント値“0”を出力し,
カウンタ回路44は垂直カウント値“8”を出力し,カ
ウンタ回路45は垂直カウント値“4”を出力し,カウ
ンタ回路46は垂直カウント値“4”を出力し,カウン
タ回路47は水平カウント値“6”を出力し,カウンタ
回路48は水平カウント値“2”を出力する。
Each counter circuit counts the number of "1"s in the input processing data and outputs it as a vertical count value. Taking the first row as an example, the binarized data in the first row is "00011000", so the counter circuit 4
1 outputs "2" as the vertical count value. Similarly, the counter circuit 42 outputs a vertical count value "4", the counter circuit 43 outputs a vertical count value "0",
The counter circuit 44 outputs the vertical count value "8", the counter circuit 45 outputs the vertical count value "4", the counter circuit 46 outputs the vertical count value "4", and the counter circuit 47 outputs the horizontal count value "4". 6", and the counter circuit 48 outputs a horizontal count value of "2".

【0011】カウンタ回路41〜48が出力した,2値
化画素マトリクスの第1行〜第8行の垂直カウント値を
並べると,“2,4,0,8,4,4,6,2”となる
が,これが垂直ヒストグラムである。
When the vertical count values of the first to eighth rows of the binarized pixel matrix output by the counter circuits 41 to 48 are arranged, they are "2, 4, 0, 8, 4, 4, 6, 2". This is the vertical histogram.

【0012】0012

【発明が解決しようとする課題】従来のヒストグラム計
算アレイは,シーケンサ回路49の制御の下で,水平ヒ
ストグラムの計算と垂直ヒストグラムの計算とを2回に
分けて別々のモードで計算するように構成されていた。 その結果,次の問題があった。
[Problems to be Solved by the Invention] A conventional histogram calculation array is configured to calculate the horizontal histogram and the vertical histogram in two separate modes under the control of the sequencer circuit 49. It had been. As a result, the following problems occurred.

【0013】(1)ヒストグラムの計算を,水平ヒスト
グラム計算モードおよび垂直ヒストグラム計算モードの
2回に分けているため,シーケンサ回路49を2回起動
させる必要がある。このため,ヒストグラムの作成速度
が制約され,要求される速度が得られない。
(1) Since the histogram calculation is divided into two times, a horizontal histogram calculation mode and a vertical histogram calculation mode, it is necessary to activate the sequencer circuit 49 twice. For this reason, the histogram creation speed is restricted, and the required speed cannot be obtained.

【0014】(2)シーケンサ回路49によって制御さ
れるカウンタ回路および画素マトリクス水平/垂直変換
回路50の回路規模が大きいために,LSI化が困難で
ある。
(2) Since the circuit scale of the counter circuit controlled by the sequencer circuit 49 and the pixel matrix horizontal/vertical conversion circuit 50 is large, it is difficult to incorporate them into an LSI.

【0015】本発明は,これらの問題点を解決して,2
値化画素マトリクスから水平ヒストグラムおよび垂直ヒ
ストグラムを1回のデータ処理で同時に算出できるヒス
トグラム計算アレイを実現すること,およびそのヒスト
グラム計算アレイの構成単位である,LSI化が容易な
ヒストグラム計算セルを提供することを目的とする。
[0015] The present invention solves these problems and provides two
To realize a histogram calculation array that can simultaneously calculate a horizontal histogram and a vertical histogram from a valued pixel matrix in one data process, and to provide a histogram calculation cell that is a constituent unit of the histogram calculation array and is easily integrated into an LSI. The purpose is to

【0016】[0016]

【課題を解決するための手段】上記の目的を達成するた
めに,本発明に係るヒストグラム計算セルは,1行分の
処理データを入力し,各列の2値データをカウントして
カウント値を出力するカウンタ回路と,各列ごとに2値
データが累積加算された行カウント情報を前段から入力
し,この前段の行カウント情報に1行分の処理データの
各列ごとの2値データを加算して行カウント情報を出力
するインクリメント回路とを含むように構成する。
[Means for Solving the Problems] In order to achieve the above object, the histogram calculation cell according to the present invention inputs one row of processed data, counts the binary data in each column, and calculates the count value. The output counter circuit and the row count information in which binary data is cumulatively added for each column are input from the previous stage, and the binary data for each column of the processed data for one row is added to the row count information of the previous stage. and an increment circuit that outputs row count information.

【0017】本発明に係るヒストグラム計算アレイは,
m行×n列〔m,nは正の整数〕の2値化画素マトリク
スの水平ヒストグラムおよび垂直ヒストグラムを作成す
るヒストグラム計算アレイであって,本発明に係るヒス
トグラム計算セルをm個並列配置し,前段のインクリメ
ント回路が出力する行カウント情報が次段のインクリメ
ント回路へ入力するように結線し,水平ヒストグラムは
,各ヒストグラム計算セルに,n個の2値データから成
る1行分の処理データを同時に入力し,各ヒストグラム
計算セル内のカウンタ回路が各列の2値データをカウン
トして出力するm個のカウント値により作成し,垂直ヒ
ストグラムは,第1段から累積加算された各列ごとのn
個の2値データから成り,第m段が出力する行カウント
情報によって作成するように構成する。
The histogram calculation array according to the present invention comprises:
A histogram calculation array for creating a horizontal histogram and a vertical histogram of a binary pixel matrix of m rows and n columns [m, n are positive integers], in which m pieces of histogram calculation cells according to the present invention are arranged in parallel, The lines are connected so that the row count information output from the previous stage increment circuit is input to the next stage increment circuit, and the horizontal histogram is created by simultaneously inputting one row of processed data consisting of n pieces of binary data to each histogram calculation cell. The counter circuit in each histogram calculation cell counts and outputs the binary data of each column.The vertical histogram is created using m count values for each column that are cumulatively added from the first stage.
It is configured to be created using row count information output from the m-th stage.

【0018】図1は,本発明の原理を示す図である。同
図(a)はヒストグラム計算回路,同図(b)はヒスト
グラムの計算例である。
FIG. 1 is a diagram showing the principle of the present invention. FIG. 5A shows a histogram calculation circuit, and FIG. 1B shows an example of histogram calculation.

【0019】図1(a)において,11はヒストグラム
計算セル,12はカウンタ回路,13はインクリメント
回路,14はクロック信号,15は処理データ,16は
カウント値,17は行カウント情報入力,18は行カウ
ント情報出力を示す。
In FIG. 1(a), 11 is a histogram calculation cell, 12 is a counter circuit, 13 is an increment circuit, 14 is a clock signal, 15 is processing data, 16 is a count value, 17 is a row count information input, and 18 is a Shows row count information output.

【0020】ヒストグラム計算セル11は,カウンタ回
路12およびインクリメント回路13を含むように構成
されている。
The histogram calculation cell 11 is configured to include a counter circuit 12 and an increment circuit 13.

【0021】カウンタ回路12は,入力された1行分の
処理データ15の各列の2値データをカウントしてカウ
ント値16を出力する。
The counter circuit 12 counts the binary data of each column of the input processed data 15 for one row and outputs a count value 16.

【0022】インクリメント回路13は,各列ごとに2
値データが累積加算された行カウント情報17を前段か
ら入力し,この前段の行カウント情報17に1行分の処
理データ15の各列ごとの2値データを加算して行カウ
ント情報18を出力する。
The increment circuit 13 has two increment circuits for each column.
The row count information 17 in which the value data has been cumulatively added is input from the previous stage, and the binary data for each column of the processed data 15 for one row is added to the row count information 17 in the previous stage, and the row count information 18 is output. do.

【0023】[0023]

【作用】図1(b)に示すヒストグラムの計算例を用い
て,図1(a)に示すヒストグラム計算セル11の動作
を説明する。
[Operation] The operation of the histogram calculation cell 11 shown in FIG. 1(a) will be explained using the example of histogram calculation shown in FIG. 1(b).

【0024】図1(b)は,8行×8列の2値化画素マ
トリクスの第3行の計算を行っている状態を示している
。2値化画素マトリクス中の斜線部分は2値データの“
1”に対応し,白地の部分は2値データの“0”に対応
する。
FIG. 1B shows a state in which calculation is being performed on the third row of a binary pixel matrix of 8 rows by 8 columns. The shaded area in the binarized pixel matrix is the binary data “
1", and the white portion corresponds to binary data "0".

【0025】第3行は,“0,1,0,0,1,0,0
,0”である。これが処理データ3(15)として,カ
ウンタ回路12へ入力される。カウンタ回路12は,入
力された処理データ3(15)のうち,“1”の度数を
カウントし,その結果“2”をカウント値16として出
力する。
[0025] The third line is “0, 1, 0, 0, 1, 0, 0
, 0". This is input to the counter circuit 12 as processed data 3 (15). The counter circuit 12 counts the frequency of "1" in the input processed data 3 (15), and The result "2" is output as the count value 16.

【0026】一方,インクリメント回路13へは,前段
の行カウント情報が入力される。図1(b)の例では,
第1行の“1”と第2行の“1”とを第1列〜第8列ま
で,各列ごとに加算した,“1,1,0,1,2,2,
0,1”が行カウント情報入力17となる。インクリメ
ント回路13は,行カウント情報入力17“1,1,0
,1,2,2,0,1”に,処理データ3(15)“0
,1,0,0,1,0,0,0”を各列ごとに加算して
行カウント情報“1,2,0,1,3,2,0,1”を
算出し,行カウント情報18として出力する。ヒストグ
ラム計算セル11を多数個並列配置することにより,ヒ
ストグラム計算アレイが構成される。具体的には,次の
ように構成する。
On the other hand, the increment circuit 13 receives row count information from the previous stage. In the example of Figure 1(b),
“1” in the first row and “1” in the second row are added for each column from the first column to the eighth column, “1, 1, 0, 1, 2, 2,”
0, 1'' becomes the row count information input 17.The increment circuit 13 receives the row count information input 17 ``1, 1, 0''.
, 1, 2, 2, 0, 1", processing data 3 (15) "0
, 1, 0, 0, 1, 0, 0, 0" for each column to calculate row count information "1, 2, 0, 1, 3, 2, 0, 1", and 18.A histogram calculation array is constructed by arranging a large number of histogram calculation cells 11 in parallel.Specifically, it is constructed as follows.

【0027】m,nを正の整数として,m行×n列の2
値化画素マトリクスの水平ヒストグラムおよび垂直ヒス
トグラムを作成するヒストグラム計算アレイは,ヒスト
グラム計算セル11をm個並列配置し,前段のインクリ
メント回路が出力する行カウント情報17が次段のイン
クリメント回路13へ入力するように結線することによ
り構成される。
[0027] Where m and n are positive integers, 2
The histogram calculation array that creates the horizontal histogram and vertical histogram of the valued pixel matrix has m histogram calculation cells 11 arranged in parallel, and the row count information 17 output from the previous stage increment circuit is input to the next stage increment circuit 13. It is configured by connecting the wires as follows.

【0028】このように構成されたヒストグラム計算ア
レイは,つぎのようにして水平ヒストグラムおよび垂直
ヒストグラムを作成する。
The histogram calculation array configured in this manner creates a horizontal histogram and a vertical histogram in the following manner.

【0029】水平ヒストグラムは,各ヒストグラム計算
セル11に,n個の2値データから成る1行分の処理デ
ータ15を同時に入力し,各ヒストグラム計算セル11
内のカウンタ回路12が各列の2値データのうち“1”
をカウントして出力するm個のカウント値16により作
成する。
The horizontal histogram is created by simultaneously inputting one row of processed data 15 consisting of n pieces of binary data into each histogram calculation cell 11.
The counter circuit 12 in
It is created by counting and outputting m count values 16.

【0030】垂直ヒストグラムは,第1段から累積加算
された各列ごとのn個の2値データから成り,第m段が
出力する行カウント情報18によって作成する。
The vertical histogram is composed of n pieces of binary data for each column cumulatively added from the first stage, and is created using the row count information 18 output from the m-th stage.

【0031】[0031]

【実施例】図2は,本発明によるヒストグラム計算アレ
イの構成例を示す図である。同図において,21はヒス
トグラム計算セル#1〔以下,セル#1と記載〕,21
aはカウンタ回路,21bはインクリメント回路,22
はセル#2,22aはカウンタ回路,23bはインクリ
メント回路,23はセル#3,23aはカウンタ回路,
23bはインクリメント回路,28はセル#8,28a
カウンタ回路,28bはインクリメント回路である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 2 is a diagram showing an example of the configuration of a histogram calculation array according to the present invention. In the same figure, 21 is histogram calculation cell #1 [hereinafter referred to as cell #1], 21
a is a counter circuit, 21b is an increment circuit, 22
is cell #2, 22a is a counter circuit, 23b is an increment circuit, 23 is cell #3, 23a is a counter circuit,
23b is an increment circuit, 28 is cell #8, 28a
The counter circuit 28b is an increment circuit.

【0032】本発明のヒストグラム計算アレイは,セル
#1(21)〜セル#8(28)が並列配置された構造
をしている。各セルは,“1”,“0”の2値データが
所定数連続した処理データが入力されると,カウンタ回
路によって“1”の度数をカウントし,水平カウント値
として出力する。同時に,インクリメント回路が,各列
ごとに2値データが累積加算された行カウント情報を前
段から入力し,この前段の行カウント情報に1行分の処
理データの各列ごとの2値データを加算して行カウント
情報を出力する。
The histogram calculation array of the present invention has a structure in which cells #1 (21) to #8 (28) are arranged in parallel. When each cell receives processed data in which a predetermined number of consecutive binary data of "1" and "0" are input, the counter circuit counts the frequency of "1" and outputs it as a horizontal count value. At the same time, the increment circuit inputs the row count information in which binary data is cumulatively added for each column from the previous stage, and adds the binary data for each column of the processed data for one row to this row count information from the previous stage. to output line count information.

【0033】図3は,本発明によるヒストグラムの計算
例を示す図である。同図を参照しながら,図2に示す本
発明のヒストグラム計算アレイの動作を説明する。2値
化画素マトリクスの例として,図3に示した8行×8列
のものを用いる。各画素のうち,斜線を施したものは“
1”に対応し,白地のものは“0”に対応する。本発明
のヒストグラム計算アレイは,水平ヒストグラムの計算
と垂直ヒストグラムの計算とを1回のデータ処理で行っ
ているが,混乱を避けるために,水平ヒストグラムの計
算と垂直ヒストグラムの計算とを分けて説明する。
FIG. 3 is a diagram showing an example of histogram calculation according to the present invention. The operation of the histogram calculation array of the present invention shown in FIG. 2 will be explained with reference to the same figure. As an example of the binarized pixel matrix, the 8 rows by 8 columns shown in FIG. 3 is used. Of each pixel, those with diagonal lines are “
The histogram calculation array of the present invention calculates the horizontal histogram and the vertical histogram in one data process, but this avoids confusion. For this purpose, horizontal histogram calculation and vertical histogram calculation will be explained separately.

【0034】(1)水平ヒストグラムの計算図3に示す
2値化画素マトリクスの各行を1つの処理データとして
各セルへ入力する。すなわち,2値化画素マトリクスの
第1行を処理データ1としてセル#1(21)へ入力し
,第2行を処理データ2としてセル#2(22)へ入力
し,第3行を処理データ3としてセル#3(23)へ入
力し,第4行を処理データ4としてセル#4へ入力し,
第5行を処理データ5としてセル#5へ入力し,第6行
を処理データ6としてセル#6へ入力し,第7行を処理
データ7としてセル#7へ入力し,第8行を処理データ
8としてセル#8(28)へ入力する。〔セル#4〜セ
ル#7は,図示されていないが,他のセルと同一の回路
構成を持つ。〕
(1) Calculation of horizontal histogram Each row of the binarized pixel matrix shown in FIG. 3 is input to each cell as one piece of processing data. That is, the first row of the binarized pixel matrix is input as processed data 1 to cell #1 (21), the second row is inputted as processed data 2 to cell #2 (22), and the third row is inputted as processed data. 3 into cell #3 (23), input the fourth row into cell #4 as processing data 4,
Input the 5th row as processing data 5 to cell #5, input the 6th row to cell #6 as processing data 6, input the 7th row to cell #7 as processing data 7, and process the 8th row. Input as data 8 to cell #8 (28). [Although not shown, cells #4 to #7 have the same circuit configuration as the other cells. ]

【0035】各セルは,内蔵されたカウンタ回路によっ
て,入力された処理データ中の“1”の度数をカウント
し,水平カウント値として出力する。第1行を例にする
と,第1行の2値化データは,“01001000”で
あるので,カウンタ回路21aは“2”を算出し,セル
#1(21)は,水平カウント値として“2”を出力す
る。同様にして,セル#2(22)は水平カウント値“
3”を出力し,セル#3(23)は水平カウント値“4
”を出力し,セル#4は水平カウント値“6”を出力し
,セル#5は水平カウント値“6”を出力し,セル#6
は水平カウント値“4”を出力し,セル#7は水平カウ
ント値“3”を出力し,セル#8(28)は水平カウン
ト値“2”を出力する。
Each cell counts the number of "1"s in the input processing data using a built-in counter circuit and outputs it as a horizontal count value. Taking the first row as an example, the binarized data in the first row is "01001000", so the counter circuit 21a calculates "2", and cell #1 (21) calculates "2" as the horizontal count value. ” is output. Similarly, cell #2 (22) has a horizontal count value “
3", and cell #3 (23) outputs the horizontal count value "4".
”, cell #4 outputs the horizontal count value “6”, cell #5 outputs the horizontal count value “6”, and cell #6 outputs the horizontal count value “6”.
outputs a horizontal count value "4", cell #7 outputs a horizontal count value "3", and cell #8 (28) outputs a horizontal count value "2".

【0036】セル#1(21)〜セル#8(28)が出
力した,2値化画素マトリクスの第1行〜第8行の水平
カウント値を並べると,“2,3,4,6,6,4,3
,2”となる。これが水平ヒストグラムである。
When the horizontal count values of the first to eighth rows of the binarized pixel matrix output by cells #1 (21) to #8 (28) are arranged, they are "2, 3, 4, 6, 6,4,3
, 2''. This is the horizontal histogram.

【0037】(2)垂直ヒストグラムの計算各セルに内
蔵されたインクリメント回路は,カウンタ回路が入力さ
れた処理データの水平カウント値を算出するのと並行し
て,前段のセルが出力する行カウント情報を入力し,こ
れに処理データの各列ごとの“1”を累積加算して行カ
ウント情報を作成して次段のセルへ出力する。
(2) Vertical histogram calculation The increment circuit built into each cell calculates the row count information output from the previous cell in parallel with the counter circuit calculating the horizontal count value of the input processing data. is input, "1" for each column of processing data is cumulatively added to this to create row count information, and the row count information is output to the next cell.

【0038】セル#1(21)は第1段であるから,イ
ンクリメント回路21bの入力は接地されている。した
がって,インクリメント回路21bの前段の行カウント
情報は,“0,0,0,0,0,0,0,0”となる。 インクリメント回路21bは,この行カウント情報“0
,0,0,0,0,0,0,0”と処理データ1“0,
1,0,0,1,0,0,0”を各列ごとに加算して行
カウント情報“0,1,1,0,0,1,0,0”を算
出し,行カウント情報として出力する。
Since cell #1 (21) is the first stage, the input of the increment circuit 21b is grounded. Therefore, the row count information at the previous stage of the increment circuit 21b becomes "0, 0, 0, 0, 0, 0, 0, 0". The increment circuit 21b receives this row count information “0”.
,0,0,0,0,0,0,0" and processing data 1"0,
1, 0, 0, 1, 0, 0, 0" for each column to calculate the row count information "0, 1, 1, 0, 0, 1, 0, 0", and use it as the row count information. Output.

【0039】セル#2(22)は,セル#1(21)が
出力した行カウント情報“0,1,0,0,1,0,0
,0”を入力し,この行カウント情報と処理データ2“
0,0,1,0,1,0,1,0”を各列ごとに加算し
て行カウント情報“0,1,1,0,2,0,1,0”
を算出し,行カウント情報として出力する。
Cell #2 (22) stores the row count information “0, 1, 0, 0, 1, 0, 0” output by cell #1 (21).
, 0", and input this row count information and processing data 2"
0, 0, 1, 0, 1, 0, 1, 0” for each column to generate row count information “0, 1, 1, 0, 2, 0, 1, 0”
is calculated and output as row count information.

【0040】セル#3(23)は,セル#2(22)が
出力した行カウント情報“0,1,1,0,2,0,1
,0”を入力し,この行カウント情報と処理データ3“
1,1,0,1,1,0,0,0”を各列ごとに加算し
て行カウント情報“1,2,1,1,3,0,1,0”
を算出し,行カウント情報として出力する。
Cell #3 (23) stores the row count information “0, 1, 1, 0, 2, 0, 1” output by cell #2 (22).
, 0", and input this row count information and processing data 3"
1, 1, 0, 1, 1, 0, 0, 0" for each column to generate row count information "1, 2, 1, 1, 3, 0, 1, 0"
is calculated and output as row count information.

【0041】セル#4は,セル#3(23)が出力した
行カウント情報“1,2,1,1,3,0,1,0”を
入力し,この行カウント情報と処理データ4“0,1,
1,1,1,0,1,1”を各列ごとに加算して行カウ
ント情報“1,3,2,2,4,0,2,1”を算出し
,行カウント情報として出力する。
Cell #4 inputs the row count information "1, 2, 1, 1, 3, 0, 1, 0" outputted by cell #3 (23), and uses this row count information and processing data 4 " 0,1,
1, 1, 1, 0, 1, 1" for each column to calculate row count information "1, 3, 2, 2, 4, 0, 2, 1" and output it as row count information. .

【0042】セル#5は,セル#4が出力した行カウン
ト情報“1,3,2,2,4,0,2,1”を入力し,
この行カウント情報と処理データ5“0,1,1,1,
1,0,1,1”を各列ごとに加算して行カウント情報
“1,4,3,3,5,0,3,2”を算出し,行カウ
ント情報として出力する。
Cell #5 inputs the row count information “1, 3, 2, 2, 4, 0, 2, 1” output by cell #4,
This row count information and processing data 5 “0, 1, 1, 1,
1, 0, 1, 1" are added for each column to calculate row count information "1, 4, 3, 3, 5, 0, 3, 2" and output as row count information.

【0043】セル#6は,セル#5が出力した行カウン
ト情報“1,4,3,3,5,0,3,2”を入力し,
この行カウント情報と処理データ6“1,1,0,1,
1,0,0,0”を各列ごとに加算して行カウント情報
“2,5,3,4,6,0,3,2”を算出し,行カウ
ント情報として出力する。
Cell #6 inputs the row count information “1, 4, 3, 3, 5, 0, 3, 2” output by cell #5,
This row count information and processing data 6 “1, 1, 0, 1,
1, 0, 0, 0" for each column to calculate row count information "2, 5, 3, 4, 6, 0, 3, 2" and output as row count information.

【0044】セル#7は,セル#6が出力した行カウン
ト情報“2,5,3,4,6,0,3,2”を入力し,
この行カウント情報と処理データ7“0,0,1,0,
1,0,1,0”を各列ごとに加算して行カウント情報
“2,5,4,4,7,0,4,2”を算出し,行カウ
ント情報として出力する。
Cell #7 inputs the row count information “2, 5, 3, 4, 6, 0, 3, 2” output by cell #6,
This row count information and processing data 7 “0, 0, 1, 0,
1, 0, 1, 0" for each column to calculate row count information "2, 5, 4, 4, 7, 0, 4, 2" and output as row count information.

【0045】セル#8(28)は,セル#7が出力した
行カウント情報“2,5,4,4,7,0,4,2”を
入力し,この行カウント情報と処理データ8“0,1,
0,0,1,0,0,0”を各列ごとに加算して行カウ
ント情報“2,6,4,4,8,0,4,2”を算出し
,行カウント情報として出力する。
Cell #8 (28) inputs the row count information "2, 5, 4, 4, 7, 0, 4, 2" output from cell #7, and uses this row count information and processing data 8 " 0,1,
0, 0, 1, 0, 0, 0" for each column to calculate row count information "2, 6, 4, 4, 8, 0, 4, 2" and output it as row count information. .

【0046】最終段のセル#8(28)が出力する行カ
ウント情報“2,6,4,4,8,0,4,2”がその
まま垂直ヒストグラムを成している。
The row count information "2, 6, 4, 4, 8, 0, 4, 2" output by cell #8 (28) at the final stage forms a vertical histogram as it is.

【0047】以上,8行×8列の2値化画素マトリクス
の水平ヒストグラムおよび垂直ヒストグラムを作成する
例を示したが,本発明のヒストグラム計算アレイは,m
,nを任意の正の整数として,m行×n列の2値化画素
マトリクスの水平ヒストグラムおよび垂直ヒストグラム
の作成に適用できる。その場合,ヒストグラム計算アレ
イは,ヒストグラム計算セルをm個並列配置し,前段の
インクリメント回路が出力する行カウント情報が次段の
インクリメント回路へ入力するように結線することによ
り構成される。
Above, an example of creating a horizontal histogram and a vertical histogram of a binarized pixel matrix of 8 rows x 8 columns was shown, but the histogram calculation array of the present invention
, n are arbitrary positive integers, and can be applied to create a horizontal histogram and a vertical histogram of a binary pixel matrix of m rows by n columns. In this case, the histogram calculation array is constructed by arranging m histogram calculation cells in parallel and connecting them so that the row count information output from the previous stage increment circuit is input to the next stage increment circuit.

【0048】[0048]

【発明の効果】本発明のヒストグラム計算アレイによれ
ば,任意の大きさの2値化画素マトリクスから水平ヒス
トグラムおよび垂直ヒストグラムを1回のデータ処理で
同時に算出できる。したがって,ヒストグラムの計算を
高速化できる。
According to the histogram calculation array of the present invention, a horizontal histogram and a vertical histogram can be calculated simultaneously from a binarized pixel matrix of any size by one data processing. Therefore, it is possible to speed up histogram calculation.

【0049】また,本発明のヒストグラム計算アレイは
,ヒストグラム計算セルを構成単位とし,それを複数個
並列配置する構成をとっているので,2値化画素マトリ
クスの画素幅が拡張しても容易に対応できる。さらに,
容易にLSI化することができる。
Furthermore, since the histogram calculation array of the present invention has a histogram calculation cell as a constituent unit and has a configuration in which a plurality of histogram calculation cells are arranged in parallel, it can easily be used even when the pixel width of the binarized pixel matrix is expanded. I can handle it. moreover,
It can be easily integrated into LSI.

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

【図1】本発明の原理を示す図である。FIG. 1 is a diagram showing the principle of the invention.

【図2】本発明によるヒストグラム計算アレイの構成例
を示す図である。
FIG. 2 is a diagram showing an example of the configuration of a histogram calculation array according to the present invention.

【図3】本発明によるヒストグラムの計算例を示す図で
ある。
FIG. 3 is a diagram showing an example of calculating a histogram according to the present invention.

【図4】従来のヒストグラム計算アレイを示す図である
FIG. 4 shows a conventional histogram calculation array.

【図5】従来のヒストグラム計算例を示す図である。FIG. 5 is a diagram showing an example of conventional histogram calculation.

【符号の説明】[Explanation of symbols]

11  ヒストグラム計算セル 12  カウンタ回路 13  インクリメント回路 14  クロック 15  処理データ 16  カウント値 17  行カウント情報入力 18  行カウント情報出力 11 Histogram calculation cell 12 Counter circuit 13 Increment circuit 14 Clock 15 Processing data 16 Count value 17 Line count information input 18 Row count information output

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  1行分の処理データを入力し,各列の
2値データをカウントしてカウント値を出力するカウン
タ回路と,各列ごとに2値データが累積加算された行カ
ウント情報を前段から入力し,この前段の行カウント情
報に1行分の処理データの各列ごとの2値データを加算
して行カウント情報を出力するインクリメント回路とを
含むことを特徴とするヒストグラム計算セル。
[Claim 1] A counter circuit that inputs one row of processed data, counts binary data in each column, and outputs a count value, and a counter circuit that outputs a count value by inputting one row of processed data, and a counter circuit that receives row count information in which the binary data is cumulatively added for each column. A histogram calculation cell characterized in that it includes an increment circuit that inputs from a previous stage, adds binary data for each column of processed data for one row to row count information of the previous stage, and outputs row count information.
【請求項2】  m行×n列〔m,nは正の整数〕の2
値化画素マトリクスの水平ヒストグラムおよび垂直ヒス
トグラムを作成するヒストグラム計算アレイであって,
請求項1記載のヒストグラム計算セルをm個並列配置し
,前段のインクリメント回路が出力する行カウント情報
が次段のインクリメント回路へ入力するように結線し,
水平ヒストグラムは,各ヒストグラム計算セルに,n個
の2値データから成る1行分の処理データを同時に入力
し,各ヒストグラム計算セル内のカウンタ回路が各列の
2値データをカウントして出力するm個のカウント値に
より作成し,垂直ヒストグラムは,第1段から累積加算
された各列ごとのn個の2値データから成り,第m段が
出力する行カウント情報によって作成することを特徴と
するヒストグラム計算アレイ。
[Claim 2] 2 of m rows x n columns [m and n are positive integers]
a histogram calculation array for creating horizontal and vertical histograms of a valued pixel matrix, the array comprising:
m pieces of histogram calculation cells according to claim 1 are arranged in parallel and connected so that the row count information output from the increment circuit at the previous stage is inputted to the increment circuit at the next stage,
In the horizontal histogram, one row of processed data consisting of n pieces of binary data is simultaneously input to each histogram calculation cell, and a counter circuit in each histogram calculation cell counts and outputs the binary data of each column. The vertical histogram is created using m count values, and the vertical histogram consists of n binary data for each column cumulatively added from the first stage, and is created using row count information output from the m-th stage. Histogram calculation array.
JP3038284A 1991-03-05 1991-03-05 Histogram calculation cell and histogram calculation array Withdrawn JPH04276886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3038284A JPH04276886A (en) 1991-03-05 1991-03-05 Histogram calculation cell and histogram calculation array

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3038284A JPH04276886A (en) 1991-03-05 1991-03-05 Histogram calculation cell and histogram calculation array

Publications (1)

Publication Number Publication Date
JPH04276886A true JPH04276886A (en) 1992-10-01

Family

ID=12521010

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3038284A Withdrawn JPH04276886A (en) 1991-03-05 1991-03-05 Histogram calculation cell and histogram calculation array

Country Status (1)

Country Link
JP (1) JPH04276886A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2840713A1 (en) * 2002-06-11 2003-12-12 Koninkl Philips Electronics Nv Image processing method involves calculating one addition or two addition result, during previous calculation stage or at least one previous calculation stage

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2840713A1 (en) * 2002-06-11 2003-12-12 Koninkl Philips Electronics Nv Image processing method involves calculating one addition or two addition result, during previous calculation stage or at least one previous calculation stage
WO2003105088A1 (en) * 2002-06-11 2003-12-18 Koninklijke Philips Electronics N.V. Calculation method of a cumulative histogram

Similar Documents

Publication Publication Date Title
US4506341A (en) Interlaced programmable logic array having shared elements
JPS58144971A (en) Array processor
US4783649A (en) VLSI graphics display image buffer using logic enhanced pixel memory cells
US4241408A (en) High resolution fractional divider
JPH05204609A (en) Multiplier
EP0391516B1 (en) Binary adding apparatus
JP3323312B2 (en) Accelerated test pattern generator
US4648058A (en) Look-ahead rounding circuit
Kayaer et al. A new approach to emulate CNN on FPGAs for real time video processing
JPH04276886A (en) Histogram calculation cell and histogram calculation array
Somasundaram et al. Performance Improvement of SIMD Processor for High-Speed end Devices in IoT Operation Based on Reversible Logic with Hybrid Adder Configuration
JPH01220528A (en) Parity generator
JPH07141150A (en) Multiplier
JP2557856B2 (en) CAD system
JP3702475B2 (en) Automatic circuit generator
Kumar et al. Digital image filter design using evolvable hardware
JP3417172B2 (en) Arithmetic circuit
CA1264072A (en) Reconfigurable parameter filter
JPH0326857B2 (en)
JPH0687265B2 (en) Spatial filter circuit
JP2580641B2 (en) Block synchronization circuit
JPS63213089A (en) Pattern signal processing circuit
Caohuu et al. Realtime convolution and morphology on VLSI-based mesh: a systolic approach
JPH0616293B2 (en) Image processing device
JPH05181987A (en) Fuzzy neuron chip

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980514