JPH0727566B2 - Local area projection calculator - Google Patents

Local area projection calculator

Info

Publication number
JPH0727566B2
JPH0727566B2 JP58247395A JP24739583A JPH0727566B2 JP H0727566 B2 JPH0727566 B2 JP H0727566B2 JP 58247395 A JP58247395 A JP 58247395A JP 24739583 A JP24739583 A JP 24739583A JP H0727566 B2 JPH0727566 B2 JP H0727566B2
Authority
JP
Japan
Prior art keywords
projection
memory
data
address
area
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
JP58247395A
Other languages
Japanese (ja)
Other versions
JPS60136887A (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 JP58247395A priority Critical patent/JPH0727566B2/en
Publication of JPS60136887A publication Critical patent/JPS60136887A/en
Publication of JPH0727566B2 publication Critical patent/JPH0727566B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 発明の技術分野 本発明は、2次元平面データの任意指定した領域のx,y
方向投影を求める局所領域投影算出装置に関する。
TECHNICAL FIELD OF THE INVENTION The present invention relates to x, y of an arbitrarily designated area of two-dimensional plane data.
The present invention relates to a local area projection calculation device that obtains a directional projection.

従来技術と問題点 文字、図形認識画像処理などではx,y方向投影を求める
という手法がよく使われる。これは第2図で説明する
と、認識対象の文字、図形、一般化して言えば画像を走
査してビデオ信号を得、それをサンプリングして例えば
256×256個、各々は8ビットの各画素に分解し、それを
同容量のメモリつまりx,y方向のアドレスが256×256、
各アドレスの深さ(メモリセル数)が8のメモリMEMに
格納し、y=0,x=0,1,……255として各画素を読出して
その各画素の値の和X0を求め、次にy=1,x=0,1,……2
55として各画素を読出してその各画素の値の和X1を求
め、同様操作をy=255,x=0,1,……255まで行ってx方
向投影結果を求め、またx=0,y=0,1,……255として各
画素を読出してその各画素の値の和Y0を求め、同様処理
をx=255,y=0,1,……255まで行ってy方向投影結果を
求める、というものである。
Conventional techniques and problems In character and figure recognition image processing, the method of obtaining projections in the x and y directions is often used. This will be described with reference to FIG. 2. Characters, figures to be recognized, or, generally speaking, an image is scanned to obtain a video signal, which is sampled to
256 × 256, each divided into 8-bit pixels, the same capacity memory, that is, the address in the x and y directions is 256 × 256,
Each address is stored in the memory MEM having a depth (number of memory cells) of 8, and each pixel is read out with y = 0, x = 0,1, ... 255, and the sum X 0 of the values of each pixel is obtained. Then y = 1, x = 0,1, ... 2
Each pixel is read out as 55, the sum X 1 of the values of each pixel is obtained, and the same operation is performed up to y = 255, x = 0, 1, ... 255 to obtain the projection result in the x direction, and x = 0, Each pixel is read out with y = 0,1, ... 255, the sum Y 0 of the values of each pixel is obtained, and the same processing is performed up to x = 255, y = 0,1, ... 255, and the y-direction projection result is obtained. Is to ask.

各画素の値は当該画素が白なら0、黒なら255(8ビッ
トの最大値)、灰色はこれらの中間、として計算すると
図示のように黒っぽい画素の多い所は投影結果が大とな
り、この投影結果から当該画像は何かあるいはどこに存
在するかを推定することができる。例えば画像は数字の
1であったとすると概略的に言えば、y方向投影結果は
該数字がある位置で最大、その他では0であり、x方向
投影結果はX0〜X255がみな同じという結果になるので、
これより認識対象画像は数字の1であると推定できる。
If the value of each pixel is 0 if the pixel is white, 255 (8-bit maximum value) if it is black, and gray is the middle of these values, the projection result will be large where there are many dark pixels as shown in the figure. From the result, it is possible to infer what or where the image is. For example, if it is roughly said that the image is the number 1, the y-direction projection result is the maximum at a certain position, and the others are 0, and the x-direction projection result is that all X 0 to X 255 are the same. Because,
From this, it can be estimated that the recognition target image is the number 1.

しかし画像が細かな模様のものであると、x,y方向投影
結果は皆似たようなものとなり、投影結果から画像パタ
ーンを推定することは困難である。これには画像を細分
してその個々の領域についての投影結果を求め、それら
を綜合して判断するのが有効である。勿論、個々の小領
域についてのx,y投影結果を求めるとなると、処理は可
成り複雑になり、処理時間が長くなる。即ち従来方式で
は画像データつまり2次元平面状に配列されたデータの
投影を算出するにはソフトウェアによることが多く、こ
れは処理速度が遅い。この処理速度を解決するためのハ
ードウェア化したものもあるが、固定サイズの領域のヒ
ストグラムを算出するように設計されており、任意のサ
イズ及び位置、細分した個々の小領域の投影を算出でき
るものではない。また算出した投影結果はその後の画像
処理、パターン認識で利用するが、従来方式ではこれら
を行うプロセッサまで投影結果を転送する必要があり、
データ転送量が大である、という問題がある。
However, if the image has a fine pattern, the projection results in the x and y directions are similar, and it is difficult to estimate the image pattern from the projection result. For this purpose, it is effective to subdivide the image, obtain the projection result for each of the regions, and to judge them by combining them. Of course, if the x, y projection result for each small area is to be obtained, the processing becomes considerably complicated and the processing time becomes long. That is, in the conventional method, software is often used to calculate the projection of image data, that is, the projection of data arranged in a two-dimensional plane, and the processing speed is slow. Although there is a hardware implementation to solve this processing speed, it is designed to calculate the histogram of a fixed size area, and it is possible to calculate the projection of each small area of any size and position. Not a thing. The calculated projection result is used for subsequent image processing and pattern recognition. In the conventional method, it is necessary to transfer the projection result to the processor that performs these.
There is a problem that the amount of data transfer is large.

発明の目的 本発明はかゝる点を改善しようとするものであり、2次
元平面状データの投影を算出するのに、全体データのう
ちのM×Nの大きさの局所領域を切り出し、それをm,n
で細分した局所小領域の投影を唯一回の走査で高速に求
めることができ、更に、投影結果を利用する処理プロセ
ッサとのメモリ共有という手段をとって、処理プロセッ
サのメモリへの転送を省略しようとするものである。
An object of the present invention is to improve such a point, and in order to calculate the projection of two-dimensional plane data, a local region of size M × N is cut out from the whole data, and To m, n
The projection of a local small area subdivided by can be obtained at high speed with only one scan, and by sharing the memory with the processor that uses the projection result, let's omit the transfer to the memory of the processor. It is what

発明の構成 本発明は、画素単位の2次元状データの指定されたM×
Nの大きさの局所領域内の該領域を指定された値m、n
で分割した各局所小領域のx、y方向投影を算出する局
所領域投影算出装置において、 上記各局所小領域のx方向投影の累積データを格納する
x方向投影メモリ(M1)及びy方向投影の累積データを
格納するy方向投影メモリ(M2)と、 該2次元状データを格納するメモリをx方向及びy方向
に走査してデータを読出すx方向アドレス及びy方向ア
ドレスとクロックを受け、指定されたM×Nの大きさの
前記局所領域を走査している間、各局所小領域ごとのx
方向、y方向の各投影の累積データのx方向、y方向各
投影メモリ内での格納領域を示す上位アドレス及び該局
所小領域内での個々の累積データを格納するための上記
x方向、y方向各投影メモリ内の格納領域中のアドレス
を示す下位アドレスを生成するアドレス生成回路と、 上記2次元状データを格納するメモリをx、y方向アド
レスで走査して読出したデータと、上記アドレス生成回
路が生成した上位、下位アドレスで上記x方向投影メモ
リ(M1)をアクセスして読出した直前までのx方向投影
の累積データとを加算して、その加算結果によりx方向
投影メモリ(M1)内の当該アドレスのx方向投影の累積
データを更新する第1の加算器と、 上記2次元状データを格納するメモリをx、y方向各ア
ドレスで走査して読出したデータと、上記アドレス生成
回路が生成した上位,下位アドレスで上記y方向投影メ
モリ(M2)をアクセスして読出した直前までのy方向投
影の累積データとを加算して、その加算結果によりy方
向投影メモリ(M2)内の当該アドレスのy方向投影の累
積データを更新する第2の加算器、 とを備えることを特徴とするが、次に図面を参照しなが
らこれを説明する。
Configuration of the Invention According to the present invention, a specified M × of two-dimensional data in pixel units is designated.
Within a local region of size N, the region is designated with values m, n
In the local area projection calculation device for calculating the x and y direction projections of each local small area divided by, the x direction projection memory (M1) for storing the cumulative data of the x direction projections of each local small area and the y direction projection A y-direction projection memory (M2) for storing cumulative data and a memory for storing the two-dimensional data are scanned in the x-direction and the y-direction to read out data, and an x-direction address and a y-direction address and a clock are received and designated. X for each local subregion while scanning the local region of size M × N
Direction, the x direction of the cumulative data of each projection in the y direction, the upper direction address indicating the storage area in each projection memory in the y direction, and the x direction for storing the individual cumulative data in the local small area, y Direction: An address generation circuit that generates a lower address that indicates an address in a storage area in each projection memory; data that is read by scanning a memory that stores the two-dimensional data with x and y direction addresses; The above-mentioned x-direction projection memory (M1) is accessed by the upper and lower addresses generated by the circuit and the accumulated data of the x-direction projection up to immediately before reading is added, and the result of the addition is used to store in the x-direction projection memory (M1). A first adder for updating the cumulative data of the x-direction projection of the corresponding address, and data read by scanning the memory for storing the two-dimensional data at each address in the x and y directions, The above-mentioned y-direction projection memory (M2) is accessed by the upper and lower addresses generated by the address generation circuit and the accumulated data of the y-direction projection up to immediately before reading is added, and the result of the addition is added to the y-direction projection memory (M2). A second adder for updating the accumulated data of the y-direction projection of the address in the above), which will be described below with reference to the drawings.

