Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0799545B2 - Pipeline histogram calculation circuit - Google Patents
[go: Go Back, main page]

JPH0799545B2 - Pipeline histogram calculation circuit - Google Patents

Pipeline histogram calculation circuit

Info

Publication number
JPH0799545B2
JPH0799545B2 JP61012160A JP1216086A JPH0799545B2 JP H0799545 B2 JPH0799545 B2 JP H0799545B2 JP 61012160 A JP61012160 A JP 61012160A JP 1216086 A JP1216086 A JP 1216086A JP H0799545 B2 JPH0799545 B2 JP H0799545B2
Authority
JP
Japan
Prior art keywords
input
register
density
pipeline
memory
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
Application number
JP61012160A
Other languages
Japanese (ja)
Other versions
JPS62172473A (en
Inventor
洋道 岩瀬
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 JP61012160A priority Critical patent/JPH0799545B2/en
Publication of JPS62172473A publication Critical patent/JPS62172473A/en
Publication of JPH0799545B2 publication Critical patent/JPH0799545B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔概要〕 算出結果をメモリに格納する濃度ヒストグラム算出処理
をパイプライン化する為、1つの入力濃度値に対しパイ
プライン処理中にそれまで入力された濃度値で前記入力
濃度値と同一濃度値の個数を検出して補正値を求め、前
記入力濃度値によって読み出されたメモリ内容と共にパ
イプライン演算手段に供給する。これにより入力濃度値
に対する濃度ヒストグラムをパイプライン加算処理で正
しく算出することが可能となり、高速な濃度ヒストグラ
ム算出処理を小規模回路で実現することが出来る。
DETAILED DESCRIPTION OF THE INVENTION [Outline] In order to pipeline the density histogram calculation processing for storing the calculation result in a memory, one input density value is input with the density value input so far during the pipeline processing. A correction value is obtained by detecting the number of density values that are the same as the density value, and the correction value is supplied to the pipeline calculation means together with the memory contents read by the input density value. As a result, the density histogram for the input density value can be correctly calculated by the pipeline addition processing, and the high-speed density histogram calculation processing can be realized by a small-scale circuit.

〔産業上の利用分野〕 本発明は、パイプライン演算処理による高速な濃度ヒス
トグラムの算出回路、特に画像処理において、入力画素
の濃度ヒストグラムを高速に算出する場合に好適な高速
パイプラインヒストグラム算出回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a high-speed density histogram calculation circuit by pipeline calculation processing, and particularly to a high-speed pipeline histogram calculation circuit suitable for high-speed calculation of a density histogram of input pixels in image processing. .

〔従来の技術〕[Conventional technology]

画像処理において濃度ヒストグラムは、コントラストの
修正や領域の抽出等、各種の画像処理に広く用いられて
いる。この濃度ヒストグラムは、画像中から濃度値毎に
その画素数を累積することにより求められる。
In image processing, the density histogram is widely used for various image processing such as contrast correction and area extraction. This density histogram is obtained by accumulating the number of pixels for each density value from the image.

この画像の濃度ヒストグラムを算出する方式として、従
来算出された濃度ヒストグラムをメモリに格納し、あ
る入力画素の濃度値に対応するアドレスのメモリ内容を
読み出し、その内容に“1"を加えて再度メモリの同じア
ドレスに書き込みを行う方式、入力画素の濃度値毎に
対応するカウンタに格納する方式、が用いられていた。
As a method of calculating the density histogram of this image, the conventionally calculated density histogram is stored in the memory, the memory content of the address corresponding to the density value of a certain input pixel is read, "1" is added to the content, and the memory is read again. The method of writing to the same address of, and the method of storing in the counter corresponding to each density value of the input pixel were used.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

前述の画像の濃度ヒストグラム算出方式において、の
濃度ヒストグラムをメモリに格納する方式は、安価で規
模の小さいメモリを使用出来る利点がある。しかしなが
ら1回の濃度ヒストグラム算出処理を行うのにメモリか
らの濃度ヒストグラムの読出し動作、加算動作及び算出
された濃度ヒストグラムの再書込み動作の三動作を必要
とする為、濃度ヒストグラム算出処理に時間が掛り算出
処理を高速化することが出来ないという問題があった。
In the above-mentioned image density histogram calculation method, the method of storing the density histogram in the memory has an advantage that an inexpensive and small-scale memory can be used. However, since one operation of the density histogram calculation processing requires three operations of a density histogram read operation from the memory, an addition operation, and a rewriting operation of the calculated density histogram, the density histogram calculation processing takes time. There is a problem that the calculation process cannot be speeded up.

一方、のカウンタに格納する方式は、高速なカウンタ
を用いることにより濃度ヒストグラムの算出処理を容易
に高速化することが可能である反面、濃度ヒストグラム
の最大値、例えば4096×4096の画像では最大224までの
カウンタを必要とする為、ハードウェアが大規模且つ高
価なものになるという問題があった。
On the other hand, the method of storing in the counter of (1) can easily speed up the calculation process of the density histogram by using a high-speed counter, but on the other hand, the maximum value of the density histogram, for example, a maximum of 2 in the case of 4096 × 4096 image. There is a problem that the hardware becomes large-scale and expensive because it requires a counter up to 24 .

本発明は、画像の濃度ヒストグラムをメモリに格納する
際の濃度ヒストグラム算出処理をパイプライン化するこ
とにより、高速処理が可能で且つ小規模で安価な濃度ヒ
ストグラム算出回路を提供することを目的とする。
It is an object of the present invention to provide a small-scale and inexpensive density histogram calculation circuit capable of high-speed processing by pipeline-processing the density histogram calculation processing when storing the density histogram of an image in a memory. .

〔問題点を解決するための手段〕[Means for solving problems]

画像の濃度ヒストグラムをメモリに格納する方式におい
ては、入力画素についてその濃度ヒストグラムを算出す
る場合、メモリの読出し時間をtmr、演算(加算)時間
をtad、メモリへの再書込み時間をtmwとすると、1回の
濃度ヒストグラム算出処理時間に、tmr+tad+tmw時間
を必要とする。
In the method of storing the density histogram of the image in the memory, when calculating the density histogram of the input pixel, the read time of the memory is t mr , the calculation (addition) time is t ad , and the rewriting time to the memory is t mw. Then, it takes t mr + t ad + t mw time for one concentration histogram calculation processing time.

この様に複数動作からなる演算処理を高速化する為の一
般的な手法として、処理をパイプライン化する手法が知
られている。濃度ヒストグラム算出処理をパイプライン
化することが出来れば、メモリの読出し処理、演算処
理、メモリへの書込み処理を独立に行うことにより、あ
る入力画素についての演算時間はtmr+tad+tmwである
が、全体のスループットとしては(n+1)tmaxを得る
ことが可能となる。ここで、nは連続して入力される画
素の数であり、tmaxはtmr,tad,tmwの中の最大値であ
る。
As a general method for accelerating the arithmetic processing including a plurality of operations in this way, a method of pipeline processing is known. If the density histogram calculation process can be pipelined, the calculation time for a certain input pixel is t mr + t ad + t mw by independently performing the memory read process, calculation process, and memory write process. However, it is possible to obtain (n + 1) t max as the overall throughput. Here, n is the number of pixels that are continuously input, and t max is the maximum value among t mr , t ad , and t mw .

然しながら、画像の濃度ヒストグラム算出処理において
は、メモリの読出し、演算、メモリへの書込みの各処理
は独立して行うことが出来ないので、これらの処理を直
ちにパイプライン化することは出来ない。
However, in the image density histogram calculation process, each process of memory reading, calculation, and writing to the memory cannot be performed independently, so these processes cannot be immediately pipelined.

即ち、画像の濃度ヒストグラム算出処理をそのままパイ
プライン化すると、パイプライン処理中に同じ濃度値の
画素がm個連続して入力された場合、その濃度値につい
てメモリから読み出されたそれまでの累積値がSであっ
たとすると、パイプライン処理結果は“S+1"となっ
て、“S+1"から“S+m+1"に順次累積する正しい処
理結果が得られないからである。
That is, if the density histogram calculation processing of the image is pipelined as it is, when m pixels of the same density value are continuously input during the pipeline processing, the cumulative value of the density value read from the memory up to that point is accumulated. This is because if the value is S, the pipeline processing result will be "S + 1", and a correct processing result that sequentially accumulates from "S + 1" to "S + m + 1" cannot be obtained.

本発明は、この問題を解決して、画像の濃度ヒストグラ
ム算出処理のパイプライン化を可能にしたものである。
The present invention solves this problem and enables the pipeline of image density histogram calculation processing.

以下、濃度ヒストグラムをメモリに格納する方式におけ
る前述の問題点を解決する為に本発明が講じた手段を、
第1図を参照して説明する。
The means taken by the present invention to solve the above-mentioned problems in the method of storing the density histogram in the memory will be described below.
A description will be given with reference to FIG.

第1図は、本発明の基本構成をブロック図で示したもの
である。
FIG. 1 is a block diagram showing the basic configuration of the present invention.

第1図において、110はメモリで、濃度ヒストグラムの
既算出結果が格納される。
In FIG. 1, 110 is a memory in which the already calculated results of the density histogram are stored.

120は入力レジスタ手段で、パイプライン演算手段の演
算段数に対応した数のレジスタ段を有し、濃度値を入力
データとし順次シフトして格納される。
Reference numeral 120 denotes an input register means, which has a number of register stages corresponding to the number of arithmetic stages of the pipeline arithmetic means, and sequentially shifts and stores the density value as input data.

130は補正値発生手段で、入力レジスタ手段120の各レジ
スタ段に格納されている濃度値に基づいて濃度ヒストグ
ラムを算出するための補正値を発生する。
Reference numeral 130 denotes a correction value generating means, which generates a correction value for calculating a density histogram based on the density value stored in each register stage of the input register means 120.

140はパイプライン演算手段で、入力濃度値に基づいて
読み出されたメモリ110の内容と前記補正値を入力とし
てパイプライン処理により濃度ヒストグラムを算出す
る。
Reference numeral 140 denotes a pipeline calculation means, which calculates the density histogram by pipeline processing using the contents of the memory 110 read based on the input density value and the correction value as input.

150はアドレス選択手段で、入力濃度値をメモリ110に対
する読出しアドレスとして選択し、入力レジスタ手段12
0から出力された濃度値を、パイプライン演算手段140の
処理結果をメモリ110に格納する書き込みアドレスとし
て選択する。
Reference numeral 150 denotes an address selecting means, which selects the input density value as a read address for the memory 110, and the input register means 12
The density value output from 0 is selected as the write address for storing the processing result of the pipeline calculation means 140 in the memory 110.

〔作用〕[Action]

1つの入力IPがあると、アドレス選択手段150で選択さ
れ、その入力濃度値より得られるアドレスでメモリ110
の内容が読み出されてパイプライン演算手段140に入力
される。
When there is one input IP, it is selected by the address selection means 150, and the memory 110 is selected by the address obtained from the input density value.
Is read and input to the pipeline calculation means 140.

一方、前記入力IPは、レジスタ手段120に加えられる。Meanwhile, the input IP is added to the register means 120.

補正量発生手段130は、レジスタ段120内の各レジスタ段
間の濃度値に基づいて濃度ヒストグラムを算出するため
の補正値を発生する。即ち、いまパイプライン演算手段
140における演算処理中に前記入力IPと同じ濃度値の入
力がm個入力されていて、前記入力IPが加わった時点
で、それらm個を含むn個の入力に対する演算処理中で
あったとする。
The correction amount generating means 130 generates a correction value for calculating the density histogram based on the density value between the register stages in the register stage 120. That is, now pipeline calculation means
It is assumed that m inputs of the same density value as the input IP have been input during the arithmetic processing in 140, and at the time when the input IP is added, the arithmetic processing is being performed on n inputs including the m input.

入力IPの濃度値をアドレスとしてメモリ110より読み出
された濃度ヒストグラム値をSとすると、このSだけを
パイプライン演算手段140に入力した場合は、パイプラ
イン演算手段140によって“S+1"の演算処理が行われ
て、正しい結果である“S+m+1"が得られない。それ
は、入力IPが加わったときに読み出されたメモリ110の
濃度ヒストグラム値Sが、パイプライン演算手段140内
で演算処理中のn個の入力に関する累積処理が終ってい
ない濃度ヒストグラム値を示すものであることによる。
Assuming that the density histogram value read from the memory 110 is S using the density value of the input IP as an address, if only this S is input to the pipeline calculating means 140, the pipeline calculating means 140 performs the calculation processing of “S + 1”. And the correct result "S + m + 1" cannot be obtained. That is, the density histogram value S of the memory 110 read when the input IP is added indicates the density histogram value for which the cumulative processing for n inputs being processed in the pipeline calculation means 140 is not completed. Depends on.

補正値発生手段130は、レジスタ手段120の各レジスタ段
(図示せず)にあるそれまでのn−1個の入力から前記
入力IPの濃度値と同じ濃度値を持ったm個の入力を検出
すると、その個数mを補正量m+1としてパイプライン
演算手段140に加える。
The correction value generating means 130 detects m inputs having the same density value as the density value of the input IP from the n-1 inputs existing in each register stage (not shown) of the register means 120. Then, the number m is added to the pipeline calculation means 140 as the correction amount m + 1.

パイプライン演算手段140は、前記入力IPの濃度値に基
づいて読み出されたメモリ110の内容Sと補正値発生手
段130の発生した前記補正値m+1を入力としてパイプ
ライン演算処理を行い、正しい処理結果“S+m+1"を
出力する。
The pipeline calculation means 140 receives the contents S of the memory 110 read out based on the density value of the input IP and the correction value m + 1 generated by the correction value generation means 130 as an input to perform pipeline calculation processing, and correct processing is performed. The result "S + m + 1" is output.

アドレス選択手段150は、レジスタ手段120から前記入力
IPの濃度値が出力されたときそれを書き込みアドレスと
して選択し、そのときパイプライン演算手段140から出
力された入力IPの濃度値に対する前記処理結果“S+m
+1"をメモリ110に格納する。
The address selecting means 150 receives the input from the register means 120.
When the density value of the IP is output, it is selected as the write address, and the processing result “S + m” for the density value of the input IP output from the pipeline operation means 140 at that time is selected.
+1 ”is stored in the memory 110.

以上の様にして、濃度ヒストグラム算出処理をパイプラ
イン化し、パイプライン演算処理中に同じ濃度値の入力
が連続又は不連続に入力されても正しい濃度ヒストグラ
ムを高速に算出することが出来る。
As described above, the density histogram calculation process is pipelined, and the correct density histogram can be calculated at high speed even if the same density value is continuously or discontinuously input during the pipeline calculation process.

〔実施例I〕[Example I]

本発明の一実施例である実施例Iを、第2図を参照して
説明する。
Example I, which is one example of the present invention, will be described with reference to FIG.

第2図は、実施例Iの構成をブロック図で示したもので
ある。
FIG. 2 is a block diagram showing the configuration of the embodiment I.

(A)実施例Iの構成 第2図において、メモリ110、入力レジスタ手段120、補
正値算出手段130、パイプライン演算手段140、アドレス
選択手段150については、第1図で説明した通りであ
る。
(A) Configuration of Embodiment I In FIG. 2, the memory 110, the input register means 120, the correction value calculating means 130, the pipeline calculating means 140, and the address selecting means 150 are as described in FIG.

160はサンプリングレジスタで、フリップフロップFFで
構成され、回路外から一定時間間隔で供給される入力画
素濃度値を回路内部のクロックCKに同期した信号となる
様にクロックCKでサンプリングする。
Reference numeral 160 denotes a sampling register, which is composed of a flip-flop FF, and samples the input pixel density value supplied from the outside of the circuit at constant time intervals with the clock CK so as to be a signal synchronized with the clock CK inside the circuit.

170はメモリレジスタで、アドレス選択手段150を経由し
て加えられたサンプリングレジスタ160の画素濃度値を
アドレスとして読み出されたメモリ110の内容がサンプ
リングレジスタ160より1クロック後れて格納され、そ
の出力はバイプライン演算手段140に供給される。
Reference numeral 170 denotes a memory register, and the contents of the memory 110 read out by using the pixel density value of the sampling register 160 added via the address selection means 150 as an address are stored one clock later than the sampling register 160, and the output thereof. Is supplied to the biline calculation means 140.

入力レジスタ手段120において、1200は入力レジスタ段
で、サンプリングレジスタ160の内容が、サンプリング
レジスタ160より1クロック遅れで格納される。又1211
〜121nはパイプライン処理手段140の演算段数nに対応
するn段のレジスタ段で、フリプフロップ(FF)で構成
され、各入力画素の濃度値がクロックCKに同期して順次
シフトされて格納される。
The input register means 120, 120 0 in the input register stage, the contents of the sampling register 160 is stored in one clock later than the sampling register 160. Again 121 1
To 121 n in the register stages of the n stages corresponding to the operation number n of the pipeline processing unit 140 is composed of Furipufuroppu (FF), stores the density value of each input pixel is sequentially shifted in synchronism with the clock CK To be done.

なお、入力レジスタ手段120のレジスタ段の段数nと後
述するパイプライン演算手段140の演算段の段数nは同
一であり、nはヒストグラム値を2進数で表現できる桁
数以上のnで構成される。
It should be noted that the number n of register stages of the input register means 120 and the number n of operation stages of the pipeline operation means 140 described later are the same, and n is composed of n which is equal to or larger than the number of digits by which the histogram value can be expressed in binary. .

補正値発生手段130において、1311〜131nは比較器で、
比較器131j(j=1〜n)は、入力レジスタ手段内の対
応するレジスタ段121j(j=1〜n)と入力レジスタ段
1200の内容を比較し、等しければ“1"を出力し、等しく
なければ“0"を出力する。132は補正値テーブルで、比
較器1311〜131nからの入力に基づいて補正値を発生して
パイプライン演算手段140に加える。具体的には、比較
器1311〜131nから供給された“1"入力の加算値に1を加
えた値を発生する。
In the correction value generating means 130, 131 1 to 131 n are comparators,
The comparator 131j (j = 1 to n) includes the corresponding register stage 121j (j = 1 to n) in the input register means and the input register stage.
Compare the contents of 120 0 , and output “1” if they are equal, and output “0” if they are not equal. Reference numeral 132 denotes a correction value table, which generates a correction value based on the inputs from the comparators 131 1 to 131 n and adds it to the pipeline calculating means 140. Specifically, a value obtained by adding 1 to the addition value of the "1" input supplied from the comparators 131 1 to 131 n is generated.

パイプライン演算手段140において、1411〜141nはn段
の演算段で、各加算段141j(j=1〜n)は、パイプラ
イン化した加算器142j、加算結果が格納される演算レジ
スタ144j及び保留しているデータが格納される演算レジ
スタ143jを有している。各加算器1421〜142nの加算処理
は1クロック以内で終了する。
In the pipeline operation means 140, 141 1 to 141 n are n operation stages, each addition stage 141j (j = 1 to n) is a pipelined adder 142j, and an operation register 144j for storing the addition result. And an arithmetic register 143j for storing the pending data. The addition process of each of the adders 142 1 to 142 n is completed within one clock.

第2図のパイプライン演算手段140の具体例を第4図に
示す。なお第4図は演算段数nは4とした場合を示して
いる。
FIG. 4 shows a concrete example of the pipeline arithmetic means 140 shown in FIG. Note that FIG. 4 shows a case where the number of operation stages n is 4.

第4図において、メモリ170および補正値テーブル132よ
り、後で説明するように、それぞれ、入力レジスタ段12
10に記録されている濃度値をアドレスとしてメモリ110
より読出されたヒストグラム値Sおよび補正値m+1が
入力される。
In FIG. 4, the memory 170 and the correction value table 132 are used to respectively input the input register stage 12 as described later.
Memory 110 density values recorded in 1 0 as an address
The histogram value S and the correction value m + 1 thus read out are input.

加算器1421はヒストグラム値Sと補正値m+1の最下位
のケタの加算が行なわれ、加算結果が演算レジスタ1441
に、また加算結果のケタ上げと最下位ケタ以外のデータ
が演算レジスタ1431に格納される。
The adder 142 1 adds the least significant digit of the histogram value S and the correction value m + 1, and the addition result is the operation register 144 1
To, and the data other than the addition result carry the least significant digit is stored in the arithmetic register 143 1.

また加算器1422では最下位よりのケタ上げと第2ケタの
加算が行なわれ、加算結果が演算レジスタ1442、第2ケ
タよりのケタ上げと第3ケタ以上のデータが演算レジス
タ1432に格納される。
The adder 142 2, carry the least significant and the second digit of the sum is performed, the result of addition operation register 144 2, carry a third digit or more data than the second digit to the arithmetic register 143 2 Is stored.

順次各ケタに対応したパイプライン加算演算を行ない、
最終の第4(n)ケタにおいては演算レジスタ1434(n)
に格納されているデータを最上位ケタデータとし、また
演算レジスタ1444(n)に格納されているデータを下位に
続くデータとしてメモリ110に出力する。
Pipeline addition operation corresponding to each digit is performed sequentially,
In the final fourth (n) digit, the operation register 143 4 (n)
And the data stored in the arithmetic register 1444 (n) is output to the memory 110 as the data following the lower order.

(B)実施例Iの動作 回路外より一定時間間隔で入力された画素の濃度値はサ
ンプリングレジスタ160でクロックCKに同期してサンプ
リングされ、入力レジスタ段1210及びアドレス選択手段
150に供給される。いま、その入力画素をIPとする。
(B) Operation of Embodiment I The density values of pixels input from outside the circuit at fixed time intervals are sampled by the sampling register 160 in synchronization with the clock CK, and the input register stage 121 0 and the address selecting means are selected.
Supplied to 150. Now, let the input pixel be IP.

アドレス選択手段150は、入力画素IPの濃度値を選択
し、これを読出してアドレスとしてメモリ110の内容S
を読み出してメモリレジスタ170に格納する。
The address selection means 150 selects the density value of the input pixel IP, reads it out, and uses it as the address, which is the content S of the memory 110.
Is read and stored in the memory register 170.

入力レジスタ段1210には、入力画素IPの濃度値がサンプ
リングレジスタ160より1クロック遅れで格納され、メ
モリレジスタ170には、前記メモリ110の内容Sが同じく
サンプリングレジスタ160より1クロック遅れで格納さ
れる。
The density value of the input pixel IP is stored in the input register stage 121 0 with a delay of 1 clock from the sampling register 160, and the content S of the memory 110 is stored in the memory register 170 with a delay of 1 clock from the sampling register 160. It

補正値発生手段130内の各比較器131j(j=1〜0)
は、入力レジスタ手段内の対応するレジスタ段121j(j
=1〜n)の画素濃度値を入力画0000濃度値と比較し、
一致した場合に“1"を出力し、一致しない場合は“0"を
出力して補正値テーブル132に供給する。
Each comparator 131j (j = 1 to 0) in the correction value generating means 130
Is the corresponding register stage 121j (j in the input register means.
= 1 to n) pixel density value is compared with the input image 0000 density value,
If they match, "1" is output, and if they do not match, "0" is output and supplied to the correction value table 132.

補正値テーブル132は、各比較器1311〜131nより供給さ
れた“1"入力の加算値に1を加えた値を発生する。これ
により、画素IPの入力時点にパイプライン演算手段140
内において処理中のn個の入力画素中に入力画素IPと同
一濃度値の入力画素がm個あったとすると、それが検出
され補正値m+1となってパイプライン演算手段140に
加えられる。
The correction value table 132 generates a value obtained by adding 1 to the addition value of the "1" input supplied from each of the comparators 131 1 to 131 n . As a result, the pipeline calculation means 140 is input at the time of inputting the pixel IP.
If there are m input pixels having the same density value as the input pixel IP among the n input pixels being processed, the detected pixel value is detected and added to the pipeline calculation means 140 as a correction value m + 1.

パイプライン演算手段140は、メモリレジスタ170より入
力されたメモリ内容S及び補正値テーブル132より入力
された補正値m+1に基づき“S+m+1"を出力する演
算処理を、第4図で説明したパイプライン処理により実
行する。
The pipeline calculation means 140 outputs the calculation process of outputting "S + m + 1" based on the memory contents S input from the memory register 170 and the correction value m + 1 input from the correction value table 132. The pipeline processing described in FIG. Run by.

これにより、正しい濃度ヒストグラム値“S+m+1"が
算出されて、演算レジスタ143n及び144nに格納される。
その時、入力レジスタ手段120内のレジスタ手段121n
は、入力画像IPの濃度値が前段から順次シフトされて格
納されている。
As a result, the correct density histogram value “S + m + 1” is calculated and stored in the arithmetic registers 143 n and 144 n .
At that time, the density value of the input image IP is sequentially shifted and stored in the register means 121 n in the input register means 120 from the previous stage.

アドレス選択手段150は、レジスタ手段121nの画素IPの
濃度値を選択し、これを書き込みアドレスとして演算レ
ジスタ143n及び144nに格納された濃度ヒストグラム“S
+m+1"を、メモリ110に格納する。
The address selecting means 150 selects the density value of the pixel IP of the register means 121 n , and uses this as the write address for the density histogram “S” stored in the calculation registers 143 n and 144 n.
+ M + 1 ”is stored in the memory 110.

更に詳細に動作を説明すると、時間t=t0にサンプリン
グレジスタ160に濃度値が入力されて保持され、次のク
ロック入力時であるt=t0+1で入力レジスタ段1210
移される。
To explain the operation in more detail, the density value is input and held in the sampling register 160 at time t = t 0 , and is transferred to the input register stage 121 0 at t = t 0 +1 when the next clock is input.

一方、t=t0でアドレス選択手段150はサンプリングレ
ジスタ160を選択して、濃度値をアドレスとしてメモリ1
10の記録を読出し、t=t0+1でメモリレジスタ170に
格納される。
On the other hand, at t = t 0 , the address selecting means 150 selects the sampling register 160 and uses the density value as an address in the memory 1.
The ten records are read and stored in the memory register 170 at t = t 0 +1.

また一方、t=t0+1においてアドレス選択手段150
は、サンプリングレジスタ160の出力を選択してメモリ1
10より記録の読出が終了すると、アドレス選択手段150
はレジスタ段121nを選択してメモリ110のアドレス(濃
度値)を出力し、出力されたアドレスに対するメモリに
加算段141nで加算されたS+m+1を格納する。
On the other hand, at t = t 0 +1 the address selection means 150
Select the output of the sampling register 160, memory 1
When the reading of the record is completed from 10, the address selecting means 150
Selects the register stage 121 n , outputs the address (density value) of the memory 110, and stores S + m + 1 added by the addition stage 141 n in the memory corresponding to the output address.

以上の処理はサンプリングレジスタ160に入力される濃
度値が最終になるまで繰返され、メモリ110にヒストグ
ラム結果が記録される。
The above processing is repeated until the density value input to the sampling register 160 reaches the final value, and the histogram result is recorded in the memory 110.

また、パイプライン演算手段140では、まず、t=t0
1ではレジスタ段1200に記録されている濃度値をアドレ
スとしたメモリ110に格納されている現在までのヒスト
グラムSが読出されてメモリレジスタ170に記録され
る。また、補正値テーブル132よりm+1が出力される
(補正値m+1については後で説明する)。
In the pipeline calculation means 140, first, t = t 0 +
At 1, the histogram S up to the present time stored in the memory 110 with the density value recorded in the register stage 120 0 as an address is read and recorded in the memory register 170. Further, m + 1 is output from the correction value table 132 (the correction value m + 1 will be described later).

時間t=t0+2では、第4図で説明しているように、メ
モリレジスタ170に記録されている現在までのヒストグ
ラム値Sと補正値テーブル132より出力される補正値m
+1が加算段1411に移されて、Sとm+1の最下位桁
(第1桁)に対する加算が行なわれる。また、レジスタ
段1210に記録されている濃度値はレジスタ段1211に移さ
れる。
At time t = t 0 +2, the histogram value S up to the present recorded in the memory register 170 and the correction value m output from the correction value table 132 as described in FIG.
+1 is moved to the addition stage 141 1 , and addition is performed on the least significant digit (first digit) of S and m + 1. Further, the density value recorded in the register stage 121 0 is transferred to the register stage 121 1 .

時間t=t+3では、Sとm+1の第2桁の加算が行な
われる。
At time t = t + 3, the addition of the second digit of S and m + 1 is performed.

以下、下位桁より順次加算が行なわれ、t=t+n+1
で最上位の桁の加算が終了し、S+m+1の加算結果が
得られる。
After that, addition is sequentially performed from the lower digit, and t = t + n + 1
Then, the addition of the most significant digit is completed, and the addition result of S + m + 1 is obtained.

したがって、加算段141jではレジスタ段121jに記録され
ている濃度値に対するSとm+1の第j桁の加算が実行
されている。
Therefore, in the addition stage 141 j , the addition of the jth digit of S and m + 1 to the density value recorded in the register stage 121 j is executed.

補正値テーブル132よりm+1を出力させる理由につい
ては、t=t0+1でメモリ110より読出されてメモリレ
ジスタ170に記録されているヒストグラム値Sには、レ
ジスタ段1210と同じ濃度値のものがレジスタ段1211〜12
1nの中に存在していても、その濃度値に対するヒストグ
ラム加算はSの中に加算されていない。
The reason why m + 1 is output from the correction value table 132 is that the histogram value S read from the memory 110 at t = t 0 +1 and recorded in the memory register 170 has the same density value as the register stage 121 0. register stage 121 1-12
Even if it exists in 1 n, the histogram addition for that density value is not added in S.

したがって、補正値テーブル132では、レジスタ段1210
に記録されている濃度値と同じ濃度値がレジスタ段1211
〜121nの中に記録されている個数mと自濃度に対する1
個を加えたm+1を出力させている。
Therefore, in the correction value table 132, the register stage 121 0
The same density value register stages and density values recorded in the 121 1
1 for the number of m recorded in ~ 121 n and its own concentration
The output is m + 1, which is the sum of the numbers.

以上のパイプライン演算処理による画素濃度ヒストグラ
ム算出処理が、サンプリングレジスタ160からクロックC
Kに同期して各クロック毎に順次入力される各画素濃度
値に対してそれぞれ実行される。
The pixel density histogram calculation processing by the above pipeline calculation processing is performed by the clock C from the sampling register 160.
This is executed for each pixel density value that is sequentially input at each clock in synchronization with K.

〔実施例II〕Example II

パイプライン演算手段の演算段が1段の場合は、実施例
Iの場合よりも回路の構成を簡単化することが出来る。
実施例IIは、パイプライン演算手段の演算手段が1段の
場合の実施例で、第3図は、実施例IIの構成をブロック
図で示したものである。
When the number of operation stages of the pipeline operation means is one, the circuit configuration can be simplified as compared with the case of the embodiment I.
Example II is an example in which the arithmetic means of the pipeline arithmetic means has one stage, and FIG. 3 is a block diagram showing the configuration of the embodiment II.

第3図において、入力レジスタ手段120補正値発生手段1
30及びパイプライン演算手段140を除いた他の構成、即
ちメモリ110、アドレス選択手段150、サンプリングレジ
スタ160及びメモリレジスタ170は、第2図と同じであ
る。
In FIG. 3, input register means 120 correction value generating means 1
The configuration other than 30 and the pipeline calculation means 140, that is, the memory 110, the address selection means 150, the sampling register 160, and the memory register 170 are the same as in FIG.

入力レジスタ手段120は、入力レジスタ段1210及び1段
のレジスタ段1211で構成される。
The input register means 120 comprises an input register stage 121 0 and one register stage 121 1 .

補正値発生手段130は、1個の比較器131で構成される。
比較器131は、入力レジスタ手段120内の入力レジスタ段
1210とレジスタ段1211との濃度値を比較し、一致してい
る場合は補正値“1"を発生し、一致していない場合は補
正値“0"を発生する。比較器131の出力がそのまま補正
値として使用出来るので、実施例Iの様に補正値テーブ
ルを設ける必要はない。パイプライン演算手段140は、
加算器142及び演算レジスタ143を備えた1段の演算段14
1で構成される。演算段141内の加算器142は、メモリレ
ジスタ170から入力された濃度ヒストグラム値Sに“1"
を加算すると共に、比較器131から入力された補正値の
加算を行い、その結果を演算レジスタ143に格納する。
The correction value generating means 130 is composed of one comparator 131.
The comparator 131 is an input register stage in the input register means 120.
The density values of 121 0 and the register stage 121 1 are compared, and if they match, a correction value “1” is generated, and if they do not match, a correction value “0” is generated. Since the output of the comparator 131 can be directly used as the correction value, it is not necessary to provide the correction value table as in the first embodiment. Pipeline operation means 140,
One operation stage 14 including an adder 142 and an operation register 143
Composed of 1. The adder 142 in the calculation stage 141 adds “1” to the density histogram value S input from the memory register 170.
And the correction value input from the comparator 131 are added, and the result is stored in the arithmetic register 143.

以上の構成により、入力レジスタ段1210の濃度値と演算
レジスタ143の濃度値が等しい場合には、加算器142にお
いて“S+2"の加算処理が行われて正しい濃度ヒストグ
ラが算出される。
With the above arrangement, when the input register density value stage 121 0 concentration values and calculation register 143 are equal, the correct density histograms are calculated "S + 2" addition processing is performed in the adder 142.

その他の動作は、実施例Iと同じであるので、その詳細
な動作説明は省略する。
The other operation is the same as that of the embodiment I, and thus the detailed description of the operation is omitted.

以上、画像の濃度ヒストグラムを算出する場合の各実施
例について説明したが、本発明は、これらの実施例に限
定されるものでなく、各種の入力の濃度ヒストグラムの
算出処理に用いることが出来るものである。
Although the respective embodiments in the case of calculating the density histogram of the image have been described above, the present invention is not limited to these embodiments and can be used in the calculation processing of the density histogram of various inputs. Is.

〔発明の効果〕〔The invention's effect〕

以上説明した様に、本発明によれば次の諸効果が得られ
る。
As described above, according to the present invention, the following various effects can be obtained.

(イ)算出された濃度ヒストグラムをメモリに格納する
場合の濃度ヒストグラム算出処理をパイプライン化する
ことが出来る。
(A) It is possible to pipeline the density histogram calculation processing when the calculated density histogram is stored in the memory.

(ロ)従って、小規模且つ安価な構成で高速処理が可能
な濃度ヒストグラム算出回路を実現することが出来る。
(B) Therefore, it is possible to realize a density histogram calculation circuit capable of high-speed processing with a small-scale and inexpensive structure.

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

第1図……本発明の基本構成の説明図、 第2図……本発明の実施例Iの構成の説明図、 第3図……本発明の実施例IIの構成の説明図、 第4図……本発明の実施例Iのパイプライン演算手段の
具体例。 第1図〜第4図において、 110……メモリ、120……入力レジスタ手段、130……補
正値発生手段、140……パイプライン演算手段、150……
アドレス選択手段、160……サンプリングレジスタ、170
……メモリレジスタ。
FIG. 1 ... Illustration of basic configuration of the present invention, FIG. 2 ... Illustration of configuration of Example I of the present invention, FIG. 3 ... Illustration of configuration of Example II of the present invention, Fourth Figure: A concrete example of the pipeline arithmetic means of the embodiment I of the present invention. 1 to 4, 110 ... Memory, 120 ... Input register means, 130 ... Correction value generating means, 140 ... Pipeline calculating means, 150 ...
Address selection means, 160 ... Sampling register, 170
...... Memory register.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】濃度ヒストグラムの算出結果が格納される
メモリと、 パイプライン演算手段の演算段数に対応した数のレジス
タ段を有し、濃度値を入力データとし順次シフトして格
納される入力レジスタ手段と、 入力レジスタ手段の各レジスタ段に格納されている濃度
値に基づいて濃度ヒストグラムを算出するための補正値
を発生する補正値発生手段と、 入力濃度値に基づいて読み出されたメモリの内容と前記
補正値を入力としてパイプライン処理により濃度ヒスト
グラムを算出するパイプライン演算手段と、 入力濃度値をメモリに対する読出しアドレスとして選択
し、入力レジスタ手段から出力された濃度値をパイプラ
イン演算手段の算出結果をメモリに格納する書込みアド
レスとして選択するアドレス選択手段と、 を備えたことを特徴とするパイプラインヒストグラム算
出回路。
1. An input register having a memory for storing a density histogram calculation result and a number of register stages corresponding to the number of arithmetic stages of a pipeline arithmetic means, wherein the concentration values are sequentially shifted and stored as input data. Means, a correction value generating means for generating a correction value for calculating a density histogram based on the density value stored in each register stage of the input register means, and a memory read out based on the input density value. Pipeline calculation means for calculating a density histogram by pipeline processing using the contents and the correction value as input, and an input density value selected as a read address for the memory, and the density value output from the input register means of the pipeline calculation means. Address selection means for selecting the calculation result as a write address to be stored in the memory, and Pipeline histogram calculation circuit.
JP61012160A 1986-01-24 1986-01-24 Pipeline histogram calculation circuit Expired - Lifetime JPH0799545B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61012160A JPH0799545B2 (en) 1986-01-24 1986-01-24 Pipeline histogram calculation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61012160A JPH0799545B2 (en) 1986-01-24 1986-01-24 Pipeline histogram calculation circuit

Publications (2)

Publication Number Publication Date
JPS62172473A JPS62172473A (en) 1987-07-29
JPH0799545B2 true JPH0799545B2 (en) 1995-10-25

Family

ID=11797698

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61012160A Expired - Lifetime JPH0799545B2 (en) 1986-01-24 1986-01-24 Pipeline histogram calculation circuit

Country Status (1)

Country Link
JP (1) JPH0799545B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3046093B2 (en) * 1991-05-10 2000-05-29 ファナック株式会社 Histogram adding device in image processing device
US20090105993A1 (en) * 2007-10-22 2009-04-23 Advantest Corporation Histogram generation with multiple increment read-modify-write cycles

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6270971A (en) * 1985-09-24 1987-04-01 Tech Res & Dev Inst Of Japan Def Agency Histogram calculator

Also Published As

Publication number Publication date
JPS62172473A (en) 1987-07-29

Similar Documents

Publication Publication Date Title
US4635292A (en) Image processor
JP2692384B2 (en) Address generation circuit
JPH03256485A (en) Motion vector detecting circuit
JPS6346611B2 (en)
JP3188467B2 (en) Minimum / maximum value search device
JP2522258B2 (en) Signal processor
JP2585649B2 (en) Division circuit
JPH0799545B2 (en) Pipeline histogram calculation circuit
CN119249049A (en) A method for performing FFT, a processor, an electronic device and a storage medium
JPS63285682A (en) Electronic image processing method and circuit
JP2574312B2 (en) High speed Hadamard converter
JPH04220826A (en) Transferred data storage system
JPS599945B2 (en) computing device
JPS616771A (en) Image signal processing device
JPH0125443B2 (en)
JP3549394B2 (en) Digital clock converter
JPS6220590B2 (en)
SU1451723A2 (en) Device for computing multiple convolution
JPH0311565B2 (en)
JPS62274333A (en) Digital signal processing circuit
JPH0728220B2 (en) Data conversion processing circuit
JPS61281671A (en) Image information storing method for image processing
JPS61224731A (en) Changing point detection system
JPS59128859A (en) Magnifying device with nonintegral ratio
JPS61157979A (en) System for grasping state of variable density image at high speed