JPH05174144A - Histogram calculation circuit - Google Patents

Histogram calculation circuit

Info

Publication number
JPH05174144A
JPH05174144A JP3339123A JP33912391A JPH05174144A JP H05174144 A JPH05174144 A JP H05174144A JP 3339123 A JP3339123 A JP 3339123A JP 33912391 A JP33912391 A JP 33912391A JP H05174144 A JPH05174144 A JP H05174144A
Authority
JP
Japan
Prior art keywords
histogram
memory
time
address
frame
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.)
Granted
Application number
JP3339123A
Other languages
Japanese (ja)
Other versions
JP2948390B2 (en
Inventor
Bunichi Osuga
文一 大須賀
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.)
JFE Steel Corp
Original Assignee
Kawasaki Steel Corp
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 Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP3339123A priority Critical patent/JP2948390B2/en
Publication of JPH05174144A publication Critical patent/JPH05174144A/en
Application granted granted Critical
Publication of JP2948390B2 publication Critical patent/JP2948390B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To realize a histogram calculation circuit with high frame rate by constituting two memories so that their roles may be alternated with each other every continuous frame. CONSTITUTION:When a RAM 12 is again cleared while a histogram value is added to a RAM 10, each B input terminal of multiplexers 10, 26 is selected by switching a control signal SEL to a H level and the upper 10 bits of the histogram value are stored in the RAM 12 after the point of the time. Thus, the picture data for one picture is successively inputted and the histogram is determined. Next, the histogram of the picture data for a second frame is determined in the same way. In this case, the roles of the RAM 10 and RAM 12 are alternated. Therefore, a histogram calculation circuit which does not require almost or entirely time to clear memory can be obtained only by providing a memory having capacity which is equivalent to almost one memory in a conventional manner.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、フレームを構成する時
系列データの、該フレーム内の時系列データのヒストグ
ラムを算出するヒストグラム算出回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a histogram calculation circuit for calculating a histogram of time series data in a frame of time series data constituting a frame.

【0002】[0002]

【従来の技術】例えば各画素毎の濃度データを時系列的
に順次入力して画像1枚分の濃度ヒストグラムを算出す
るようなヒストグラム算出回路が知られている。このヒ
ストグラム算出回路の例として、特開平1−20178
2号公報には、画像データ(濃度値データ)をメモリの
アドレスとし、そのアドレスの示すメモリ領域に記憶さ
れたデータを+1することにより、濃度値データ毎のデ
ータ数(濃度値ヒストグラム)を計数する回路方式が提
案されている。
2. Description of the Related Art For example, a histogram calculation circuit is known in which density data for each pixel is sequentially input in time series to calculate a density histogram for one image. As an example of this histogram calculation circuit, Japanese Patent Laid-Open No. 1-20178
In Japanese Patent Laid-Open No. 2 (1994), image data (density value data) is used as a memory address, and the data stored in the memory area indicated by the address is incremented by 1 to count the number of data (density histogram) of each density value data. A circuit system that does this has been proposed.

【0003】[0003]

【発明が解決しようとする課題】ここで、画像1枚分の
時系列濃度データの集まりを1フレームとし、順次連続
して入力される各フレーム毎の濃度ヒストグラムを算出
する場合において、上記従来の提案に係る回路方式をそ
のまま採用すると、あるフレームのヒストグラムをメモ
リに格納してそのメモリ内のヒストグラムを読み出し、
その後メモリの内容を全てクリアするまで時間をおいた
後でないと次のフレームのヒストグラムの算出を開始す
ることができず、フレームレートが低くなってしまうと
いう問題を生じることになる。
Here, in the case of calculating a density histogram for each frame which is successively input in succession, a set of time-series density data for one image is regarded as one frame, and the above-mentioned conventional method is used. If the proposed circuit system is adopted as it is, the histogram of a certain frame is stored in the memory and the histogram in the memory is read out.
After that, the calculation of the histogram of the next frame cannot be started until some time has passed until the contents of the memory are all cleared, which causes a problem that the frame rate becomes low.

【0004】この問題を解決するために、画像1枚分
(1フレーム分)のヒストグラムを格納することのでき
るメモリを2つ備え、1方のメモリを用いてヒストグラ
ムの算出を行っている間に他方のメモリの内容をクリア
するというシーケンスを組むことが考えられる。このよ
うに構成するとメモリの内容をクリアする時間を空ける
必要がなく、したがってフレームレートを高めることが
できることとなる。
In order to solve this problem, two memories capable of storing a histogram of one image (one frame) are provided, and while one memory is used to calculate the histogram. It is conceivable to form a sequence of clearing the contents of the other memory. With this configuration, it is not necessary to take time to clear the contents of the memory, and therefore the frame rate can be increased.