発明の実施例 第1図に示すように、画像を走査して多値画素化した2
次元状データを格納する画像メモリMEMに対して本発明
では、任意に指定した点(x0,y0)を始端とし、x方向
はM、y方向はNの矩形領域A(局部領域という)を切
り出し、該領域をx方向ではmで、y方向ではnで分割
した各小領域Bのx,y方向投影を、画像メモリMEMの1回
の走査(読出し)で算出可能とする。こゝでM,N,m,nは
任意に指定でき、M,Nは例えばアドレスの個数で表わさ
れる。またm,nはM,Nの整数分の1とするのがよい。
Embodiment of the invention As shown in FIG. 1, an image is scanned to form multi-valued pixels.
According to the present invention, a rectangular area A having an arbitrarily designated point (x 0 , y 0 ) as a starting point and having M in the x direction and N in the y direction (referred to as a local area) is used for the image memory MEM that stores the dimensional data. Is cut out, and the projection of each small region B divided by m in the x direction and n in the y direction can be calculated by one scanning (reading) of the image memory MEM. Here, M, N, m, n can be arbitrarily specified, and M, N is represented by the number of addresses, for example. Further, it is preferable that m, n be an integer fraction of M, N.

第3図は、予め設定することのできる演算開始点(x0
y0)と、入力2次元状データのx方向とy方向のアドレ
ス(x,y)と、局所領域のサイズ(M,N)と、局所小領域
のサイズ(m′,n′)(ここでm′=M/m,n′=N/n)か
ら、投影メモリアドレスを生成する回路を示す。11〜16
はレジスタ、21〜26は比較器、31〜35はカウンタ、41〜
45はオアゲート、46はアンドゲート、51はドライバ、52
はアドレス変換テーブルである。レジスタ11〜16へは初
期設定用データバスDBからそれぞれ図示のようにx0,x0
+M,y0,y0+N,m′,及びn′が転送され、格納され
る。メモリアクセスはテレビスキャン型とし、メモリME
Mは256×256とすると、xアドレス用に8ビットカウン
タ、yアドレス用にも8ビットカウンタを用い、アドレ
ス生成用クロックはxアドレスカウンタに加え、yアド
レスカウンタにはxアドレスカウンタのオーバフローパ
ルスを加えると、これらのカウンタの計数値x,yは上記
メモリMEMをアクセスするx方向とy方向のアドレスと
なるが、これらのカウンタの計数値x,yは投影処理のた
め比較器21,22及び23,24へも加える。これらの比較器の
他方の入力には図示のようにレジスタ11〜14の格納デー
タを加え、比較器21にはxx0で、比較器22にはxx0
+Mで、また比較器23にはyy0で、比較器24にはy
y0+Nで出力を生じさせる。なお詳しくはこれらの出力
は、比較器の一致(=)、それより小(<)、それより
大(>)出力の論理和をとるオアゲート41〜44の出力で
ある。これらのオアゲートの出力の論理積をアンドゲー
ト46でとると、該アンドゲートの出力は(x0,y0)を始
端とするM×Nの領域内で発生し、この出力はデータ同
期クロックCLK(これはx,y生成に用いたクロックと同じ
もので、メモリMEMの読出しデータと同期している)を
計数するカウンタ35のイネーブル信号となる。アンドゲ
ート46の出力はまたカウンタ31〜34のイネーブル信号に
もなる。
FIG. 3 shows the calculation start point (x 0 ,
y 0 ), the addresses of the input two-dimensional data in the x and y directions (x, y), the size of the local area (M, N), and the size of the local small area (m ′, n ′) (here Then, a circuit for generating a projection memory address from m '= M / m, n' = N / n) is shown. 11 ~ 16
Are registers, 21-26 are comparators, 31-35 are counters, 41-
45 is an OR gate, 46 is an AND gate, 51 is a driver, 52
Is an address conversion table. To the registers 11 to 16, from the initial setting data bus DB, x 0 and x 0 , respectively, as shown in the figure.
+ M, y 0 , y 0 + N, m ', and n'are transferred and stored. Memory access is TV scan type, memory ME
If M is 256 × 256, an 8-bit counter for x address and an 8-bit counter for y address are used, the address generation clock is added to the x address counter, and the overflow pulse of the x address counter is added to the y address counter. In addition, the count values x and y of these counters become the addresses in the x direction and the y direction for accessing the memory MEM. However, the count values x and y of these counters are used for the projection processing and the comparators 21, 22 and Add to 23 and 24. The data stored in the registers 11 to 14 are added to the other inputs of these comparators as shown in the figure, and the comparator 21 is xx 0 and the comparator 22 is xx 0.
+ M, yy 0 for comparator 23, y for comparator 24
The output is produced at y 0 + N. More specifically, these outputs are the outputs of OR gates 41 to 44 that take the logical sum of the coincident (=), smaller (<), and larger (>) outputs of the comparators. When the logical product of the outputs of these OR gates is taken by the AND gate 46, the output of the AND gate is generated in the M × N area starting from (x 0 , y 0 ) and this output is generated by the data synchronization clock CLK. (This is the same as the clock used for x, y generation, and is synchronized with the read data of the memory MEM) and becomes the enable signal of the counter 35. The output of AND gate 46 also serves as an enable signal for counters 31-34.

カウンタ31はM×N領域内でデータ同期クロックCLKを
計数し、その計数値がm′になると比較器25は一致出力
を生じ、これはカウンタ31,35のクリヤ及びカウンタ33
の入力パルスとなる。同様にカウンタ32はM×N領域内
で比較器22のx>x0+M出力を計数し(これはM×N領
域内で何回x方向走査が行われたかを示す)、比較器26
はこの計数値がn′になると自己およびカウンタ35をク
リヤし、かつカウンタ34の入力パルスとなる。従ってこ
れらのカウンタ33,34の計数値は局所小領域Bの、該小
領域単位で表わしたアドレスを示している。例えば第1
図左上端の局所小領域(これは小領域単位でのアドレス
なら0,0と表現できる)に対してはカウンタ33,34の計数
値は0,0、右下端のそれに対しては(これはm′,n′で
表現できる)m′,n′であり、これらの間のそれはこれ
の中間値をとる。
The counter 31 counts the data synchronizing clock CLK within the M × N area, and when the count value reaches m ', the comparator 25 produces a coincident output, which is the clear of the counters 31 and 35 and the counter 33.
Input pulse. Similarly, the counter 32 counts the x> x 0 + M output of the comparator 22 within the M × N area (which indicates how many x-direction scans have been performed within the M × N area), and the comparator 26
When the count value reaches n ', it clears itself and the counter 35 and becomes the input pulse of the counter 34. Therefore, the count values of these counters 33 and 34 indicate the address of the local small area B expressed in the small area unit. For example, the first
For the local small area at the upper left corner of the figure (this can be expressed as 0,0 if it is an address in small area units), the count value of the counter 33,34 is 0,0, and for that at the lower right corner (this is m ', n') m ', n', and those in between take intermediate values.