【0005】しかし、この回路方式を採用すると、今度
は2フレーム分のメモリが必要となり、したがって回路
規模が増大化しコスト高となってしまうという問題が生
じる。本発明は、上記事情に鑑み、高いフレームレート
を確保ししかも回路規模も上記のように2フレーム分の
メモリを備えるほど増大化する必要のない、コストパフ
ォーマンスに優れたヒストグラム算出回路を提供するこ
とを目的とする。
However, if this circuit system is adopted, a memory for two frames is required this time, so that there is a problem that the circuit scale increases and the cost increases. In view of the above circumstances, the present invention provides a histogram calculation circuit excellent in cost performance, which secures a high frame rate and does not need to be increased in circuit scale to include a memory for two frames as described above. With the goal.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
の本発明のヒストグラム算出回路は、時系列データのそ
れぞれが入力される毎に、入力された時系列データに対
応するアドレスにより指定されたメモリ領域に記録され
たヒストグラム値を読み出し該ヒストグラム値に1を加
算して該アドレスにより指定されたメモリ領域に再度記
録する操作を、時系列データの1フレームに亘って繰り
返すことにより、該フレームにおける時系列データのヒ
ストグラムを算出するヒストグラム算出回路において、
上記時系列データの連続する各フレーム毎に機能が交替
される、順次積算されるヒストグラム値を表わすビット
列のうち下位ビット側と上位ビット側との一方又は他方
が記録される2つのメモリと、順次積算されるヒストグ
ラム値の上位ビット側が全て初期状態で表わされる時間
内に該上位ビット側が記録される上記メモリを初期化す
る初期化回路とを備えたことを特徴とするものである。
The histogram calculation circuit of the present invention for achieving the above object is designated by an address corresponding to the input time series data each time the time series data is input. By repeating the operation of reading the histogram value recorded in the memory area and adding 1 to the histogram value and recording again in the memory area specified by the address over one frame of the time series data, In the histogram calculation circuit that calculates the histogram of time series data,
Two memories in which one or the other of the low-order bit side and the high-order bit side of the bit string representing the sequentially integrated histogram values, in which the function is alternated for each successive frame of the time series data, are recorded, An initialization circuit is provided for initializing the memory in which the high-order bit side of the integrated histogram value is recorded within a time in which all the high-order bit side is represented in the initial state.

【0007】ここで上記下位ビット側が記録される上記
メモリが、該メモリの各アドレスにそれぞれ対応するフ
ラグを有し、上記ヒストグラム算出回路が、当該フレー
ムについて前記下位ビット側が記録される上記メモリの
各アドレスに対応する各メモリ領域にそれぞれ最初に書
き込む際にはヒストグラム値1を書き込むとともに、該
ヒストグラム値1を書き込んだメモリ領域のアドレスに
対応する上記フラグを、ヒストグラム値の累算を開始し
たことを表わす状態にセットする書込制御回路を備えた
構成としてもよい。
Here, the memory in which the lower bit side is recorded has a flag corresponding to each address of the memory, and the histogram calculation circuit causes each of the memories in which the lower bit side is recorded for the frame. When writing the histogram value 1 to each memory area corresponding to the address for the first time, it is necessary to write the histogram value 1 and write the flag corresponding to the address of the memory area in which the histogram value 1 is written to start the accumulation of the histogram values. A configuration including a write control circuit for setting the state shown may be used.

【0008】[0008]

【作用】外部から時系列データを入力してヒストグラム
を算出する場合、ある1つのデータが入力されると、そ
のデータに対応するアドレスにより特定されるメモリ領
域に記憶された内容を読み出し、その読み出した内容に
+1を加算し、再度その+1加算された内容を上記アド
レスにより特定されるメモリ領域に格納するというシー
ケンスとなるが、このとき、上記時系列データの入力と
上記シーケンスは、1つのクロックに同期した速度で実
行される。
When the histogram is calculated by inputting time-series data from the outside, when one piece of data is input, the contents stored in the memory area specified by the address corresponding to the data are read out and read out. The sequence is such that +1 is added to the contents and the contents obtained by adding +1 again are stored in the memory area specified by the address. At this time, the input of the time-series data and the sequence are performed by one clock. It runs at a speed synchronized with.