アドレス変換テーブル52はこれらの計数値(0,0)〜
(m′,n′)を受けてx,y投影メモリ上の当該局所小領
域Bの投影結果の格納アドレスの上位アドレスを発生す
る。アドレス変換テーブル52は実質的にはROM(読出し
専用メモリ)であり、00〜m′n′をROMアクセスアド
レスとして受けて各局所小領域Bのx,y投影結果の格納
上位アドレスADDUを発生する。カウンタ35はデータ同期
クロックCLKをM×Nの領域内で計数し、且つ比較器25
の出力により計数値がm′になる毎にリセットされ、各
局所小領域のy投影の累積データを格納するメモリの下
位アドレスADDLyを発生する。同様に、カウンタ55は比
較器25の出力が1になる回数を計数し、比較器26の出力
により計数値がn′になる毎にリセットされ、各局所小
領域のx投影の累積データを格納するメモリの下位アド
レスADDLxを発生する。これらの上,下位アドレスAD
DU,ADDLx,ADDLyはドライバ51を経て投影メモリアドレ
スADDとして出力される。
The address conversion table 52 uses these count values (0,0) to
In response to (m ', n'), an upper address of the storage address of the projection result of the local small area B on the x, y projection memory is generated. The address conversion table 52 is substantially a ROM (read-only memory), receives 00 to m'n 'as ROM access addresses, and generates a storage upper address ADD U of the x, y projection result of each local small area B. To do. The counter 35 counts the data synchronization clock CLK within the M × N area, and the comparator 25
Is reset every time the count value reaches m ', and a lower address ADD Ly of the memory for storing the cumulative data of y projection of each local small area is generated. Similarly, the counter 55 counts the number of times that the output of the comparator 25 becomes 1, and is reset each time the count value becomes n'by the output of the comparator 26, and stores the accumulated data of x projection of each local small area. Generate the lower address ADD Lx of the memory. Upper and lower address AD of these
D U , ADD Lx , and ADD Ly are output as the projection memory address ADD via the driver 51.

第4図はx,y方向投影の各累積データを格納するメモリ
を示し、M1,M2が該メモリである。このメモリは投影結
果を利用するプロセッサの主記憶としても使用され、こ
のため入力データおよびアドレス等に切換回路が設けら
れる。63,64がその切換えを行なうセレクタであり、入
力データD、ライトイネーブル信号▲▼、アドレス
信号ADD、チップセレクト信号CSの切換えを行なう。こ
れらの符号D,▲▼,……の添字1は本回路つまりx,
y方向投影回路で生成されるそれ、添字2は投影結果を
利用するプロセッサ側で生成するそれを示す。
FIG. 4 shows a memory for storing cumulative data of x and y projections, and M1 and M2 are the memories. This memory is also used as the main memory of the processor that uses the projection result, and for this reason, a switching circuit is provided for input data and addresses. Reference numerals 63 and 64 denote selectors for switching the input data D, the write enable signal ▲ ▼, the address signal ADD, and the chip select signal CS. The subscript 1 of these symbols D, ▲ ▼, ... is this circuit, that is, x,
The one generated by the y-direction projection circuit, the subscript 2 indicates that generated by the processor side using the projection result.

投影は前述のように2次元状データの局所領域をx方向
又はy方向に走査して画素データを読出してその和をと
ることで行われるが、本回路ではその和を加算器61,62
で次の如くして行う。即ち、第5図(a)は前述のM×
Nの領域Aを示し、これはm,nで分割されて各小領域
B11,B12,……Bjiにされ、各小領域のx方向投影
X111,X112,……,X121,X122,……およびy方向投影
Y111,Y112,……,Y121,Y122,……が求められるが、
これらの全てを入力の2次元状データの局所領域に対す
る1回のメモリ走査で得るため、x方向投影については
第5図(b)に示す如く、領域Aのx方向走査において
最初の画素1から画素m′までは、x方向投影メモリM1
のアドレスA111のそれまでの累積データを読出してそれ
を該画素データと加え、その加算結果を同じアドレスA1
11へ書込むことによって累積データを更新するという操
作を繰り返し、次の画素m′+1から画素2m′まではx
方向投影メモリM1のアドレスA121の累積データを読出し
てそれを該画素データと加え、その加算結果を同じアド
レスA121へ書込むという操作を繰り返し、以下同様処理
を行なう。このようにすればメモリM1のアドレスA111,A
121,……には小領域B11,B12,……のX方向投影結果X
111,X121,……が書込まれて行く。次以降のx方向走
査に対しても同様であるが、データ格納アドレスはy方
向に+1しておく。
The projection is performed by scanning the local area of the two-dimensional data in the x direction or the y direction as described above and reading the pixel data and taking the sum thereof. In this circuit, the sum is added by the adders 61 and 62.
Then do as follows. That is, FIG. 5 (a) shows the above M ×
A region A of N is shown, which is divided by m, n
B 11 , B 12 , ……… B ji and projected in the x direction for each small area
X 111 , X 112 , ..., X 121 , X 122 , ... and y-direction projection
Y 111 , Y 112 , ..., Y 121 , Y 122 , ... are required,
Since all of these are obtained by one memory scan for the local region of the input two-dimensional data, the x-direction projection is performed from the first pixel 1 in the x-direction scan of the region A as shown in FIG. 5 (b). Up to pixel m ', x-direction projection memory M1
The accumulated data up to that point at address A111 is read and added to the pixel data, and the addition result is added to the same address A1.
The operation of updating the accumulated data by writing to 11 is repeated, and x is calculated from the next pixel m ′ + 1 to pixel 2m ′.
The operation of reading the cumulative data at the address A121 of the directional projection memory M1, adding it to the pixel data, and writing the addition result to the same address A121 is repeated, and the same processing is performed thereafter. By doing this, addresses A111, A of memory M1
121, ... In the X direction projection result X of the small areas B 11 , B 12 ,.
111 , X 121 , ... are written. The same applies to subsequent scanning in the x direction, but the data storage address is incremented by 1 in the y direction.

y方向投影については、y方向投影メモリM2のアドレス
1〜Mに領域Aの最初のx方向走査データRD1を書込
み、次のx方向走査データRD2はメモリM2のアドレス1
〜Mを読出してそれと該データRD2を画素対応で加え合
せて該メモリM2の同じアドレスへ書込み、同様処理を
n′回のx方向走査に対して行なうと、該メモリM2のア
ドレス1〜MにはブロックB1l〜B1iのy方向投影Y111
Y112,……が格納される。次のブロックB2l〜B2iに対し
ても同様処理を行なう。以下同様であり、こうしてM×
N領域の1回のテレビスキャンで全小領域のx,y方向投
影結果が求まる。
For the y-direction projection, the first x-direction scan data RD1 of the area A is written to the addresses 1 to M of the y-direction projection memory M2, and the next x-direction scan data RD2 is the address 1 of the memory M2.
.About.M, the data RD2 and the data RD2 are added in correspondence to each pixel and written to the same address of the memory M2, and the same process is performed for n'-times x-direction scanning, the addresses 1 to M of the memory M2 are read. Is the y-direction projection Y 111 of the blocks B 1l to B 1i ,
Y 112 , ... Is stored. The same processing is performed on the next blocks B 2l to B 2i . The same applies hereafter, and thus M ×
One television scan of the N area can obtain the projection results in the x and y directions of all the small areas.

第4図の加算器61,62、メモリM1,M2は、メモリMEMの読
出しデータD1及び第3図の回路の出力アドレスADD1を受
けて上述の如き加算を行ない、投影結果をメモリM1,M2
に格納する。第3図のアドレス変換テーブル52が出力す
る上位アドレスは小領域B11,B12,……毎のメモリM1,M2
の投影結果格納アドレスを示すもので、またカウンタ35
が出力するアドレスは小領域毎のx,y方向投影結果を受
けるためのメモリM1,M2のデータ読出し書込みアドレス
を示すものである。なお周知のようにライトイネーブル
▲▼はメモリの書込み/読出しモードを選択する信
号であり、チップセレクト信号CSはメモリM1,M2の選択
信号である。
The adders 61 and 62 and memories M1 and M2 of FIG. 4 receive the read data D1 of the memory MEM and the output address ADD1 of the circuit of FIG. 3 and perform the addition as described above, and the projection results are stored in the memories M1 and M2.
To store. The upper address output from the address conversion table 52 of FIG. 3 is the memory M1, M2 for each of the small areas B11, B12, ....
Shows the storage address of the projection result of
The address output by indicates the data read / write address of the memories M1 and M2 for receiving the projection results in the x and y directions for each small area. As is well known, the write enable ▲ ▼ is a signal for selecting a memory write / read mode, and the chip select signal CS is a select signal for the memories M1 and M2.