【0009】ここで1フレーム分の時系列データのヒス
トグラム算出に要する時間と、メモリのアドレスを逐次
選択し0を書き込んでいくことによってメモリ全体をク
リアするに要する時間を、例えばフレームサイズ512
×512(1フレームの画素数262144個)、階調
256(メモリのワード数256)からなる画像データ
について、上記クロック数で比較すると、1フレーム分
の時系列データのヒストグラム算出に要する時間(クロ
ック数)は画素数が262144個であるから2621
44個のクロック分の時間が必要となり、一方メモリ全
体をクリアするに要する時間(クロック数)は、メモリ
のワード数が256であるから256個のクロック分の
時間でよい。したがってこのヒストグラム算出回路内で
メモリ全体をクリアするに要する時間は、1フレーム分
の時系列データが入力されるに要する時間よりはかなり
短時間で済むことになる。
Here, the time required to calculate the histogram of the time-series data for one frame and the time required to clear the entire memory by sequentially selecting addresses of the memory and writing 0 are described, for example, as the frame size 512.
For image data composed of × 512 (the number of pixels in one frame is 262144) and gradation 256 (the number of words in the memory is 256), the time required to calculate the histogram of the time-series data for one frame (clock The number of pixels is 2621 because the number of pixels is 262144.
Forty-four clocks are required, while the time (number of clocks) required to clear the entire memory is 256 clocks because the number of words in the memory is 256. Therefore, the time required to clear the entire memory in the histogram calculation circuit is considerably shorter than the time required to input time-series data for one frame.

【0010】本発明は、上記の点に想到することにより
完成されたものであり、順次積算されるヒストグラム値
を表わすビット列のうち下位ビット側と上位ビット側と
の一方又は他方が記録される2つのメモリと、順次積算
されるヒストグラム値の上位ビット側が全て初期状態で
表わされる時間内に該上位ビット側が記録されるメモリ
を初期化する初期化回路を備え、連続する各フレーム毎
に2つのメモリがその役割を交替するように構成したも
のである。この場合、上記2つのメモリはその合計のメ
モリ容量がほぼ1フレーム分で済むこととなり、いわば
従来例における1つのメモリを備えるだけでメモリをク
リアする時間を空ける必要をなくしたことになる。
The present invention has been completed in view of the above points, and one or the other of the lower bit side and the upper bit side of the bit string representing the sequentially integrated histogram values is recorded. Memory, and an initialization circuit for initializing the memory in which the upper bit side of the sequentially integrated histogram values is recorded within the time when the upper bit side is all represented in the initial state. Two memories are provided for each successive frame. Are configured to alternate their roles. In this case, the total memory capacity of the two memories is approximately one frame, which means that it is not necessary to provide a time for clearing the memories by providing only one memory in the conventional example.

【0011】ここで直前のフレームを構成する時系列デ
ータの累算の際に、上位ビット側の記録のために使用さ
れたメモリの各メモリ領域に既にある値が格納されてい
る場合があり、このメモリを下位ビット側が記録される
メモリとして使用を開始する際に初期化されておらず、
したがってそのメモリの各メモリ領域に最初にヒストグ
ラム値1を格納するときはその各メモリ領域に記録され
ている内容の如何に拘らずヒストグラム値1を格納する
必要がある。このために下位ビット側のヒストグラム値
が記録されるメモリの各メモリ領域毎に、ヒストグラム
値の累算を開始したか否かを区別するフラグが必要とな
るが、このフラグとして、例えば上記各メモリの各アド
レスにそれぞれ対応する各フラグからなるフラグメモリ
を上記2つのメモリのそれぞれに対応して備え、上記各
メモリが、上位側ビット側が記録されるメモリとして初
期化される際に、該メモリに対応するフラグメモリも初
期化し、上記各メモリが、下位ビット側が記録されるメ
モリとしてヒストグラム値1が格納された際に、これに
対応するフラグをヒストグラム値の累算を開始したこと
を表わす状態にセットするように構成してもよく、ある
いは上記フラグメモリを1つだけ備え、直前のフレーム
の時系列データのヒストグラムを読み出している間、あ
るいは当該フレームの時系列データのヒストグラムの算
出を開始する直前等に初期化するようにしてもよいが、
例えば後述する実施例に示すように、下位ビット側が記
録されるメモリ内にフラグを備えてもよく、この場合上
記2つのメモリ以外のフラグメモリは不要となり、構成
のより簡単なヒストグラム算出回路が実現される。
Here, when accumulating the time-series data forming the immediately preceding frame, there is a case where a value already stored in each memory area of the memory used for recording on the upper bit side is stored, It is not initialized when you start using this memory as the memory where the lower bit side is recorded,
Therefore, when the histogram value 1 is first stored in each memory area of the memory, it is necessary to store the histogram value 1 regardless of the contents recorded in each memory area. For this reason, a flag for distinguishing whether or not the accumulation of the histogram value is started is required for each memory area of the memory in which the histogram value of the lower bit side is recorded. A flag memory composed of flags corresponding to respective addresses of each of the two memories is provided corresponding to each of the two memories, and when each of the memories is initialized as a memory in which the upper bit side is recorded, The corresponding flag memory is also initialized, and when the histogram value 1 is stored as a memory in which the lower bit side is recorded, the corresponding flag memory is set to a state indicating that the accumulation of histogram values has started. It may be configured to be set, or is provided with only one of the above flag memories, and a histogram of time series data of the immediately preceding frame During and read, or may be initialized immediately before the like to start the calculation of the histogram of the time series data of the frame,
For example, as shown in an embodiment described later, a flag may be provided in the memory in which the lower bit side is recorded. In this case, a flag memory other than the above two memories is unnecessary, and a histogram calculation circuit with a simpler configuration is realized. To be done.

【0012】[0012]

【実施例】以下本発明の実施例について説明する。図1
は、本発明の一実施例のヒストグラム算出回路を表わし
た回路ブロック図、図2は図1に示すヒストグラム算出
回路のタイミングチャート、図3はRAM内の各メモリ
領域を模式的に表わした図である。
EXAMPLES Examples of the present invention will be described below. Figure 1
2 is a circuit block diagram showing a histogram calculation circuit according to an embodiment of the present invention, FIG. 2 is a timing chart of the histogram calculation circuit shown in FIG. 1, and FIG. 3 is a diagram schematically showing each memory area in the RAM. is there.

【0013】表1は、図2に示す記号を説明するための
表である。ここで、図1においては、各マルチプレクサ
の制御信号線は、繁雑さを避けるためその図示を省略し
ている。
Table 1 is a table for explaining the symbols shown in FIG. Here, in FIG. 1, the control signal line of each multiplexer is omitted in order to avoid complexity.

【0014】[0014]

【表1】 ──────────────────────────── SEL1LA マルチプレクサ14の制御信号 SEL2LA マルチプレクサ16の制御信号 OR1IN オアゲート30の入力信号 OR2IN オアゲート32の入力信号 SEL3LA マルチプレクサ18の制御信号 SEL4LA マルチプレクサ20の制御信号 SEL5LA マルチプレクサ22の制御信号 SEL6−1 マルチプレクサ24の制御信号 SEL6−2 マルチプレクサ24の制御信号 SEL7−1 マルチプレクサ26の制御信号 SEL7−2 マルチプレクサ26の制御信号 ──────────────────────────── ここに示す各制御信号のうちSEL1LA〜SEL5L
Aは、これらがLレベルにあるときは各マルチプレクサ
14〜22のA側の入力信号が選択され、Hレベルにあ
るときは各マルチプレクサ14〜22のB側の入力信号
が選択されることを意味している。
[Table 1] ───────────────────────────── SEL1LA Control signal of the multiplexer 14 SEL2LA Control signal of the multiplexer 16 OR1IN Input signal of the OR gate 30 Input signal of OR2IN OR gate 32 SEL3LA control signal of multiplexer 18 SEL4LA control signal of multiplexer 20 SEL5LA control signal of multiplexer 22 SEL6-1 control signal of multiplexer 24 SEL6-2 control signal of multiplexer 24 SEL7-1 control signal of multiplexer 26 SEL7- 2 Control signal of the multiplexer 26 ──────────────────────────── SEL1LA to SEL5L among the control signals shown here
A means that when these are at the L level, the input signal on the A side of each multiplexer 14-22 is selected, and when they are at the H level, the input signal on the B side of each multiplexer 14-22 is selected. is doing.

【0015】またマルチプレクサ24,26に関しては
それらの入力は表2に示すように選択される。
With respect to the multiplexers 24 and 26, their inputs are selected as shown in Table 2.

【0016】[0016]

【表2】 ──────────────────────────── SEL6−1 SEL6−2 選択される入力 SEL7−1 SEL7−2 L L A L H B H L C H H − ──────────────────────────── 図1に示すヒストグラム算出回路には2つのRAM1
0,12が備えられているが、これらのRAM10,1
2は、図3に示すように、1ワードが10ビットで構成
され、かつそれぞれが256ワードで構成されている。
[Table 2] ──────────────────────────── SEL6-1 SEL6-2 Selected input SEL7-1 SEL7-2 LL AL H B H L C H H − ────────────────────────────────────────────────────────────────────
0, 12 are provided, but these RAMs 10, 1
As shown in FIG. 3, 2 has 2 words each having 10 bits and each having 256 words.

【0017】ここで、図1に示すヒストグラム算出回路
に電源を投入した際等には2つのRAM10,12を共
にクリアする必要があり、このときには図2の時刻t1
に示すように、制御信号SEL1LA,SEL2LAが
Lレベルとなって、これにより各マルチプレクサ14,
16の入力がカウンタ28から出力されるカウント値を
通過させるA側に切替えられる。これら各マルチプレク
サ14,16の各出力端子14a,16aは、それぞれ
RAM10,12の各ライトアドレス入力端子10a,
12aと接続されている。また制御信号SEL6−1,
SEL6−2;SEL7−1,SEL7−2が全てLレ
ベルとなって、マルチプレクサ24,26の入力が並列
10ビットに全て0が入力されるA側に切替えられる。
これらのマルチプレクサ24,26は各出力端子24
a,26aが各RAM10,12の各信号入力端子10
b,12bと接続されており、カウンタ28のカウント
出力が1ずつインクリメントされるに従ってRAM1
0,12の全領域に0が書き込まれ、これによりRAM
10,12の双方がクリアされる。
Here, it is necessary to clear both of the two RAMs 10 and 12 when the power supply of the histogram calculation circuit shown in FIG. 1 is turned on, and at this time, at time t 1 of FIG.
, The control signals SEL1LA and SEL2LA go to L level, which causes the multiplexers 14 and
The 16 inputs are switched to the A side which allows the count value output from the counter 28 to pass. The output terminals 14a and 16a of the multiplexers 14 and 16 are connected to the write address input terminals 10a and 10a of the RAMs 10 and 12, respectively.
12a is connected. In addition, the control signal SEL6-1,
SEL6-2; SEL7-1 and SEL7-2 are all at the L level, and the inputs of the multiplexers 24 and 26 are switched to the A side where all 0s are input to the parallel 10 bits.
These multiplexers 24, 26 have respective output terminals 24
a and 26a are signal input terminals 10 of the RAMs 10 and 12, respectively.
b, 12b, and the RAM 1 is incremented as the count output of the counter 28 is incremented by 1.
0 is written in all areas of 0 and 12, so that RAM
Both 10 and 12 are cleared.

【0018】このようにして図2に示す時刻t2におい
てRAM10,12のクリアが完了すると、次に時刻t
3以降第一フレームを構成する、画像1枚あたり512
×512画素、各画素あたり8ビット(256階調)か
らなる画像データが各画素毎に順次時系列的にアドレス
生成ユニット34に入力されるが、この入力が開始され
る直前の時刻t3において、図2に示すように、制御信
号SEL1LA,SEL2LAがそれぞれHレベル,L
レベルとなって、マルチプレクサ14は、アドレス生成
ユニット34側、マルチプレクサ16はカウンタ28側
となる。またオアゲート回路30,31の各一方の入力
端子の信号OR1IN,OR2INはそれぞれLレベ
ル,Hレベルとなり、これによりオアゲート回路30
は、他方の入力端子から入力される信号の論理と同一の
論理の信号が出力され、オアゲート回路32は常にHレ
ベルの信号が出力される状態となる。ここで、各オアゲ
ート回路30,32の各他方の入力端子には、各RAM
10,12の各リードアドレス端子10c,12cから
入力されるアドレスで指定される1ワードのメモリ領域
のうちの最上位ビットの内容が読み出されて入力され
る。ここではRAM10にヒストグラム値のうちの下位
9ビットが記憶され、RAM10の最上位ビット(図3
参照)は、後述する論理フラグとして用いられる。また
RAM12にはヒストグラム値のうちの上位10ビット
が記憶される。したがってオアゲート30からは論理フ
ラグの論理レベルと同一の信号が出力されることにな
る。また各制御信号SEL3LA,SEL4LA,SE
L5LAはそれぞれHレベル,Lレベル、Hレベルとな
りそれぞれマルチプレクサ18,20,22のB側、A
側、B側の入力が選択される。さらに各制御信号SEL
6−1,SEL6−2;SEL7−1,SEL7−2は
それぞれHレベル,Lレベル;Lレベル,Lレベルとな
り、それぞれマルチプレクサ24,26のC側、A側の
入力が選択される。
When the RAMs 10 and 12 have been cleared at time t2 shown in FIG.
512 per image that makes up the first frame after 3
Image data consisting of × 512 pixels and 8 bits (256 gradations) for each pixel is sequentially input to the address generation unit 34 in time series for each pixel. At time t3 immediately before the input is started, As shown in FIG. 2, the control signals SEL1LA and SEL2LA are at H level and L level, respectively.
As a result, the multiplexer 14 becomes the address generation unit 34 side and the multiplexer 16 becomes the counter 28 side. Further, the signals OR1IN and OR2IN at one input terminal of each of the OR gate circuits 30 and 31 become L level and H level, respectively.
Outputs a signal having the same logic as that of the signal input from the other input terminal, and the OR gate circuit 32 is in a state where an H level signal is always output. Here, the RAMs are connected to the other input terminals of the OR gate circuits 30 and 32, respectively.
The contents of the most significant bit of the 1-word memory area designated by the addresses input from the read address terminals 10c and 12c of 10 and 12 are read and input. Here, the lower 9 bits of the histogram value are stored in the RAM 10, and the most significant bit (see FIG. 3) of the RAM 10 is stored.
(Refer to) is used as a logical flag described later. Further, the RAM 10 stores the upper 10 bits of the histogram value. Therefore, the same signal as the logic level of the logic flag is output from the OR gate 30. In addition, each control signal SEL3LA, SEL4LA, SE
L5LA becomes H level, L level, and H level, respectively, and the B side of multiplexers 18, 20, 22 respectively, A
Side and B side inputs are selected. Furthermore, each control signal SEL
6-1 and SEL6-2; SEL7-1 and SEL7-2 become H level, L level; L level and L level, respectively, and the C side and A side inputs of the multiplexers 24 and 26 are selected.

【0019】上記のように各マルチプレクサ14〜26
が切替えられた後1つの画素に対応する画像データがア
ドレス生成ユニット34に入力されると、このアドレス
生成ユニット34においてこの画像データが表わす濃度
値をアドレスとしたアドレス信号が生成され、先ず双方
のRAM10,12の各リードアドレス入力端子10
c,12cに入力される。このときRAM10からこの
指定されたアドレスに対応するメモリ領域から1ワード
(10ビット)のデータが出力されるが、これら10ビ
ットのデータのうち下位9ビットはアンドゲート回路3
6に直接にその一方の入力端子から入力され、最上位ビ
ット(論理フラグ)はオアゲート回路30を経由してア
ンドゲート回路36にその他方の入力端子から入力され
る。したがってその最上位ビット(論理フラグ)が
‘0’の場合(ここでは時刻t1〜t2の間で全てクリ
アされているため全て0である)、アンドゲート回路3
6からは全て‘0’が出力され、この全て‘0’の信号
が加算器42に入力される。またRAM12からは、リ
ードアドレス端子12cから入力されたアドレスに記録
された10ビットのデータが出力され、これら10ビッ
トのデータのうち下位9ビットはアンドゲート回路38
にその一方の入力端子から入力される。ここでオアゲー
ト回路32はその一方の入力端子に‘1’のOR2IN
が入力されているため、このオアゲート回路32からは
常に‘1’が出力され、したがってRAM12から読み
出されたアンドゲート回路38に入力された下位9ビッ
トの信号はこのアンドゲート回路38を経由し、さらに
マルチプレクサ20を経由して加算器42に入力され
る。またRAM12から読み出された10ビットの信号
のうちの最上位ビットはオアゲート回路32の入力端子
からオアゲート回路32に入力される。
As described above, each multiplexer 14-26
When the image data corresponding to one pixel is input to the address generation unit 34 after the switching of the, the address generation unit 34 generates an address signal with the density value represented by the image data as an address, and first, both Read address input terminals 10 of RAMs 10 and 12
c, 12c. At this time, 1 word (10 bits) of data is output from the RAM 10 from the memory area corresponding to the designated address. The lower 9 bits of these 10 bits of data are the AND gate circuit 3.
6 is directly input from one of the input terminals, and the most significant bit (logical flag) is input to the AND gate circuit 36 from the other input terminal via the OR gate circuit 30. Therefore, if the most significant bit (logical flag) is "0" (here, all are 0 because they are all cleared between times t1 and t2), the AND gate circuit 3
All 6's output "0", and the all "0" signals are input to the adder 42. The RAM 12 outputs 10-bit data recorded at the address input from the read address terminal 12c, and the lower 9 bits of the 10-bit data are the AND gate circuit 38.
Is input from one of the input terminals. The OR gate circuit 32 has an OR2IN of "1" at one of its input terminals.
Since this is input, the OR gate circuit 32 always outputs "1". Therefore, the lower 9-bit signal input to the AND gate circuit 38 read from the RAM 12 passes through the AND gate circuit 38. Further, it is input to the adder 42 via the multiplexer 20. The most significant bit of the 10-bit signal read from the RAM 12 is input to the OR gate circuit 32 from the input terminal of the OR gate circuit 32.

【0020】加算器42においては入力された18ビッ
トの信号に1が加算され、そのうちの下位9ビットに論
理‘1’の最上位ビット(論理フラグ)が加わってマル
チプレクサ24を経由し、アドレス生成ユニット34で
生成されマルチプレクサ14を経由してRAM10のラ
イトアドレス端子10aから入力されたアドレスで指定
されるメモリ領域に格納される。ここで、このライトア
ドレス端子10aから入力されたアドレスは、リードア
ドレス端子10cから入力されたアドレスと同一のアド
レスである。
In the adder 42, 1 is added to the input 18-bit signal, the most significant bit (logical flag) of logic '1' is added to the lower 9 bits of the signal, and the address is generated via the multiplexer 24. The data is stored in the memory area specified by the address generated by the unit 34 and input from the write address terminal 10a of the RAM 10 via the multiplexer 14. Here, the address input from the write address terminal 10a is the same address as the address input from the read address terminal 10c.

【0021】また、加算器42に入力された18ビット
に1が加算された値のうちの上位9ビットとキャリーを
表わす最上位ビットとの合計10ビットは、この加算器
42から出力されてマルチプレクサ26にそのB入力端
子から入力されるが、マルチプレクサ26は前述したよ
うにA入力端子が選択されているため、RAM12には
全て‘0’の10ビットの信号が入力され、カウンタ2
8で生成されマルチプレクサ16を経由してライトアド
レス端子12aに入力されたアドレスに‘0’が書き込
まれる。即ちRAM12は図2に示す時刻t3〜t4の
間に再度クリアされる。またこのRAM12が再度クリ
アされている間にも画像データがアドレス生成ユニット
34に入力され、このアドレス生成ユニットによりRA
M10のアドレスが指定されるが、この指定されたアド
レスがこの第一フレーム内で既に指定されたアドレスと
同一のアドレスである場合は、その最上位ビット(論理
フラグ)が‘1’であるため、その下位9ビットがアン
ドゲート回路36をそのまま経由し、さらにマルチプレ
クサ18を経由して加算器42に入力され、この下位9
ビットに既に格納されていたヒストグラム値に1が加算
されて再度RAM10の同一アドレスのメモリ領域に格
納されることになる。
In addition, a total of 10 bits of the upper 9 bits of the value obtained by adding 1 to the 18 bits input to the adder 42 and the most significant bit representing the carry are output from the adder 42 and are multiplexed. It is input to its input terminal 26 from its B input terminal, but since the multiplexer 26 has its A input terminal selected as described above, a 10-bit signal of all "0" is input to the RAM 12, and the counter 2
'0' is written in the address generated in 8 and input to the write address terminal 12a via the multiplexer 16. That is, the RAM 12 is cleared again between the times t3 and t4 shown in FIG. Also, while the RAM 12 is being cleared again, the image data is input to the address generation unit 34, and this address generation unit causes RA
The address of M10 is specified, but if this specified address is the same as the address already specified in this first frame, the most significant bit (logical flag) is "1". , The lower 9 bits of the low-order 9 bits pass through the AND gate circuit 36 as they are, and are further input to the adder 42 via the multiplexer 18.
1 is added to the histogram value already stored in the bit, and the histogram value is stored again in the memory area of the RAM 10 at the same address.

【0022】以上のようにしてRAM10にヒストグラ
ム値が加算されているうちにRAM12が再度クリアさ
れると、図2に示す時刻t4において、SEL2LA,
SEL7−2がHレベルに切替えられてこれによりマル
チプレクサ16,26の各B入力端子が選択され、これ
によりその時点以降RAM12にはヒストグラム値の上
位10ビットが格納されることになる。
When the RAM 12 is cleared again while the histogram values are being added to the RAM 10 as described above, at time t4 shown in FIG. 2, SEL2LA,
The SEL 7-2 is switched to the H level and the B input terminals of the multiplexers 16 and 26 are selected by this, whereby the RAM 10 stores the upper 10 bits of the histogram value after that point.

【0023】以上のようにして時刻t5迄の間に画像1
枚分の画像データが順次入力されてそのヒストグラムが
求められる。この時刻t5以降は読出しモードに入り、
画像データに代えてRAM10,12に格納されたヒス
トグラムを読み出すためのアドレスを指定する信号がア
ドレス生成ユニット34に入力され上記と同様にしてR
AM10、12からヒストグラム値が読出され、出力バ
ッファ回路40を経由して外部に取り出される。
As described above, the image 1 is displayed by the time t5.
The image data for one sheet is sequentially input and the histogram is obtained. After this time t5, the reading mode is entered,
A signal designating an address for reading the histograms stored in the RAMs 10 and 12 instead of the image data is input to the address generation unit 34, and R is read in the same manner as above.
Histogram values are read from the AMs 10 and 12 and taken out via the output buffer circuit 40.

【0024】次に時刻t6以降上記と同様にして第二フ
レームついて画像データのヒストグラムが求められる
が、ここではRAM10とRAM12との役割が交替さ
れることを除きそのシーケンスは上記第一フレームの場
合と同様であるため説明は省略する。なお、ここで、第
一フレームについてヒストグラムを算出した結果、RA
Mに記録されたヒストグラム値の上位ビットのうちの最
上位ビットが’1’となり、これにより第二フレームに
ついてヒストグラム値の積算を開始する当初からこの第
二フレームに関してヒストグラム値の下位ビット側が格
納されるRAM2の論理フラグが’1’となってしまっ
ていることが考えられる。しかし、前述したように、こ
こでは512×512画素で構成された画像を取扱って
いるため、上位ビット側10ビットのうちの最上位ビッ
トが’1’となるのは512×512画素の全てが同一
の濃度値であった場合に相当し、この場合は上位ビット
側10ビットのうちの下位側9ビットは全て’0’とな
り、したがって第1フレームに関してRAM12のある
メモリ領域の最上位ビットが’1’となり、次に第二フ
レームのヒストグラムを求める際にこの’1’となった
最上位ビットが論理フラグとして使用されヒストグラム
算出の当初からそのメモリ領域についてヒストグラム値
の積算が既に行われていると判定され、RAM12から
読出された10ビットの信号のうちの下位9ビットがそ
のままアンドゲート回路38を通り抜けてもこの通り抜
けた9ビットの信号は全て’0’であるため何らの問題
もなくヒストグラム値の積算が行われることとなる。
Next, after the time t6, the histogram of the image data for the second frame is obtained in the same manner as described above, but the sequence is the case of the first frame except that the roles of the RAM 10 and the RAM 12 are switched. The description is omitted because it is the same as. Note that here, as a result of calculating the histogram for the first frame, RA
The most significant bit of the upper bits of the histogram value recorded in M becomes '1', so that the lower bit side of the histogram value is stored for this second frame from the beginning when the integration of the histogram value is started for the second frame. It is conceivable that the logical flag of the RAM 2 that has been set is "1". However, as described above, since an image composed of 512 × 512 pixels is handled here, the most significant bit of the 10 bits on the high-order bit side becomes “1” when all 512 × 512 pixels are processed. This corresponds to the case where the density values are the same, and in this case, the lower 9 bits of the upper 10 bits are all "0", so that the most significant bit of a memory area of the RAM 12 is "0" for the first frame. When the histogram of the second frame is obtained next, the most significant bit, which has become "1", is used as a logical flag, and histogram values have already been accumulated for that memory area from the beginning of histogram calculation. Even if the lower 9 bits of the 10-bit signal read from the RAM 12 pass through the AND gate circuit 38 as they are, 9-bit signal is that the integration of the histogram value without any problem because it is all "0" is performed.

【0025】次に時刻t7においてRAM10とRAM
12の役割が再度交替され、同様にして第三フレームに
ついてヒストグラムの算出が行われる。
Next, at time t7, the RAM 10 and the RAM
The 12 roles are replaced again, and the histogram is similarly calculated for the third frame.

【0026】[0026]

【発明の効果】以上説明したように、本発明のヒストグ
ラム算出回路は、順次積算されるヒストグラム値を表わ
すビット列のうち上位ビット側と下位ビット側との一方
又は他方が記録される2つのメモリと、順次積算される
ヒストグラム値の上位ビット側が全て初期状態で表わさ
れる時間内に該上位ビット側が記録されるメモリを初期
化する初期化回路を備え、連続する各フレーム毎に2つ
のメモリがその役割を交替するように構成したため、従
来例におけるほぼ1つのメモリに匹敵する容量のメモリ
を備えるだけでメモリをクリアする時間をほとんどもし
くは全く空ける必要のない、フレームレートの高いヒス
トグラム算出回路が実現される。
As described above, the histogram calculation circuit of the present invention includes two memories in which one or the other of the high-order bit side and the low-order bit side of the bit string representing the sequentially integrated histogram values is recorded. , An initialization circuit for initializing a memory in which the high-order bit side of the sequentially integrated histogram values is recorded within a time when all the high-order bit side is expressed in an initial state, and two memories play the role in each successive frame. Since it is configured so as to alternate, a histogram calculation circuit with a high frame rate is realized by providing a memory having a capacity almost equal to one memory in the conventional example and requiring little or no time to clear the memory. ..

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

【図1】本発明の一実施例のヒストグラム算出回路を表
わした回路ブロック図である。
FIG. 1 is a circuit block diagram showing a histogram calculation circuit according to an embodiment of the present invention.

【図2】図1に示すヒストグラム算出回路のタイミング
チャートである。
FIG. 2 is a timing chart of the histogram calculation circuit shown in FIG.

【図3】RAM内の各メモリ領域を模式的に表わした図
である。
FIG. 3 is a diagram schematically showing each memory area in a RAM.

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

10、12 RAM 14、16、18、20、22、26 マルチプレクサ 28 カウンタ 30、32 オアゲート回路 34 アドレス生成ユニット 36、38 アンドゲート回路 42 加算器 10, 12 RAM 14, 16, 18, 20, 22, 26 Multiplexer 28 Counter 30, 32 OR gate circuit 34 Address generation unit 36, 38 AND gate circuit 42 Adder

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 時系列データのそれぞれが入力される毎
に、入力された時系列データに対応するアドレスにより
指定されたメモリ領域に記録されたヒストグラム値を読
み出し該ヒストグラム値に1を加算して該アドレスによ
り指定されたメモリ領域に再度記録する操作を、時系列
データの1フレームに亘って繰り返すことにより、該フ
レームにおける時系列データのヒストグラムを算出する
ヒストグラム算出回路において、 前記時系列データの連続する各フレーム毎に機能が交替
される、順次積算されるヒストグラム値を表わすビット
列のうち下位ビット側と上位ビット側との一方又は他方
が記録される2つのメモリと、 順次積算されるヒストグラム値の上位ビット側が全て初
期状態で表わされる時間内に該上位ビット側が記録され
る前記メモリを初期化する初期化回路とを備えたことを
特徴とするヒストグラム算出回路。
1. Each time each piece of time-series data is input, a histogram value recorded in a memory area designated by an address corresponding to the input time-series data is read out and 1 is added to the histogram value. In the histogram calculation circuit for calculating the histogram of the time series data in the frame by repeating the operation of recording again in the memory area designated by the address over one frame of the time series data, 2 memories in which one or the other of the low-order bit side and the high-order bit side of the bit string representing the histogram value that is sequentially accumulated, in which the function is changed for each frame, and the histogram value that is sequentially accumulated The upper bit side is recorded within the time when all of the upper bit side is expressed in the initial state. Histogram calculation circuit, characterized in that it includes a initialization circuit for initializing the directory.
【請求項2】 前記下位ビット側が記録される前記メモ
リが、該メモリの各アドレスにそれぞれ対応するフラグ
を有し、 前記ヒストグラム算出回路が、当該フレームについて前
記下位ビット側が記録される前記メモリの各アドレスに
対応する各メモリ領域にそれぞれ最初に書き込む際には
ヒストグラム値1を書き込むとともに、該ヒストグラム
値1を書き込んだメモリ領域のアドレスに対応する前記
フラグを、ヒストグラム値の累算を開始したことを表わ
す状態にセットする書込制御回路を備えたことを特徴と
する請求項1記載のヒストグラム算出回路。
2. The memory in which the lower bit side is recorded has a flag corresponding to each address of the memory, and the histogram calculation circuit causes each of the memories in which the lower bit side is recorded for the frame. When writing the histogram value 1 to each memory area corresponding to the address for the first time, the histogram value 1 is written, and the flag corresponding to the address of the memory area in which the histogram value 1 is written is started. 2. The histogram calculation circuit according to claim 1, further comprising a write control circuit for setting the state to be represented.
JP3339123A 1991-12-21 1991-12-21 Histogram calculation circuit Expired - Fee Related JP2948390B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3339123A JP2948390B2 (en) 1991-12-21 1991-12-21 Histogram calculation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3339123A JP2948390B2 (en) 1991-12-21 1991-12-21 Histogram calculation circuit

Publications (2)

Publication Number Publication Date
JPH05174144A true JPH05174144A (en) 1993-07-13
JP2948390B2 JP2948390B2 (en) 1999-09-13

Family

ID=18324467

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3339123A Expired - Fee Related JP2948390B2 (en) 1991-12-21 1991-12-21 Histogram calculation circuit

Country Status (1)

Country Link
JP (1) JP2948390B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009104605A (en) * 2007-10-22 2009-05-14 Advantest Corp Histogram generation with bank for improved memory access performance
JP2017147692A (en) * 2016-02-19 2017-08-24 株式会社東芝 Histogram counter and radiation detection circuit

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101949294B1 (en) 2012-07-24 2019-02-18 삼성전자주식회사 apparatus and method of calculating histogram accumulation of image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009104605A (en) * 2007-10-22 2009-05-14 Advantest Corp Histogram generation with bank for improved memory access performance
JP2017147692A (en) * 2016-02-19 2017-08-24 株式会社東芝 Histogram counter and radiation detection circuit

Also Published As

Publication number Publication date
JP2948390B2 (en) 1999-09-13

Similar Documents

Publication Publication Date Title
JPH08317309A (en) Video signal processing circuit
JPH05174144A (en) Histogram calculation circuit
JP2000083211A (en) Method and device for storing and extracting digital image data
JP2709356B2 (en) Image processing method
JP2655495B2 (en) ATM cell format conversion circuit
EP0189524B1 (en) Memory unit having arithmetic and logic functions, in particular for graphic processing
JPS6362083A (en) Projection data generation system
KR950004107B1 (en) Image display circuit
JP3646839B2 (en) Digital oscilloscope
US20050093871A1 (en) Digital line delay using a single port memory
JP3976388B2 (en) Memory control device
JP3104001B2 (en) Line buffer and image processing apparatus using the same
JP3257438B2 (en) Memory control circuit
JPH0668254A (en) Histogram arithmetic unit
JP3013011B2 (en) Buffer circuit
RU1833858C (en) Device for graph information output
JPS61237539A (en) Frame conversion circuit
JP2577797B2 (en) Pixel density conversion circuit
JPS6141273A (en) Picture processor
JP2946863B2 (en) Parity counting circuit
JPH08147458A (en) Memory control unit
JPH0828843B2 (en) Video synthesizer
JPH0678017A (en) Frame conversion circuit
JPS6059385A (en) Image display unit
JPH0772876B2 (en) Memory control circuit

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990622

LAPS Cancellation because of no payment of annual fees