こうしてx,y方向投影結果がメモリM1,M2に格納された
ら、セレクト信号SLTでセレクタ63,64を各信号の添字1
側から2側へ切換えると、投影結果利用プロセッサがメ
モリM1,M2をアクセスすることができ、読出しデータは
ドライバ53,54を通して該プロセッサのデータバスDB2へ
送られる。こうしてメモリM1,M2は投影結果を求めるプ
ロセッサの主記憶とも、また投影結果を利用するプロセ
ッサの主記憶ともなるので、投影結果を該結果利用プロ
セッサへ転送する必要はなくなり、大容量データ転送を
しなくて済む。
In this way, when the projection results in the x and y directions are stored in the memories M1 and M2, the selectors 63 and 64 are set to the subscript 1 of each signal by the select signal SLT.
Switching from side 2 to side 2, the projection result utilization processor can access the memories M1 and M2, and the read data is sent to the data bus DB2 of the processor through the drivers 53 and 54. In this way, the memories M1 and M2 serve as the main memory of the processor that obtains the projection result and the main memory of the processor that uses the projection result.Therefore, it is not necessary to transfer the projection result to the processor that uses the result, and large-capacity data transfer is performed. You don't have to.

本発明を実現する際には、以下の点に留意して投影メモ
リの容量を決定する。
When implementing the present invention, the capacity of the projection memory is determined while paying attention to the following points.

入力画像のサイズを512(x方向幅)×512(y方向
幅)、1画素あたりのビット幅を8ビットと仮定した
際、分割数がm=n=1の時が、必要メモリのデータ幅
のワーストケースである。x方向に一行分各画素を加算
すると、256(最大画素値)×512(x方向幅)=131072
(17ビット幅)が、必要となるx方向投影メモリのデー
タ幅である。そのx方向投影メモリの内容をアクセスす
るのに必要なアドレス幅は、分割数nを最大何個まで許
容するか、で決定する。例えば、設定時点で、m=n=
512個は無意味なのでm=n=256を最大分割数とする
と、入力画像をy方向に2画素ずつ256×256=65486分
割することに相当し、合計16ビットあればよい。
Assuming that the size of the input image is 512 (width in the x direction) x 512 (width in the y direction) and the bit width per pixel is 8 bits, when the number of divisions is m = n = 1, the data width of the required memory Is the worst case of. If each pixel for one line is added in the x direction, 256 (maximum pixel value) x 512 (width in x direction) = 131072
(17-bit width) is the required data width of the x-direction projection memory. The address width required to access the contents of the x-direction projection memory is determined by the maximum number of divisions n. For example, at the time of setting, m = n =
Since 512 pieces are meaningless, setting m = n = 256 as the maximum number of divisions corresponds to dividing the input image into 256 × 256 = 65486 by 2 pixels in the y direction, and a total of 16 bits is enough.

また、y方向に1行分画素を加算する場合も同様であ
り、y方向投影メモリのデータ幅17ビットで、アドレス
幅は16ビットあればよい。以上を第6図に示す。
The same applies to the case of adding pixels for one row in the y direction, and the data width of the y direction projection memory may be 17 bits and the address width may be 16 bits. The above is shown in FIG.

次に分割数をm=n=2の場合を考えてみる。この場
合、入力画像は、第7図のように、256×256の画像が4
つあるものと考えることができる。すると、分割領域内
(256×256)においては、x方向に1行分各画素を加算
すると、256(最大画素値)×256(x方向幅)=65536
(16ビット幅)が、必要となるx方向メモリのデータ幅
である。この16ビットは、上述したように設計時に準備
しておいた17ビット幅あることから、充分であると言え
る。x方向投影メモリの必要なアドレス幅は、分割した
領域において、256(y方向幅)が4組存在するので、2
56×4=1024(10ビット幅)が、必要とされる。これ
も、設計時に用意したアドレス幅16ビットに充分収ま
る。y方向投影メモリも同様のことが言える。
Next, consider the case where the number of divisions is m = n = 2. In this case, the input image is a 256 × 256 image, as shown in FIG.
Can be thought of as one. Then, in the divided area (256 × 256), if each pixel for one row is added in the x direction, 256 (maximum pixel value) × 256 (width in x direction) = 65536
(16-bit width) is the required data width of the x-direction memory. It can be said that these 16 bits are sufficient because they have a 17-bit width prepared at the time of design as described above. The required address width of the x-direction projection memory is 2 because there are 4 sets of 256 (width in the y-direction) in the divided area.
56 × 4 = 1024 (10 bit width) is required. This is also well within the 16-bit address width prepared at the time of design. The same applies to the y-direction projection memory.

ここで、具体的に投影メモリM1,M2のアドレス割付けを
例示する。本発明で用いる投影メモリは、画像を入力し
て演算結果を格納する場合と、その結果をホストCPUか
ら読み出す場合があり、その切り換え制御はCPUが行
い、第4図のセレクタ63と64によって実現される。その
ため、投影メモリを使用して演算する場合のデータ格納
場所は、mとnによって明確に分離/配列されているこ
とが好ましいわけである。
Here, the address allocation of the projection memories M1 and M2 will be specifically illustrated. The projection memory used in the present invention may be used for inputting an image and storing the calculation result, or for reading the result from the host CPU. The switching control is performed by the CPU and realized by the selectors 63 and 64 in FIG. To be done. Therefore, it is preferable that the data storage locations in the case of calculation using the projection memory are clearly separated / arranged by m and n.

第7図から明らかなように、本発明のx方向投影メモリ
のアドレス割付構成は、第3図の回路によって生成さ
れ、特にカウンタ55,35,51によって出力され、x方向投
影メモリの格納場所を指定する。これはCPUにとって、
mとnは既知であるため、CPUはこのメモリを上から順
にアクセスすることにより、入力画像のどの領域におけ
るx投影結果であるか把握することができる。y方向投
影メモリのアドレス割付構成も同様である。
As is apparent from FIG. 7, the address allocation structure of the x-direction projection memory of the present invention is generated by the circuit of FIG. 3, and is output by the counters 55, 35 and 51, and the storage location of the x-direction projection memory can be changed. specify. This is for the CPU
Since m and n are already known, the CPU can grasp which region of the input image the x projection result is by accessing this memory in order from the top. The same applies to the address allocation configuration of the y-direction projection memory.

発明の効果 以上発明したように本発明によれば、1回の走査で小領
域毎のx,y方向投影が全て求まり、大容量データ転送が
不要になる等の利点が得られる。集積回路では製造番号
などをマークするが、それが予定通り正確に刻印されて
いるか、にじみ、ぼけ、途切れなどがないかの判定など
に本装置は有効である。
EFFECTS OF THE INVENTION As described above, according to the present invention, it is possible to obtain all the projections in the x and y directions for each small area by one scan, and it is possible to obtain an advantage that large-capacity data transfer becomes unnecessary. The serial number is marked on the integrated circuit, but this device is effective for determining whether it is correctly engraved as planned, or whether there is bleeding, blurring, or breaks.

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

第1図は局所領域及び局所小領域の説明図、第2図はx,
y方向投影の説明図、第3図および第4図は本発明の実
施例の説明図、第5図は動作説明図、第6図は投影メモ
リのデータ幅とアドレス幅の説明図、第7図は投影メモ
リの構成の具体例の説明図である。 図面で、MEMは2次元状データを格納するメモリ、D1は
その読出しデータ、CLKは読出しクロック、Aは局所領
域、Bは局所小領域、M1,M2はx,y方向投影メモリ、AD
DU,ADDLは上,下位アドレス信号、61,62は加算器、6
3、64はセレクタである。
Fig. 1 is an explanatory diagram of local areas and local small areas, and Fig. 2 is x,
FIG. 3 is an explanatory view of the y-direction projection, FIGS. 3 and 4 are explanatory views of an embodiment of the present invention, FIG. 5 is an operation explanatory view, FIG. 6 is an explanatory view of the data width and address width of the projection memory, and FIG. The figure is an illustration of a specific example of the configuration of the projection memory. In the drawing, MEM is a memory for storing two-dimensional data, D1 is its read data, CLK is a read clock, A is a local area, B is a local small area, M1 and M2 are projection memories in x and y directions, and AD.
D U and ADD L are upper and lower address signals, 61 and 62 are adders, 6
3 and 64 are selectors.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 後藤 敏行 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 鳥生 隆 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (56)参考文献 特開 昭55−117944(JP,A) 特開 昭57−196375(JP,A) 特開 昭58−56429(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Toshiyuki Goto 1015 Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa, within Fujitsu Limited (72) Inventor Takashi Kamiodanaka, Nakahara-ku, Kawasaki, Kanagawa 1015, within Fujitsu Limited ( 56) References JP-A-55-117944 (JP, A) JP-A-57-196375 (JP, A) JP-A-58-56429 (JP, A)

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】画素単位の2次元状データの指定されたM
×Nの大きさの局所領域内の該領域を指定された値m、
nで分割した各局所小領域のx、y方向投影を算出する
局所領域投影算出装置において、 上記各局所小領域のx方向投影の累積データを格納する
x方向投影メモリ(M1)及びy方向投影の累積データを
格納するy方向投影メモリ(M2)と、 該2次元状データを格納するメモリをx方向及びy方向
に走査してデータを読出すx方向アドレス及びy方向ア
ドレスとクロックを受け、指定されたM×Nの大きさの
前記局所領域を走査している間、各局所小領域ごとのx
方向、y方向の各投影の累積データのx方向、y方向各
投影メモリ内での格納領域を示す上位アドレス及び該局
所小領域内での個々の累積データを格納するための上記
x方向、y方向各投影メモリ内の格納領域中のアドレス
を示す下位アドレスを生成するアドレス生成回路と、 上記2次元状データを格納するメモリをx、y方向アド
レスで走査して読出したデータと、上記アドレス生成回
路が生成した上位、下位アドレスで上記x方向投影メモ
リ(M1)をアクセスして読出した直前までのx方向投影
の累積データとを加算して、その加算結果によりx方向
投影メモリ(M1)内の当該アドレスのx方向投影の累積
データを更新する第1の加算器と、 上記2次元状データを格納するメモリをx、y方向各ア
ドレスで走査して読出したデータと、上記アドレス生成
回路が生成した上位,下位アドレスで上記y方向投影メ
モリ(M2)をアクセスして読出した直前までのy方向投
影の累積データとを加算して、その加算結果によりy方
向投影メモリ(M2)内の当該アドレスのy方向投影の累
積データを更新する第2の加算器、 とを備えることを特徴とする局所領域投影算出装置。
1. A specified M of two-dimensional data in pixel units
A specified value m of the area within a local area of size × N,
In a local area projection calculation device for calculating x and y direction projections of each local small area divided by n, an x direction projection memory (M1) for storing cumulative data of x direction projections of each local small area and a y direction projection. A y-direction projection memory (M2) for storing the accumulated data of x, and a memory for storing the two-dimensional data are scanned in the x-direction and the y-direction to read data and receive an x-direction address and a y-direction address and a clock, While scanning the local area of the specified M × N size, x for each local small area
Direction, the x direction of the cumulative data of each projection in the y direction, the upper direction address indicating the storage area in each projection memory in the y direction, and the x direction for storing the individual cumulative data in the local small area, y Direction: An address generation circuit that generates a lower address that indicates an address in a storage area in each projection memory; data that is read by scanning a memory that stores the two-dimensional data with x and y direction addresses; The above-mentioned x-direction projection memory (M1) is accessed by the upper and lower addresses generated by the circuit and the accumulated data of the x-direction projection up to immediately before reading is added, and the result of the addition is used to store in the x-direction projection memory (M1). A first adder for updating the cumulative data of the x-direction projection of the corresponding address, and data read by scanning the memory for storing the two-dimensional data at each address in the x and y directions, The above-mentioned y-direction projection memory (M2) is accessed by the upper and lower addresses generated by the address generation circuit and the accumulated data of the y-direction projection up to immediately before reading is added, and the result of the addition is added to the y-direction projection memory (M2). A second adder for updating the accumulated data of the y-direction projection of the address in the above), and the local area projection calculation apparatus.
【請求項2】x、y方向投影メモリは、データ及びアド
レスの切換回路を備えて、x、y方向投影結果を利用す
るプロセッサによってもアクセス可能とされてなること
を特徴とする特許請求の範囲第1項記載の局所領域投影
算出装置。
2. The x, y direction projection memory is provided with a data and address switching circuit, and can be accessed by a processor using the x, y direction projection result. The local area projection calculation device according to item 1.
JP58247395A 1983-12-26 1983-12-26 Local area projection calculator Expired - Lifetime JPH0727566B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58247395A JPH0727566B2 (en) 1983-12-26 1983-12-26 Local area projection calculator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58247395A JPH0727566B2 (en) 1983-12-26 1983-12-26 Local area projection calculator

Publications (2)

Publication Number Publication Date
JPS60136887A JPS60136887A (en) 1985-07-20
JPH0727566B2 true JPH0727566B2 (en) 1995-03-29

Family

ID=17162787

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58247395A Expired - Lifetime JPH0727566B2 (en) 1983-12-26 1983-12-26 Local area projection calculator

Country Status (1)

Country Link
JP (1) JPH0727566B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62196771A (en) * 1986-02-24 1987-08-31 Hitachi Ltd Processing device for divided image
US4792856A (en) * 1987-04-14 1988-12-20 Rca Licensing Corporation Sampled data memory system as for a television picture magnification system

Also Published As

Publication number Publication date
JPS60136887A (en) 1985-07-20

Similar Documents

Publication Publication Date Title
CN108537729B (en) Image stepless zooming method, computer device and computer readable storage medium
CN86100088A (en) Image processing system
US4528692A (en) Character segmenting apparatus for optical character recognition
US5621866A (en) Image processing apparatus having improved frame buffer with Z buffer and SAM port
US20200327638A1 (en) Connected component detection method, circuit, device and computer-readable storage medium
CN108876701B (en) Run-length-based single-scanning connected domain marking method and hardware structure thereof
JPH0727566B2 (en) Local area projection calculator
CN108629734B (en) Image geometric transformation method and device and terminal
CN110087088B (en) Data storage method based on motion estimation, terminal equipment and storage medium
Ding et al. Multi-scale FAST feature extraction heterogeneous design based on FPGA
Shuang et al. DSP-based parallel processing model of image rotation
Zhang et al. A real-time image stitching method based on memory space conversion
JPS58136093A (en) Display controller
JP2903214B2 (en) Area designation device
EP0365878A2 (en) Image processing method
CN114866758A (en) Parallax image filling method and image processing device
JPH03292575A (en) Address generating device
JP4735008B2 (en) Data storage device, data storage control device, data storage control method, and data storage control program
JPH0374071B2 (en)
JPS6156555B2 (en)
JPH06251134A (en) Image data accessing device
JPH07118006B2 (en) Image processing device
JPH06251133A (en) Image data access device
JPH04329482A (en) Image rotation processing method and processing device for relevant method
JPS6137666B2 (en)