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
JP3320767B2 - Data processing apparatus and control method thereof - Google Patents
[go: Go Back, main page]

JP3320767B2 - Data processing apparatus and control method thereof - Google Patents

Data processing apparatus and control method thereof

Info

Publication number
JP3320767B2
JP3320767B2 JP11378892A JP11378892A JP3320767B2 JP 3320767 B2 JP3320767 B2 JP 3320767B2 JP 11378892 A JP11378892 A JP 11378892A JP 11378892 A JP11378892 A JP 11378892A JP 3320767 B2 JP3320767 B2 JP 3320767B2
Authority
JP
Japan
Prior art keywords
data
operated
processing
value
maximum value
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 - Fee Related
Application number
JP11378892A
Other languages
Japanese (ja)
Other versions
JPH05313855A (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 JP11378892A priority Critical patent/JP3320767B2/en
Publication of JPH05313855A publication Critical patent/JPH05313855A/en
Application granted granted Critical
Publication of JP3320767B2 publication Critical patent/JP3320767B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】〔目 次〕 産業上の利用分野 従来の技術(図13) 発明が解決しようとする課題 課題を解決するための手段(図1,2) 作用 実施例 (1)第1の実施例の説明(図3〜8) (2)第2の実施例の説明(図9〜12) 発明の効果[Contents] Industrial application field Conventional technology (FIG. 13) Problems to be Solved by the Invention Means for Solving the Problems (FIGS. 1 and 2) Action Embodiment (1) First Embodiment (FIGS. 3 to 8) (2) Description of the second embodiment (FIGS. 9 to 12)

【0002】[0002]

【産業上の利用分野】本発明は、データ処理装置及びそ
の制御方法に関するものであり、更に詳しく言えば、画
像処理方式の1つである奇数個データの中の中央値を演
算する装置及びその演算方法の改善に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus and a control method therefor, and more particularly, to an apparatus for calculating a median value in an odd number of data, which is one of image processing methods, and an apparatus therefor. The present invention relates to an improvement in a calculation method.

【0003】近年、医学・工学を始めとする産業機器の
高性能化が進み、コンピュータの導入は不可欠なもので
ある。かかる分野の画像処理において、単に画像情報の
ディスプレイ表示機能に止まらずデータ解析のニーズが
高まり、同時に取扱いデータ量が膨大なものとなる傾向
にある。
In recent years, the performance of industrial equipment such as medicine and engineering has been improved, and the introduction of computers is indispensable. In image processing in such a field, the need for data analysis is not limited to the function of simply displaying image information on the display, and at the same time, the amount of data handled tends to be enormous.

【0004】これによれば、画像処理方式の高速化,高
効率化を図るため、中央値演算装置において、奇数個の
被演算データの最大値から順次,その最小値に至るデー
タを抽出し、その中央値を求めるバブルソート法やクイ
ックソート法が採用されている。
According to this, in order to increase the speed and efficiency of the image processing system, the median arithmetic unit sequentially extracts data from the maximum value of the odd number of data to be processed to the minimum value thereof, A bubble sort method or a quick sort method for finding the median is employed.

【0005】しかし、画像処理や音声処理分野におい
て、ユーザの使用態様により取扱いデータ量が増加をす
ると、かかる方法ではデータ比較回数が多くなったり、
それを構成するハードウエアが増加をする。
However, in the field of image processing and audio processing, if the amount of data handled increases according to the manner of use by the user, the number of data comparisons increases with this method,
The hardware that makes it up increases.

【0006】そこで、被演算データの中央値の演算に係
わりバブルソート法やクイックソート法にのみ依存する
ことなく、その中央値の演算方法を工夫して、データ比
較回数の低減化及びデータ処理の高速化を図ることがで
きる装置及び方法が望まれている。
Therefore, the method of calculating the median value is devised without depending on only the bubble sort method or the quick sort method in relation to the calculation of the median value of the data to be operated. There is a need for an apparatus and method that can achieve high speed.

【0007】[0007]

【従来の技術】図13(a),(b)は、従来例に係るデ
ータ処理装置の説明図であり、図13(a)は、従来例に
係る第1の中央値演算装置の構成図であり、図13(b)
は、その第2の中央値演算装置の構成図をそれぞれ示し
ている。
2. Description of the Related Art FIGS. 13A and 13B are explanatory diagrams of a data processing device according to a conventional example, and FIG. 13A is a configuration diagram of a first median value calculating device according to a conventional example. And FIG. 13 (b)
Shows configuration diagrams of the second median value calculation device.

【0008】例えば、雑音除去等の信号処理方式の1つ
である奇数個データの中の中央値を演算する第1の中央
値演算装置(以下単に第1の装置という)は、図13
(a)において、9つの被演算データを一時記憶するデ
ータアレイ1と、9つの被演算データの中ら中央値を抽
出する比較・交換器2と、その中央値を出力する出力部
3から成る。
For example, a first median value arithmetic device (hereinafter, simply referred to as a first device) which calculates a median value in an odd number of data, which is one of signal processing methods such as noise elimination, is shown in FIG.
In FIG. 1A, a data array 1 for temporarily storing nine data to be processed, a comparator / exchanger 2 for extracting a median from among the nine data to be processed, and an output unit 3 for outputting the median are provided. .

【0009】なお、比較・交換器2とデータアレイ1と
が9本のデータ転送線により固定配線され、出力部3が
データアレイ1の中央部に接続されている。当該第1の
装置の機能は、9つの被演算データがデータアレイ1の
各メモリ領域に一時記憶されると、その9つの被演算デ
ータの最大値からその最小値に至るデータが比較・交換
器2により並び換えられ、その中央に位置する値が,中
央値として比較・交換器2により抽出され、その中央値
が出力部3から出力される。
The comparison / exchanger 2 and the data array 1 are fixedly wired by nine data transfer lines, and the output unit 3 is connected to the center of the data array 1. The function of the first device is that, when nine data to be operated are temporarily stored in each memory area of the data array 1, data from the maximum value to the minimum value of the nine data to be operated is compared / exchanged. 2, the value located at the center thereof is extracted as the median by the comparison / exchanger 2, and the median is output from the output unit 3.

【0010】また、第1の装置のデータ並び換え時の機
能を補充した第2の中央値演算装置(以下単に第2の装
置という)は、図13(b)において、第1の装置に、最
大値からその中央値に至るデータを一時記憶するサブア
レイ4が設けられて成る。
A second median arithmetic unit (hereinafter simply referred to as “second device”) supplemented with the data rearranging function of the first device is shown in FIG. A sub-array 4 for temporarily storing data from the maximum value to the median value is provided.

【0011】なお、サブアレイ4と比較・交換器2とは
セレクタ5を介して接続され、9つの被演算データの最
大値からその最小値に至るデータを順次並び返える際
に、その最大値を抽出する毎に該セレクタ5が切換えら
れる。
The subarray 4 and the comparing / exchanging unit 2 are connected via a selector 5, and when the data from the maximum value of the nine data to be processed to the minimum value can be sequentially rearranged, the maximum value is determined. Every time extraction is performed, the selector 5 is switched.

【0012】当該第2の装置の機能は、9つの被演算デ
ータがデータアレイ1の各メモリ領域に一時記憶される
と、その9つの被演算データの最大値からその最小値に
至るデータが比較・交換器2により並び換えられる。こ
の際に、被演算データの最大値が抽出される毎に、セレ
クタ5が切換えられ、その最大値からその中央値に至る
データがサブアレイ4に一時記憶される。
The function of the second device is that when nine data to be processed are temporarily stored in each memory area of the data array 1, the data from the maximum value to the minimum value of the nine data to be processed is compared. -Rearranged by exchanger 2. At this time, every time the maximum value of the data to be operated is extracted, the selector 5 is switched, and data from the maximum value to the median value is temporarily stored in the sub-array 4.

【0013】これにより、その最後部に記憶された値
が,中央値としてサブアレイ4から読み出され、その中
央値が出力部3から出力される。
As a result, the value stored at the end is read from the sub-array 4 as the median value, and the median value is output from the output unit 3.

【0014】[0014]

【発明が解決しようとする課題】ところで、従来例の第
1,第2の装置によれば、比較・交換器2とデータアレ
イ1とが奇数本のデータ転送線により固定配線され、そ
の出力部3がデータアレイ1の中央部に接続されてい
る。また、奇数個の被演算データの最大値から順次,そ
の最小値に至るデータを抽出し、その中央値を求めるバ
ブルソート法やクイックソート法が採用されている。
By the way, according to the first and second devices of the prior art, the comparison / exchanger 2 and the data array 1 are fixedly wired by an odd number of data transfer lines, and the output section thereof is provided. 3 is connected to the center of the data array 1. Further, a bubble sort method or a quick sort method in which data from the maximum value of the odd number of data to be operated to the minimum value thereof is sequentially extracted and the median value thereof is obtained is employed.

【0015】このため、画像処理や音声処理分野におい
て、ユーザの使用態様により取扱いデータ量が増加をす
ると、被演算データの中ら順次,最大値を抽出する比較
・交換器2におけるデータ比較回数が多くなったり、そ
れを構成するハードウエアが増加をする。
For this reason, in the field of image processing and audio processing, when the amount of handled data increases due to the usage of the user, the number of data comparisons in the comparator / exchanger 2 for sequentially extracting the maximum value from the data to be processed is increased. And the hardware that makes it up.

【0016】例えば、バブルソート法によれば、被演算
データの個数をn〔奇数〕とし、比較回数をkとする
と、k=3/8・(n2 −1)の関係式に従い、その比
較時間や比較量が増加をする。
For example, according to the bubble sort method, assuming that the number of data to be operated is n [odd] and the number of comparisons is k, the comparison is performed according to a relational expression of k = 3/8 · (n 2 −1). Time and comparison amount increase.

【0017】これにより、中央値演算に係る処理時間の
遅れから画像処理分野等において、高速データ処理の妨
げとなるという問題がある。本発明は、かかる従来例の
問題点に鑑み創作されたものであり、被演算データの中
央値の演算に係わりバブルソート法やクイックソート法
にのみ依存することなく、その中央値の演算方法を工夫
(シフト分割法)して、データ比較回数の低減化及びデ
ータ処理の高速化を図ることが可能となるデータ処理装
置及びその制御方法の提供を目的とする。
As a result, there is a problem that high-speed data processing is hindered in the field of image processing or the like due to a delay in processing time for the median value calculation. The present invention has been made in view of the problems of the conventional example, and relates to the calculation of the median value of the data to be operated, without relying only on the bubble sort method or the quick sort method. It is an object of the present invention to provide a data processing device capable of reducing the number of data comparisons and increasing the speed of data processing by devising (shift division method) and a control method thereof.

【0018】[0018]

【課題を解決するための手段】図1は、本発明に係るデ
ータ処理装置の原理図であり、図2は、本発明に係るデ
ータ処理方法の原理図をそれぞれ示している。
FIG. 1 is a principle diagram of a data processing apparatus according to the present invention, and FIG. 2 is a principle diagram of a data processing method according to the present invention.

【0019】本発明の第1のデータ処理装置は図1に示
すように、奇数〔n=2m+1,m≧1〕個の被演算デ
ータDnを順次記憶する記憶手段11と、前記被演算デ
ータDnの中から中央値を含む被演算データDnを抽出
するデータ抽出手段12と、前記抽出された被演算デー
タDnの中央値を出力する中央値出力手段13とを具備
し、前記データ抽出手段12が記憶手段11の読出し領
域を順次変更することを特徴とする。
As shown in FIG. 1, a first data processing apparatus according to the present invention comprises a storage means 11 for sequentially storing odd [n = 2m + 1, m ≧ 1] pieces of operation data Dn; And a median output means 13 for outputting a median value of the extracted data Dn. The data extraction means 12 includes: The reading area of the storage means 11 is sequentially changed.

【0020】なお、本発明の第1のデータ処理装置にお
いて、前記データ抽出手段12が〔n+1〕/2個の比
較交換手段Ciから成り、前記比較交換手段Ciが最前
部又は最後部からm+1個目までの被演算データDnを
比較して、該被演算データDnの中の最大値を抽出し、
前記被演算データDnの最大値と最前部又は最後部の被
演算データDnとを交換することを特徴とする。
In the first data processing apparatus according to the present invention, the data extracting means 12 comprises [n + 1] / 2 comparison / exchange means Ci, and the comparison / exchange means Ci comprises m + 1 pieces from the forefront or last part. Comparing the operated data Dn up to the first and extracting the maximum value among the operated data Dn;
The maximum value of the data to be operated Dn is exchanged with the foremost or last data to be operated Dn.

【0021】また、本発明の第2のデータ処理装置は、
前記第1のデータ処理装置において、前記比較交換手段
Ciが最前部又は最後部からm+1個目までの被演算デ
ータDnを比較して、該被演算データDnの中の最小値
を抽出し、前記被演算データDnの最小値と最前部又は
最後部の被演算データDnとを交換するから成ることを
特徴とする。
Further, the second data processing device of the present invention comprises:
In the first data processing device, the comparison and exchange means Ci compares the (m + 1) th data to be operated Dn from the foremost part or the last part and extracts the minimum value among the data to be operated Dn, The method is characterized in that the minimum value of the data to be operated Dn is exchanged with the foremost or last data to be operated Dn.

【0022】また、本発明の第1,第2のデータ処理装
置において、前記抽出された被演算データDnを一次記
憶する補助記憶手段14が設けられることを特徴とす
る。さらに、本発明の第1,第2のデータ処理装置にお
いて、前記記憶手段11,データ抽出手段12,中央値
出力手段13及び補助記憶手段14の入出力を制御する
制御手段15が設けられることを特徴とする。
Further, in the first and second data processing devices of the present invention, an auxiliary storage means 14 for temporarily storing the extracted data to be operated Dn is provided. Further, in the first and second data processing devices of the present invention, a control means 15 for controlling the input / output of the storage means 11, the data extraction means 12, the median output means 13 and the auxiliary storage means 14 is provided. Features.

【0023】また、本発明の第1のデータ処理方法は、
図2の処理フローチャートに示すように、まず、ステッ
プP1で奇数〔n=2m+1,m≧1〕個の被演算デー
タDnの配列処理をし、次に、ステップP2で前記配列
処理された最前部又は最後部からm+1個目までの被演
算データDnの中から最大値の抽出処理をし、さらに、
ステップP3で前記被演算データDnの最大値と最前部
又は最後部の被演算データDnとの交換処理をし、以
後、ステップP4で前記被演算データDnの読出し領域
を順次変更して、該被演算データDnの最大値の抽出処
理をし、次いで、ステップP5で前記被演算データDn
の最大値と順次変更された読出し領域の最前部又は最後
部の被演算データDnとの交換処理をし、その後、ステ
ップP6で前記奇数個の被演算データDnに係わり再配
列された最前部又は最後部からm+1個の被演算データ
Dnの中の最小値の出力処理をすることを特徴とする。
Further, the first data processing method of the present invention comprises:
As shown in the processing flow chart of FIG. 2, first, at step P1, an odd number [n = 2m + 1, m ≧ 1] array processing of the data Dn is performed. Alternatively, the maximum value is extracted from the m + 1-th data Dn to be processed from the last part, and
In step P3, the maximum value of the data to be operated Dn is exchanged with the foremost or last data to be operated Dn. Thereafter, in step P4, the read area of the data to be operated Dn is sequentially changed, and The maximum value of the operation data Dn is extracted, and then, in step P5, the operation data Dn
Is exchanged with the foremost or last processed data Dn of the read area, which is sequentially changed, and thereafter, in step P6, the rearranged forefront or rearranged data related to the odd number of processed data Dn The output processing of the minimum value among the (m + 1) data to be operated Dn from the rear end is performed.

【0024】なお、本発明の第2のデータ処理方法は、
図2の処理フローチャートに示すように、ステップP1
の被演算データDnの配列処理の後に、ステップP2Aで
該配列処理された最前部又は最後部からm+1個目まで
の被演算データDnに係わり最小値の抽出処理をし、そ
の後、ステップP6Aで前記抽出処理に基づいて奇数個の
被演算データDnに係わり再配列された最前部又は最後
部からm+1個の被演算データDnの中の最大値の出力
処理することを特徴とし、上記目的を達成する。
Note that the second data processing method of the present invention
As shown in the processing flowchart of FIG.
After the array processing of the operated data Dn, the minimum value is extracted for the (m + 1) -th operated data Dn from the foremost part or the rearmost part that has been arrayed in step P2A. The above object is achieved by performing a process of outputting the maximum value of m + 1 pieces of operation data Dn from the frontmost or rearmost part rearranged with respect to an odd number of operation data Dn based on the extraction processing. .

【0025】[0025]

【作 用】本発明の第1のデータ処理装置によれば、図
1に示すように記憶手段11,データ抽出手段12,中
央値出力手段13が具備され、該データ抽出手段12が
記憶手段11の読出し領域を順次変更する。
According to the first data processing apparatus of the present invention, as shown in FIG. 1, a storage means 11, a data extraction means 12, and a median output means 13 are provided. Are sequentially changed.

【0026】例えば、奇数〔n=2m+1,m≧1〕個
の被演算データDnが制御手段15を介して記憶手段1
1に順次記憶されると、該被演算データDnの中から中
央値を含む被演算データDnがデータ抽出手段12によ
り抽出される。この際に、〔n+1〕/2個の比較交換
手段Ciから成るデータ抽出手段12により、最前部又
は最後部からm+1個目までの被演算データDnが比較
され、該被演算データDnの中の最大値が抽出され、該
被演算データDnの最大値が最前部又は最後部の被演算
データDnと交換される。
For example, an odd number [n = 2m + 1, m ≧ 1] of processed data Dn is stored in the storage unit 1 via the control unit 15.
When the data is sequentially stored at 1, the data to be processed Dn including the median is extracted from the data to be processed Dn by the data extracting means 12. At this time, the data extracting means 12 composed of [n + 1] / 2 comparing and exchanging means Ci compares the m + 1th pieces of data Dn to be operated from the foremost part or the last part. The maximum value is extracted, and the maximum value of the operand data Dn is exchanged with the foremost or last operand data Dn.

【0027】また、最前部又は最後部からm+1個目ま
での被演算データDnの中の最大値と最前部又は最後部
の被演算データDnとが交換されると、データ抽出手段
12により記憶手段11の読出し領域が順次変更され、
その変更された読出し領域の最前部又は最後部からm+
1個目までの被演算データDnの中の最大値と最前部又
は最後部の被演算データDnとが交換される。
When the maximum value among the (m + 1) -th to-be-processed data Dn from the foremost or last part is exchanged with the foremost or last part of the data to be processed Dn, the data extracting means 12 stores the data. 11 read areas are sequentially changed,
M + from the forefront or end of the changed read area
The maximum value among the first data Dn to be processed is exchanged with the foremost or last data Dn.

【0028】この際に、例えば、抽出された被演算デー
タDnが制御手段15を介して補助記憶手段14に一次
記憶される。このため、被演算データDnの読出し領域
の変更とその最大値の交換に基づいて抽出された中央値
を中央値出力手段13から出力するシフト分割法を実施
することが可能となる。
At this time, for example, the extracted data to be operated Dn is temporarily stored in the auxiliary storage means 14 via the control means 15. For this reason, it is possible to implement the shift division method of outputting the median value extracted based on the change of the readout area of the data to be operated Dn and the exchange of the maximum value from the median value output means 13.

【0029】これにより、画像処理や音声処理分野にお
いて、ユーザの使用態様により取扱いデータ量が増加し
た場合であっても、被演算データの中ら順次,最大値を
抽出する比較交換手段Ciにおけるデータ比較回数が従
来例に比べて少なくなる。また、それを構成するハード
ウエアの増加を最小限に留めることが可能となる。
Thus, in the field of image processing and audio processing, even if the amount of data handled increases due to the usage of the user, the data in the comparison / exchange means Ci for sequentially extracting the maximum value from the data to be operated on. The number of comparisons is smaller than in the conventional example. In addition, it is possible to minimize an increase in hardware constituting the system.

【0030】さらに、本発明の第2のデータ処理装置に
よれば、第1のデータ処理装置において、比較交換手段
Ciが最前部又は最後部からm+1個目までの被演算デ
ータDnを比較して、該被演算データDnの中の最小値
を抽出し、被演算データDnの最小値を最前部又は最後
部の被演算データDnと交換をする。
Further, according to the second data processing device of the present invention, in the first data processing device, the comparing and exchanging means Ci compares the data to be processed Dn up to the (m + 1) -th data from the forefront or the last. , The minimum value of the data to be operated Dn is extracted, and the minimum value of the data to be operated Dn is exchanged with the foremost or last data Dn to be operated.

【0031】このため、第1のデータ処理装置と同様
に、画像処理や音声処理分野において、ユーザの使用態
様により取扱いデータ量が増加した場合であっても、被
演算データの中ら順次,最小値を抽出する比較交換手段
Ciにおけるデータ比較回数が従来例に比べて少なくな
る。また、それを構成するハードウエアの増加を最小限
に留めることが可能となる。
For this reason, as in the first data processing apparatus, in the field of image processing and audio processing, even if the amount of handled data increases due to the manner of use by the user, the data to be processed is sequentially reduced to the minimum value. The number of data comparisons in the comparison and exchange means Ci for extracting a value is smaller than in the conventional example. In addition, it is possible to minimize an increase in hardware constituting the system.

【0032】これにより、第1のデータ処理装置と同様
に、中央値演算に係る処理時間の短縮化から画像処理分
野等において、高速データ処理を図ることが可能とな
る。また、本発明の第1のデータ処理方法によれば、図
2の処理フローチャートに示すように、ステップP2で
配列処理された最前部又は最後部からm+1個目までの
被演算データDnの中から最大値が抽出処理されると、
ステップP3で被演算データDnの最大値と最前部又は
最後部の被演算データDnとが交換処理され、以後、ス
テップP4で被演算データDnの読出し領域が順次変更
され、これに基づいてその最大値が抽出処理され、その
最大値と順次変更された読出し領域の最前部又は最後部
の被演算データDnとが交換処理されている。
As a result, as in the first data processing device, it is possible to reduce the processing time for the median value calculation and to achieve high-speed data processing in the image processing field and the like. Further, according to the first data processing method of the present invention, as shown in the processing flow chart of FIG. When the maximum value is extracted,
In step P3, the maximum value of the operation data Dn is exchanged with the foremost or last operation data Dn. Thereafter, in step P4, the read area of the operation data Dn is sequentially changed. A value is extracted, and the maximum value is exchanged with the data Dn at the forefront or last part of the read area which is sequentially changed.

【0033】このため、ステップP6の奇数個の被演算
データDnに係わり再配列された最前部又は最後部から
m+1個の被演算データDnの中の最小値の出力処理を
含めて、従来例に比べ、データ比較回数を低減すること
が可能となる。
For this reason, in the conventional example, including the output processing of the minimum value of the m + 1 pieces of operation data Dn from the front or rearmost part rearranged with respect to the odd number operation data Dn in step P6. In comparison, the number of data comparisons can be reduced.

【0034】例えば、従来例のバブルソート法によれ
ば、被演算データの個数をn〔奇数〕とし、比較回数を
kとすると、k=3/8・(n2 −1)の関係式に従う
が、本発明に係るシフト分割法によれば、その比較回数
をqとすると、q=(n2 +2n−3)/4の関係式に
従う。
For example, according to the conventional bubble sorting method, assuming that the number of data to be operated is n [odd] and the number of comparisons is k, the relation follows the relational expression of k = 3/8 · (n 2 −1). However, according to the shift division method according to the present invention, assuming that the number of comparisons is q, it follows the relational expression of q = (n 2 + 2n−3) / 4.

【0035】このことで、取扱いデータ量が増加すれば
するほど、従来例に比べて比較回数を約2/3に低減す
ることが可能となり、その比較時間や比較量の低減化を
図ることが可能となる。
As a result, as the amount of data to be handled increases, the number of comparisons can be reduced to about 2/3 as compared with the conventional example, and the comparison time and comparison amount can be reduced. It becomes possible.

【0036】これにより、被演算データの中央値の演算
に係わりバブルソート法やクイックソート法にのみ依存
することが無くなり、本発明に係るシフト分割法に基づ
いて、その中央値を高速に演算することができ、データ
比較回数の低減化からデータ処理の高速化を図ることが
可能となる。
This eliminates the dependence on the bubble sort method or the quick sort method for calculating the median of the data to be operated, and calculates the median at a high speed based on the shift division method according to the present invention. It is possible to speed up data processing by reducing the number of data comparisons.

【0037】なお、本発明の第2のデータ処理方法によ
れば、図2の処理フローチャートに示すように、ステッ
プP2Aで該配列処理された最前部又は最後部からm+1
個目までの被演算データDnに係わり最小値が抽出処理
され、その後、ステップP6Aで抽出処理に基づいて奇数
個の被演算データDnに係わり再配列された最前部又は
最後部からm+1個の被演算データDnの中の最大値が
出力処理される。
According to the second data processing method of the present invention, as shown in the processing flow chart of FIG. 2, m + 1 from the forefront or rearmost part subjected to the array processing in step P2A.
The minimum value is extracted with respect to the first piece of data Dn to be processed, and then, at step P6A, based on the extraction processing, m + 1 pieces of data are rearranged with respect to the odd number of pieces of data Dn to be rearranged. The maximum value in the operation data Dn is output.

【0038】このため、第1のデータ処理方法と同様
に、従来例に比べ、データ比較回数を低減することが可
能となり、その比較時間や比較量の低減化を図ることが
可能となる。
Therefore, as in the first data processing method, the number of data comparisons can be reduced as compared with the conventional example, and the comparison time and comparison amount can be reduced.

【0039】これにより、本発明に係るシフト分割法に
基づいて、その中央値を高速に演算することができ、デ
ータ比較回数の低減化からデータ処理の高速化を図るこ
とが可能となる。
Thus, the median value can be calculated at a high speed based on the shift division method according to the present invention, and the data processing can be speeded up by reducing the number of data comparisons.

【0040】[0040]

【実施例】次に、図を参照しながら本発明の実施例につ
いて説明をする。図3〜12は、本発明の実施例に係るデ
ータ処理装置及びデータ処理方法を説明する図をそれぞ
れ示している。
Next, an embodiment of the present invention will be described with reference to the drawings. 3 to 12 are diagrams illustrating a data processing device and a data processing method according to an embodiment of the present invention, respectively.

【0041】(1)第1の実施例の説明 図3は、本発明の第1の実施例に係る中央値演算装置の
構成図であり、図4は、その機能説明図をそれぞれ示し
ている。
(1) Description of First Embodiment FIG. 3 is a block diagram of a median value arithmetic unit according to a first embodiment of the present invention, and FIG. 4 is a diagram for explaining its function. .

【0042】例えば、雑音除去等の信号処理方式の1つ
である奇数個データの中の中央値を演算する中央値演算
装置は、図3において、データアレイ21,データ抽出
部22,最小値出力部23及びCPU(中央演算処理装
置)25から成る。
For example, in FIG. 3, a median value calculating device for calculating a median value in an odd number of data, which is one of signal processing methods such as noise removal, includes a data array 21, a data extracting unit 22, a minimum value output unit. It comprises a unit 23 and a CPU (central processing unit) 25.

【0043】すなわち、データアレイ21は記憶手段1
1の一実施例であり、奇数〔n=2m+1,m≧1〕個
の被演算データDnを順次記憶するものである。例え
ば、データアレイ21には、9つ(n=9,m=4)の
任意の数値,26,95,13,31,57,18,2
1,5,90等の被演算データD1〜D9が順次メモリ
領域〜に配列格納される(図8参照)。
That is, the data array 21 is stored in the storage unit 1
In this embodiment, odd [n = 2m + 1, m ≧ 1] data Dn are sequentially stored. For example, in the data array 21, nine (n = 9, m = 4) arbitrary numerical values, 26, 95, 13, 31, 57, 18, 2
Operand data D1 to D9 such as 1, 5, 90 are sequentially arranged and stored in the memory area (see FIG. 8).

【0044】データ抽出部22はデータ抽出手段12の
一実施例であり、被演算データD1〜D9の中から中央
値を含む被演算データDnを抽出するものである。ま
た、従来例と異なり、データ抽出部22がデータアレイ
21の読出し領域を順次変更することを特徴とする。
The data extracting section 22 is an embodiment of the data extracting means 12, and extracts the data Dn including the median from the data D1 to D9. Further, unlike the conventional example, the data extracting unit 22 is characterized in that the read area of the data array 21 is sequentially changed.

【0045】例えば、データ抽出部22は〔n+1〕/
2,すなわち、〔9+1〕/2=5個の比較交換手段C
iの一例となる第1〜第5のデータ比較交換器C1〜C
5から成り、各データ比較交換器C1〜C5が第1の実
施例ではメモリ領域〜に順次格納された被演算デー
タDnの最前部からm+1個目までの被演算データD1
〜Dm+1を比較して、該被演算データD1〜Dm+1
の中の最大値を抽出し、その被演算データDnの最大値
Dmax と最前部の被演算データD1とを交換する機能を
有する。
For example, the data extraction unit 22 calculates [n + 1] /
2, ie [9 + 1] / 2 = 5 comparison and exchange means C
The first to fifth data comparison exchangers C1 to C as an example of i
In the first embodiment, each of the data comparison and exchange units C1 to C5 includes the m + 1th to-be-processed data D1 from the forefront of the to-be-processed data Dn sequentially stored in the memory area to
To Dm + 1, and the operated data D1 to Dm + 1 are compared.
Has the function of extracting the maximum value of the data Dn and exchanging the maximum value Dmax of the data Dn with the data D1 at the forefront.

【0046】すなわち、図4の機能説明図において、第
1〜第5のデータ比較交換器C1〜C5は、図4(a)
に示すように第1のデータ比較交換器C1が活性化して
いる場合、他の第2〜第5のデータ比較交換器C2〜C
5が不活性化をしている。この際に、メモリ領域〜
に順次格納された被演算データDnの最前部から5個目
までの被演算データD1〜D5を比較して、該被演算デ
ータD1〜D5の中の最大値Dmax を抽出し、その被演
算データDnの最大値Dmax と最前部の被演算データD
1とを交換する。
That is, in the functional explanatory diagram of FIG. 4, the first to fifth data comparing and exchanging units C1 to C5 correspond to FIG.
When the first data comparison exchanger C1 is activated as shown in FIG. 7, the other second to fifth data comparison exchangers C2 to C2
5 is inactivated. At this time, the memory area ~
The data D1 to D5 from the foremost part to the fifth part of the processed data Dn sequentially stored in the processing data Dn are compared with each other, and the maximum value Dmax among the processed data D1 to D5 is extracted. The maximum value Dmax of Dn and the foremost processed data D
Replace with 1.

【0047】同様に、図4(b)に示すように第2のデ
ータ比較交換器C2が活性化している場合、他の第1,
第3〜第5のデータ比較交換器C1,C3〜C5が不活
性化をしている。この際に、メモリ領域〜に順次格
納された被演算データDnの最前部から5個目までの被
演算データD2〜D6を比較して、該被演算データD2
〜D6の中の最大値Dmax を抽出し、その被演算データ
Dnの最大値Dmax と最前部の被演算データD2とを交
換する。
Similarly, when the second data comparing and exchanging unit C2 is activated as shown in FIG.
The third to fifth data comparison exchangers C1 and C3 to C5 are inactivated. At this time, up to the fifth data D2 to D6 from the foremost part of the data Dn sequentially stored in the memory area are compared, and the data D2
The maximum value Dmax is extracted from .about.D6, and the maximum value Dmax of the data Dn is exchanged with the data D2 at the forefront.

【0048】以下同様にして、図4(c)に示すように
第5のデータ比較交換器C5が活性化している場合、他
の第1〜第4のデータ比較交換器C1〜C4が不活性化
をしている。この際に、メモリ領域〜に順次格納さ
れた被演算データDnの最前部から5個目までの被演算
データD5〜D9を比較して、該被演算データD5〜D
9の中の最大値Dmax を抽出し、その被演算データDn
の最大値Dmax と最前部の被演算データD5とを交換す
る。
Similarly, when the fifth data comparison exchanger C5 is activated as shown in FIG. 4C, the other first to fourth data comparison exchangers C1 to C4 are inactive. Is becoming At this time, up to the fifth data D5 to D9 from the forefront of the data Dn sequentially stored in the memory area are compared, and the data D5 to D9 are compared.
9 to extract the maximum value Dmax from the data Dn
Is exchanged with the foremost processed data D5.

【0049】従って、本発明の実施例では第1〜第5の
データ比較交換器C1〜C5間において、以上のような
リレー制御(シフト分割制御)を行うことが可能とな
る。最小値出力部23は中央値出力手段13の一実施例
であり、抽出された被演算データD1〜D5の中ら中央
値を出力するものである。最小値出力部23はデータア
レイ21のメモリ領域〜の出力線に接続され、該メ
モリ領域〜に際配列された被演算データD1〜D5
の中ら最小値,すなわち、与えられた9つの被演算デー
タの中の中央値を出力する。なお、本発明の実施例で
は、任意の数値,26,95,13,31,57,1
8,21,5,90の中ら中央値=26を出力すること
ができる。
Therefore, in the embodiment of the present invention, the above-described relay control (shift division control) can be performed between the first to fifth data comparison exchangers C1 to C5. The minimum value output unit 23 is an embodiment of the median value output means 13 and outputs a median value among the extracted data D1 to D5. The minimum value output unit 23 is connected to an output line of the memory area of the data array 21 and the data D1 to D5 arranged in the memory area are arranged.
Is output, that is, the median value among the given nine data to be operated. In the embodiment of the present invention, arbitrary numerical values, 26, 95, 13, 31, 31, 57, 1
A median value of 26 among 8, 21, 5, 90 can be output.

【0050】CPU(中央演算処理装置)25は制御手
段15の一実施例であり、データアレイ21,データ抽
出部22及び最小値出力部23の入出力を制御するもの
である。
The CPU (central processing unit) 25 is an embodiment of the control means 15 and controls the input and output of the data array 21, the data extraction unit 22, and the minimum value output unit 23.

【0051】このようにして、本発明の第1の実施例に
係る中央値演算装置によれば、図1に示すようにデータ
アレイ21,データ抽出部22,最小値出力部23が具
備され、該データ抽出部22がデータアレイ21の読出
し領域を順次変更する。
As described above, according to the median value arithmetic unit according to the first embodiment of the present invention, as shown in FIG. 1, the data array 21, the data extraction unit 22, and the minimum value output unit 23 are provided. The data extraction unit 22 sequentially changes the read area of the data array 21.

【0052】例えば、奇数〔n=9,m=4〕個の被演
算データD1〜D9がCPU25を介してデータアレイ
21に順次記憶されると、該被演算データD1〜D9の
中から中央値を含む被演算データD1〜D5がデータ抽
出部22により抽出される。この際に、5個のデータ比
較交換器C1〜C5から成るデータ抽出部22により、
最前部からm+1個目までの被演算データD1〜D5が
比較され、該被演算データD1〜D5の中の最大値が抽
出され、該被演算データD1〜D5の最大値Dmax が最
前部の被演算データD1と交換される。
For example, when the odd [n = 9, m = 4] pieces of data D1 to D9 are sequentially stored in the data array 21 via the CPU 25, the median value among the pieces of data D1 to D9 is calculated. Are extracted by the data extracting unit 22. At this time, the data extraction unit 22 including the five data comparison exchangers C1 to C5
The m + 1-th processed data D1 to D5 from the foremost part are compared, the maximum value among the processed data D1 to D5 is extracted, and the maximum value Dmax of the processed data D1 to D5 is determined as the foremost part. It is exchanged with the operation data D1.

【0053】また、メモリ領域〜の最前部から5個
目までの被演算データD1〜D5の中の最大値Dmax と
最前部の被演算データD1とが交換されると、データ抽
出部22によりデータアレイ21の読出し領域が順次変
更され、その変更された読出し領域の最前部から5個目
までの被演算データD2〜D6の中の最大値Dmax と最
前部の被演算データD2とが交換される。
When the maximum value Dmax of the first to fifth operation data D1 to D5 from the memory area is exchanged with the foremost operation data D1, the data extraction unit 22 outputs the data. The read area of the array 21 is sequentially changed, and the maximum value Dmax of the fifth to the fifth data D2 to D6 from the foremost part of the changed read area is exchanged with the foremost data D2. .

【0054】このため、被演算データD1〜D9の読出
し領域の変更とその最大値Dmax の交換に基づいて抽出
された中央値を最小値出力部23から出力するシフト分
割法を実施することが可能となる。
For this reason, it is possible to implement a shift division method in which the median value extracted based on the change of the read area of the operated data D1 to D9 and the exchange of the maximum value Dmax is output from the minimum value output unit 23. Becomes

【0055】これにより、画像処理や音声処理分野にお
いて、ユーザの使用態様により取扱いデータ量が増加し
た場合であっても、被演算データの中ら順次,最大値D
maxを抽出するデータ比較交換器C1〜C5におけるデ
ータ比較回数が従来例に比べて少なくなる。また、それ
を構成するハードウエアの増加を最小限に留めることが
可能となる。
As a result, in the field of image processing and audio processing, even if the amount of data handled increases due to the manner of use by the user, the maximum value D is sequentially selected from the data to be processed.
The number of data comparisons in the data comparison exchangers C1 to C5 for extracting max is smaller than in the conventional example. In addition, it is possible to minimize an increase in hardware constituting the system.

【0056】次に、本発明の第1の実施例に係る中央値
演算方法について、当該装置の動作を補足しながら説明
をする。図5は、本発明の第1の実施例に係る中央値演
算の処理フローチャートであり、図6〜8はその補足説
明図(その1〜3)をそれぞれ示している。
Next, the median value calculating method according to the first embodiment of the present invention will be described while supplementing the operation of the device. FIG. 5 is a processing flowchart of the median value calculation according to the first embodiment of the present invention, and FIGS. 6 to 8 show supplementary explanatory diagrams (parts 1 to 3) thereof.

【0057】例えば、9つ(n=9,m=4)の任意の
数値,26,95,13,31,57,18,21,
5,90から成る被演算データD1〜D9の中から中央
値を演算する場合、まず、図5において、まず、ステッ
プP1で奇数〔n=9=2m+1,4=m≧1〕個の被
演算データD1〜D9の配列処理をする。
For example, nine (n = 9, m = 4) arbitrary numerical values, 26, 95, 13, 31, 57, 18, 21, 21,
In the case of calculating the median from among the data to be processed D1 to D9 consisting of 5, 90, first, in FIG. 5, in step P1, odd [n = 9 = 2m + 1, 4 = m ≧ 1] The array processing of the data D1 to D9 is performed.

【0058】この際に、例えば、図6(a)や図8
(a)に示すように、データアレイ21の第1番目のメ
モリ領域にD1=数値26,第2番目のメモリ領域にD
2=95,第3番目のメモリ領域にD3=数値13,第
4番目のメモリ領域にD4=31,第5番目のメモリ領
域にD5=数値57,第6番目のメモリ領域にD6=1
8,第7番目のメモリ領域にD7=数値21,第8番目
のメモリ領域にD8=5,第9番目のメモリ領域にD9
=数値90がそれぞれ格納される。
At this time, for example, FIG.
As shown in (a), D1 = numerical value 26 in the first memory area of the data array 21 and D1 in the second memory area.
2 = 95, D3 = numerical value 13 in the third memory area, D4 = 31 in the fourth memory area, D5 = numerical value 57 in the fifth memory area, D6 = 1 in the sixth memory area
8, D7 = numerical value 21 in the seventh memory area, D8 = 5 in the eighth memory area, D9 in the ninth memory area
= Numerical value 90 is stored.

【0059】次に、ステップP2で配列処理された最前
部からm+1=5個目までの被演算データD1〜D5の
中から最大値Dmax の抽出処理をする。ここで、図6
(b)に示すように、最前部から1,2,3,m,m+
1の5個目までの被演算データD1〜D5,例えば、図
8(b)に示すように、数値26,95,13,31,
57の中から最大値Dmax =95が第1のデータ比較交
換器C1により抽出される。
Next, the maximum value Dmax is extracted from the m + 1 = 5th data D1 to D5 from the foremost part which has been arrayed in step P2. Here, FIG.
As shown in (b), 1, 2, 3, m, m +
As shown in FIG. 8B, up to the fifth data D1 to D5 to be operated, for example, numerical values 26, 95, 13, 31,
The maximum value Dmax = 95 out of 57 is extracted by the first data comparison and exchange C1.

【0060】さらに、ステップP3で被演算データD1
〜D5の最大値Dmax と最前部の被演算データD1との
交換処理をする。ここで、最大値Dmax =95と数値2
6とが第1のデータ比較交換器C1により交換される。
Further, at step P3, the operation data D1
The maximum value Dmax of .about.D5 is exchanged with the forefront data D1. Here, the maximum value Dmax = 95 and the numerical value 2
6 are exchanged by the first data comparison exchange C1.

【0061】その後、ステップP4でデータアレイ21
に係わり被演算データD1〜D9の読出し領域を1つシ
フトする。この際に、第1のデータ比較交換器C1から
第2のデータ比較交換器C2に制御権が移行し、メモリ
領域〜の読出し領域からメモリ領域〜の読出し
領域に遷移する。
Thereafter, in step P4, the data array 21
, The read area of the operated data D1 to D9 is shifted by one. At this time, the control right is transferred from the first data comparison and exchange C1 to the second data comparison and exchange C2, and a transition is made from the read area of the memory area to the read area of the memory area.

【0062】次いで、ステップP5でシフト後の被演算
データD2〜D6の中ら最大値Dmax の抽出処理をす
る。ここでは、図6(c)に示すように、シフト後の最
前部から2,3,m,m+1,m+2の5個目までの被
演算データD2〜D6,例えば、図8(b)に示すよう
に、数値26,13,31,57,18の中から最大値
Dmax =57が第2のデータ比較交換器C2により抽出
される。
Next, in step P5, the maximum value Dmax is extracted from the shifted data D2 to D6. Here, as shown in FIG. 6C, the data to be processed D2 to D6 from the foremost part after the shift to the fifth of 2, 3, m, m + 1, m + 2 are shown in, for example, FIG. As described above, the maximum value Dmax = 57 is extracted from the numerical values 26, 13, 31, 57 and 18 by the second data comparison and exchange C2.

【0063】次に、ステップP6で被演算データD2〜
D6の中の最大値Dmax とメモリ領域〜の最前部の
被演算データD2との交換処理をする。この際に、最大
値Dmax =57と数値26とが第2のデータ比較交換器
C2により交換される。
Next, in step P6, the data to be operated D2
An exchange process is performed between the maximum value Dmax in D6 and the data D2 at the forefront of the memory area. At this time, the maximum value Dmax = 57 and the numerical value 26 are exchanged by the second data comparison exchange C2.

【0064】その後、ステップP7でデータアレイ21
に係わり残りのメモリ領域〜について全部終了した
か否かを判断する。この際に、それが全部終了していな
い場合(NO)には、ステップP4に戻って、その読出
し領域を更に1つシフトする。また、それが全部終了し
た場合(YES)には、ステップP8に移行する。
Thereafter, at step P7, the data array 21
It is determined whether or not all of the remaining memory areas have been completed. At this time, if all the reading is not completed (NO), the process returns to Step P4, and the read area is further shifted by one. If all the processing has been completed (YES), the program shifts to Step P8.

【0065】なお、本発明の実施例では、それが全部終
了していないことからステップP4に戻って、その読出
し領域を更に1つシフトし、ステップP5でシフト後の
被演算データD3〜D7の中ら最大値Dmax の抽出処理
をする。ここでは、図8(c)に示すように、数値1
3,31,26,18,21の中から最大値Dmax =3
1が第3のデータ比較交換器C3により抽出される。
In the embodiment of the present invention, since the processing has not been completed, the process returns to step P4, and the read area is further shifted by one. In step P5, the processed data D3 to D7 after the shift are shifted. Extraction processing of the middle maximum value Dmax is performed. Here, as shown in FIG.
Maximum value Dmax = 3 out of 3, 31, 26, 18, and 21
1 is extracted by the third data comparison and exchange C3.

【0066】次に、ステップP6で被演算データD3〜
D7の中の最大値Dmax とメモリ領域〜の最前部の
被演算データD3との交換処理をする。この際に、最大
値Dmax =31と数値13とが第3のデータ比較交換器
C3により交換される。
Next, at step P6, the operation data D3 to
The maximum value Dmax in D7 is exchanged with the data D3 at the forefront of the memory area. At this time, the maximum value Dmax = 31 and the numerical value 13 are exchanged by the third data comparison and exchange unit C3.

【0067】さらに、ステップP4に戻って、その読出
し領域を更に1つシフトし、ステップP5でシフト後の
被演算データD4〜D8の中ら最大値Dmax の抽出処理
をする。ここでは、図8(d)に示すように、数値1
3,26,18,21,5の中から最大値Dmax =26
が第4のデータ比較交換器C4により抽出される。
Further, returning to step P4, the read area is further shifted by one, and in step P5, the maximum value Dmax is extracted from the shifted data D4 to D8. Here, as shown in FIG.
Maximum value Dmax = 26 from among 3,26,18,21,5
Is extracted by the fourth data comparison and exchange unit C4.

【0068】次に、ステップP6で被演算データD4〜
D8の中の最大値Dmax とメモリ領域〜の最前部の
被演算データD4との交換処理をする。この際に、最大
値Dmax =26と数値13とが第4のデータ比較交換器
C4により交換される。
Next, at step P6, the operation data D4 to
The maximum value Dmax of D8 is exchanged with the data D4 at the forefront of the memory area. At this time, the maximum value Dmax = 26 and the numerical value 13 are exchanged by the fourth data comparison and exchange unit C4.

【0069】さらに、ステップP4に戻って、その読出
し領域を更に1つシフトし、ステップP5でシフト後の
被演算データD5〜D9の中ら最大値Dmax の抽出処理
をする。ここでは、図7(a)に示すように、最後のシ
フト後の最前部からm+1,m+2,m+3,2m,2
m+1の5個目までの被演算データD5〜D9,例え
ば、図8(e)に示すように、数値13,18,21,
5,90の中から最大値Dmax =90が第5のデータ比
較交換器C5により抽出される。
Further, returning to step P4, the read area is further shifted by one, and in step P5, the maximum value Dmax is extracted from the shifted data D5 to D9. Here, as shown in FIG. 7A, from the forefront after the last shift, m + 1, m + 2, m + 3, 2m, 2
The data to be operated D5 to D9 up to the fifth of m + 1, for example, as shown in FIG.
The maximum value Dmax = 90 out of 5, 90 is extracted by the fifth data comparison and exchange C5.

【0070】次に、ステップP6で被演算データD5〜
D9の中の最大値Dmax とメモリ領域〜の最前部の
被演算データD5との交換処理をする。この際に、最大
値Dmax =90と数値13とが第5のデータ比較交換器
C5により交換される。
Next, at step P6, the data to be operated D5
An exchange process is performed between the maximum value Dmax of D9 and the data D5 at the forefront of the memory area. At this time, the maximum value Dmax = 90 and the value 13 are exchanged by the fifth data comparison and exchange unit C5.

【0071】これにより、全部終了し、ステップP8で
9個の被演算データD1〜D9に係わり再配列された最
前部からm+1=5個の被演算データD1〜D9の中の
最小値Dmin の出力処理をする。この際に、図7(b)
に示すように、メモリ領域〜の最前部から1,2,
3…m,m+1の5個目までの被演算データD1〜D
5,例えば、図8(f)に示すように、再配置された数
値95,57,31,26,90,18,21,5,1
3の最前部からm+1=5個の被演算データD1〜D5
の中の最小値Dmin =26を中央値として出力すること
が可能となる。
As a result, the output of the minimum value Dmin of m + 1 = 5 pieces of data D1 to D9 from the foremost part rearranged in relation to the nine pieces of data D1 to D9 in step P8 is completed. Do the processing. At this time, FIG.
As shown in FIG.
3... Up to the fifth data D1 to D of m and m + 1
5, for example, as shown in FIG. 8 (f), rearranged numerical values 95, 57, 31, 26, 90, 18, 21, 5, 1
M + 1 = 5 pieces of operation data D1 to D5 from the front of
Can be output as the median value of the minimum value Dmin = 26.

【0072】このようにして、本発明の第1の実施例に
係る中央値演算方法によれば、図5の処理フローチャー
トに示すように、ステップP1で配列処理された最前部
から5個目までの被演算データD1〜D5の中から最大
値Dmax が抽出処理されると、ステップP3で被演算デ
ータD1〜D5の最大値Dmax と最前部の被演算データ
D1とが交換処理され、以後、ステップP4〜P7で被
演算データD2〜D9の読出し領域が順次変更され、こ
れに基づいてその最大値Dmax が抽出処理され、その最
大値Dmax と順次変更された読出し領域の最前部の被演
算データDnとが交換処理されている。
As described above, according to the median value calculating method according to the first embodiment of the present invention, as shown in the processing flowchart of FIG. When the maximum value Dmax is extracted from the operation data D1 to D5, the maximum value Dmax of the operation data D1 to D5 and the foremost operation data D1 are exchanged in step P3. At P4 to P7, the read area of the data to be processed D2 to D9 is sequentially changed, and the maximum value Dmax is extracted based on the data, and the maximum value Dmax and the data to be processed Dn at the forefront of the sequentially changed read area are changed. Has been exchanged.

【0073】このため、ステップP8の奇数個の被演算
データD1〜D9に係わり再配列された最前部から5個
の被演算データD1〜D5の中の最小値Dmin の出力処
理を含めて、従来例に比べ、データ比較回数を低減する
ことが可能となる。
For this reason, the output processing of the minimum value Dmin of the rearmost five processed data D1 to D5 related to the odd number of processed data D1 to D9 in step P8 and Compared with the example, the number of data comparisons can be reduced.

【0074】例えば、従来例のバブルソート法によれ
ば、被演算データの個数をn=9とし、比較回数をkと
すると、k=3/8・(n2 −1)=30回となるが、
本発明に係るシフト分割法によれば、その比較回数をq
とすると、q=(n2 +2n−3)/4=24回に低減
される。
For example, according to the conventional bubble sorting method, if the number of data to be operated is n = 9 and the number of comparisons is k, k = 3/8 · (n 2 −1) = 30. But,
According to the shift division method according to the present invention, the number of comparisons is represented by q
Then, q = (n 2 + 2n−3) / 4 = 24.

【0075】このことで、被演算データの取扱いデータ
量が増加すればするほど、従来例に比べて比較回数を約
2/3に低減することが可能となり、その比較時間や比
較量の低減化を図ることが可能となる。
As a result, as the amount of data to be processed increases, the number of comparisons can be reduced to about 2/3 as compared with the conventional example, and the comparison time and the amount of comparison can be reduced. Can be achieved.

【0076】これにより、被演算データの中央値の演算
に係わりバブルソート法やクイックソート法にのみ依存
することが無くなり、本発明に係るシフト分割法に基づ
いて、その中央値を高速に演算することができ、データ
比較回数の低減化からデータ処理の高速化を図ることが
可能となる。
This eliminates the dependence on only the bubble sort method or the quick sort method for calculating the median value of the data to be operated, and calculates the median value at high speed based on the shift division method according to the present invention. It is possible to speed up data processing by reducing the number of data comparisons.

【0077】なお、本発明の第1の実施例では、メモリ
領域〜の最前部から被演算データDnの最大値Dma
x を抽出する場合について説明をしたが、メモリ領域
〜の最後部から被演算データDnの最大値Dmax を抽
出しても同様な効果が得られる。
In the first embodiment of the present invention, the maximum value Dma of the data Dn to be operated is
Although the case where x is extracted has been described, the same effect can be obtained by extracting the maximum value Dmax of the data Dn to be operated from the last part of the memory area.

【0078】(2)第2の実施例の説明 図9は、本発明の第2の実施例に係る中央値演算装置の
構成図であり、図10は、その機能説明図をそれぞれ示し
ている。
(2) Description of the Second Embodiment FIG. 9 is a block diagram of a median value calculating device according to a second embodiment of the present invention, and FIG. 10 is a functional explanatory diagram thereof. .

【0079】なお、第1の実施例と異なるのは第2の実
施例では、データ抽出部22に代わりデータ抽出分配器
32が設けられ、さらに、サブアレイ24や比較器26
が設けられるものである。
The second embodiment differs from the first embodiment in that a data extraction / distribution unit 32 is provided instead of the data extraction unit 22, and a sub-array 24 and a comparator 26 are provided.
Is provided.

【0080】すなわち、データ抽出分配器32はデータ
抽出手段12の他の実施例であり、第1の実施例と同様
にデータ比較交換器C1〜C5から成る(図3参照)。
また、各データ比較交換器C1〜C5の機能は、最前部
からm+1個目までの被演算データD1〜D5を比較し
て、第1の実施例と異なり該被演算データD1〜D5の
中の最小値Dmin を抽出し、その最小値と最前部の被演
算データD1とを交換し、その交換した最小値Dmin を
切換え部を介してサブアレイ24に分配出力するもので
ある。
That is, the data extracting / distributing unit 32 is another embodiment of the data extracting means 12, and comprises data comparing and exchanging units C1 to C5 as in the first embodiment (see FIG. 3).
The function of each of the data comparing / exchanging units C1 to C5 is different from that of the first embodiment in that the m + 1-th processed data D1 to D5 are compared from the forefront part. The minimum value Dmin is extracted, the minimum value is exchanged with the foremost data D1, and the exchanged minimum value Dmin is distributed to the sub-array 24 via the switching unit.

【0081】また、図10の機能説明図において、第2の
データ比較交換器C2は、図10(a)に示すように第2
のデータ比較交換器C2が活性化している場合、図3に
示すような他の第1,第3〜第5のデータ比較交換器C
1,C3〜C5が不活性化をしている。この際に、メモ
リ領域〜に順次格納された被演算データDnの最前
部から5個目までの被演算データD2〜D6を比較し
て、該被演算データD2〜D6の中の最小値Dmin を抽
出し、その被演算データDnの最小値Dmin と最前部の
被演算データD2とを交換し、その交換した最小値Dmi
n をサブアレイ24に出力する。
In the function explanatory diagram of FIG. 10, the second data comparison and exchange unit C2 is connected to the second data comparison and exchange unit C2 as shown in FIG.
Is activated, the other first, third to fifth data comparison exchangers C as shown in FIG.
1, C3 to C5 are inactivated. At this time, the fifth data D2 to D6 from the foremost part of the data Dn sequentially stored in the memory area are compared to determine the minimum value Dmin of the data D2 to D6. The minimum value Dmin of the processed data Dn is exchanged with the foremost processed data D2, and the exchanged minimum value Dmi is extracted.
n to the subarray 24.

【0082】以下同様にして、図10(b)に示すように
第5のデータ比較交換器C5が活性化している場合、図
3に示すような他の第1〜第4のデータ比較交換器C1
〜C4が不活性化をしている。この際に、メモリ領域
〜に順次格納された被演算データDnの最前部から5
個目までの被演算データD5〜D9を比較して、該被演
算データD5〜D9の中の最小値Dmin を抽出し、その
最小値Dmin と最前部の被演算データD5とを交換し、
その交換した最小値Dmin をサブアレイ24に出力す
る。
Similarly, when the fifth data comparison exchange C5 is activated as shown in FIG. 10B, the other first to fourth data comparison exchanges as shown in FIG. C1
To C4 are inactivated. At this time, 5 bits from the forefront of the data to be operated Dn sequentially stored in the memory area
By comparing the data D5 to D9 up to the first data, a minimum value Dmin of the data D5 to D9 is extracted, and the minimum value Dmin and the data D5 at the forefront are exchanged.
The exchanged minimum value Dmin is output to the subarray 24.

【0083】従って、本発明の第2の実施例では第1〜
第5のデータ比較交換器C1〜C5間において、第1の
実施例のようなリレー制御に加えて、その最小値Dmin
を外部に出力することが可能となる。
Therefore, in the second embodiment of the present invention, first to
Between the fifth data comparison exchangers C1 to C5, in addition to the relay control as in the first embodiment, the minimum value Dmin
Can be output to the outside.

【0084】サブアレイ24は補助記憶手段14の一実
施例であり、抽出された5つの被演算データD1〜D5
を一次記憶するものである。なお、比較器26は5つの
被演算データD1〜D5の中ら最大値Dmax を中央値と
して出力するものである。
The sub-array 24 is an embodiment of the auxiliary storage means 14, and includes five extracted data D1-D5.
Is temporarily stored. The comparator 26 outputs the maximum value Dmax among the five operated data D1 to D5 as a median value.

【0085】このようにして、本発明の第2の実施例に
係る中央値演算装置によれば、第1の実施例の中央値演
算装置において、データ比較交換器C1〜Cが最前部か
ら5個目までの被演算データD1〜D5を比較して、該
被演算データD1〜D5の中の最小値Dmin を抽出し、
その最小値Dmin を最前部の被演算データDnと交換
し、それを切換え部を介してサブアレイ26に出力す
る。
As described above, according to the median value arithmetic device according to the second embodiment of the present invention, in the median value arithmetic device of the first embodiment, the data comparison exchangers C1 to C are 5 By comparing the first to third pieces of data D1 to D5, a minimum value Dmin of the pieces of data D1 to D5 is extracted,
The minimum value Dmin is exchanged with the foremost processed data Dn, which is output to the subarray 26 via the switching unit.

【0086】このため、第1の実施例に係る中央値演算
装置と同様に、画像処理や音声処理分野において、ユー
ザの使用態様により取扱いデータ量が増加した場合であ
っても、被演算データの中ら順次,最小値を抽出するデ
ータ比較交換器C1〜C5におけるデータ比較回数が従
来例に比べて少なくなる。また、それを構成するハード
ウエアの増加を最小限に留めることが可能となる。
For this reason, similarly to the median arithmetic unit according to the first embodiment, in the field of image processing and audio processing, even when the amount of data handled increases due to the usage of the user, the data to be operated on The number of data comparisons in the data comparison exchangers C1 to C5 for sequentially extracting the minimum value from the center becomes smaller than in the conventional example. In addition, it is possible to minimize an increase in hardware constituting the system.

【0087】これにより、第1の実施例と同様に、中央
値演算に係る処理時間の短縮化から画像処理分野等にお
いて、高速データ処理を図ることが可能となる。次に、
本発明の第2の実施例に係る中央値演算方法について、
当該装置の動作を補足しながら説明をする。
As a result, as in the first embodiment, high-speed data processing can be achieved in the field of image processing and the like by shortening the processing time for the median value calculation. next,
Regarding the median value calculation method according to the second embodiment of the present invention,
A description will be given while supplementing the operation of the device.

【0088】図11は、本発明の第2の実施例に係る中央
値演算の処理フローチャートであり、図12はその補足説
明図をそれぞれ示している。例えば、9つの任意の数
値,26,95,13,31,57,18,21,5,
90から成る被演算データD1〜D9の中から中央値を
演算する場合、まず、図11において、まず、ステップP
1で奇数〔n=9=2m+1,4=m≧1〕個の被演算
データD1〜D9の配列処理をする。
FIG. 11 is a processing flowchart of the median value calculation according to the second embodiment of the present invention, and FIG. 12 is a supplementary explanatory diagram thereof. For example, nine arbitrary numerical values, 26, 95, 13, 31, 57, 18, 21, 5,
When calculating the median value from among the data to be operated D1 to D9 consisting of 90, first, in FIG.
When 1, the odd [n = 9 = 2m + 1, 4 = m ≧ 1] array processing of the data to be processed D1 to D9 is performed.

【0089】この際に、例えば、図12に示すように、デ
ータアレイ21の第1〜第9番目のメモリ領域に被演算
データD1〜D9として数値26,95,13,31,
57,18,21,5,90がそれぞれ格納される。
At this time, for example, as shown in FIG. 12, in the first to ninth memory areas of the data array 21, numerical values 26, 95, 13, 31, and
57, 18, 21, 5, 90 are respectively stored.

【0090】次に、ステップP2で配列処理された最前
部からm+1=5個目までの被演算データD1〜D5の
中から最小値Dmin の抽出処理をする。ここで、図8
(b)に示すように、数値26,95,13,31,5
7の中から最小値=13が第1のデータ比較交換器C1
により抽出される。
Next, a process of extracting the minimum value Dmin from the m + 1 = 5th data D1 to D5 from the foremost portion subjected to the array processing in step P2 is performed. Here, FIG.
As shown in (b), numerical values 26, 95, 13, 31, 5
7 is the first data comparison exchanger C1.
Is extracted by

【0091】さらに、ステップP3で被演算データD1
〜D5の最小値Dmin と最前部の被演算データD1との
交換処理をする。ここで、最小値Dmin =13と数値2
6とが第1のデータ比較交換器C1により交換され、ま
た、そのデータが切換え部を介してサアレイ24に転送
される。
Further, at step P3, the operation data D1
Exchange processing between the minimum value Dmin of .about.D5 and the foremost processed data D1. Here, the minimum value Dmin = 13 and the numerical value 2
6 are exchanged by the first data comparison and exchange unit C1, and the data is transferred to the array 24 through the switching unit.

【0092】その後、ステップP4でデータアレイ21
に係わり被演算データD1〜D9の読出し領域を1つシ
フトする。この際に、第1のデータ比較交換器C1から
第2のデータ比較交換器C2に制御権が移行し、メモリ
領域〜の読出し領域からメモリ領域〜の読出し
領域に遷移される。
Thereafter, in step P4, the data array 21
, The read area of the operated data D1 to D9 is shifted by one. At this time, the control right is transferred from the first data comparison and exchange C1 to the second data comparison and exchange C2, and a transition is made from the read area of the memory area to the read area of the memory area.

【0093】次いで、ステップP5でシフト後の被演算
データD2〜D6の中ら最小値Dmin の抽出処理をす
る。ここでは、図12(b)に示すように、数値95,2
6,31,57,18の中から最小値=18が第2のデ
ータ比較交換器C2により抽出される。
Next, at step P5, a process of extracting the minimum value Dmin from the shifted data D2 to D6 is performed. Here, as shown in FIG.
The minimum value = 18 out of 6, 31, 57 and 18 is extracted by the second data comparison and exchange C2.

【0094】次に、ステップP6で被演算データD2〜
D6の中の最小値Dmin とメモリ領域〜の最前部の
被演算データD2との交換処理をする。この際に、最小
値Dmin =18と数値95とが第2のデータ比較交換器
C2により交換され、また、そのデータが切換え部を介
してサアレイ24に転送される。
Next, at step P6, the operation data D2
An exchange process is performed between the minimum value Dmin of D6 and the data D2 at the forefront of the memory area. At this time, the minimum value Dmin = 18 and the numerical value 95 are exchanged by the second data comparison and exchange unit C2, and the data is transferred to the array 24 via the switching unit.

【0095】その後、ステップP7でデータアレイ21
に係わり残りのメモリ領域〜について全部終了した
か否かを判断する。この際に、それが全部終了していな
い場合(NO)には、ステップP4に戻って、その読出
し領域を更に1つシフトする。また、それが全部終了し
た場合(YES)には、ステップP8に移行する。
Thereafter, in step P7, the data array 21
It is determined whether or not all of the remaining memory areas have been completed. At this time, if all the reading is not completed (NO), the process returns to Step P4, and the read area is further shifted by one. If all the processing has been completed (YES), the program shifts to Step P8.

【0096】なお、本発明の実施例では、それが全部終
了していないことからステップP4に戻って、その読出
し領域を更に1つシフトし、ステップP5でシフト後の
被演算データD3〜D7の中ら最小値Dmin の抽出処理
をする。ここでは、図12(c)に示すように、数値2
6,31,57,95,21の中から最小値Dmin =2
1が第3のデータ比較交換器C3により抽出される。
In the embodiment of the present invention, since the processing has not been completed, the process returns to step P4, and the read area is further shifted by one. In step P5, the processed data D3 to D7 after the shift are shifted. An extraction process of the minimum value Dmin is performed. Here, as shown in FIG.
Minimum value Dmin = 2 out of 6, 31, 57, 95 and 21
1 is extracted by the third data comparison and exchange C3.

【0097】次に、ステップP6で被演算データD3〜
D7の中の最小値Dmin とメモリ領域〜の最前部の
被演算データD3との交換処理をする。この際に、最小
値Dmin =21と数値26とが第3のデータ比較交換器
C3により交換され、また、そのデータが切換え部を介
してサアレイ24に転送される。
Next, at step P6, the data D3 to
An exchange process is performed between the minimum value Dmin of D7 and the data D3 at the forefront of the memory area. At this time, the minimum value Dmin = 21 and the numerical value 26 are exchanged by the third data comparing / exchanging unit C3, and the data is transferred to the array 24 via the switching unit.

【0098】さらに、ステップP4に戻って、その読出
し領域を更に1つシフトし、ステップP5でシフト後の
被演算データD4〜D8の中ら最小値Dmin の抽出処理
をする。ここでは、図12(d)に示すように、数値3
1,57,95,26,5の中から最小値Dmin =5が
第4のデータ比較交換器C4により抽出される。
Further, returning to step P4, the read area is further shifted by one, and in step P5, the minimum value Dmin is extracted from the shifted data D4 to D8. Here, as shown in FIG.
The minimum value Dmin = 5 is extracted by the fourth data comparison and exchange C4 from 1,57,95,26,5.

【0099】次に、ステップP6で被演算データD4〜
D8の中の最小値Dmin とメモリ領域〜の最前部の
被演算データD4との交換処理をする。この際に、最小
値Dmin =5と数値31とが第4のデータ比較交換器C
4により交換される。
Next, in step P6, the data D4 to
Exchange processing is performed between the minimum value Dmin of D8 and the data D4 at the forefront of the memory area. At this time, the minimum value Dmin = 5 and the numerical value 31 correspond to the fourth data comparison and exchange C
Replaced by 4.

【0100】さらに、ステップP4に戻って、その読出
し領域を更に1つシフトし、ステップP5でシフト後の
被演算データD5〜D9の中ら最小値Dmin の抽出処理
をする。ここでは、図12(e)に示すように、数値5
7,95,26,31,90の中から最小値Dmin =2
6が第5のデータ比較交換器C5により抽出される。
Further, returning to step P4, the read area is further shifted by one, and in step P5, the process of extracting the minimum value Dmin from the shifted data D5 to D9 is performed. Here, as shown in FIG.
7,95,26,31,90 minimum value Dmin = 2
6 is extracted by the fifth data comparison and exchange C5.

【0101】次に、ステップP6で被演算データD5〜
D9の中の最小値Dmin とメモリ領域〜の最前部の
被演算データD5との交換処理をする。この際に、最小
値Dmin =26と数値57とが第5のデータ比較交換器
C5により交換され、また、そのデータが切換え部を介
してサアレイ24に転送される。
Next, at step P6, the data to be operated D5
An exchange process is performed between the minimum value Dmin of D9 and the data D5 at the forefront of the memory area. At this time, the minimum value Dmin = 26 and the numerical value 57 are exchanged by the fifth data comparison and exchange unit C5, and the data is transferred to the array 24 via the switching unit.

【0102】これにより、全部終了し、ステップP8で
9個の被演算データD1〜D9に係わり再配列された最
前部からm+1=5個の被演算データD1〜D9の中の
最小値Dmin の出力処理をする。この際に、図12(f)
に示すように、再配置された数値13,18,21,
5,26,95,57,31,90がサブアレイ24か
ら読み出され、比較器26によりその最前部からm+1
=5個の被演算データD1〜D5の中の最大値Dmax =
26が抽出され、それを中央値として出力することが可
能となる。
As a result, the output of the minimum value Dmin of the (m + 1) = 5 pieces of data D1 to D9 from the foremost part rearranged with respect to the nine pieces of data D1 to D9 in step P8 is completed. Do the processing. At this time, FIG.
, The rearranged numbers 13, 18, 21,
5, 26, 95, 57, 31, 90 are read from the sub-array 24 and the comparator 26 calculates m + 1
= Maximum value Dmax of five pieces of data D1 to D5 =
26 are extracted and can be output as a median.

【0103】このようにして、本発明の第2の実施例に
係る中央値演算方法によれば、図11の処理フローチャー
トに示すように、ステップP1で配列処理された最前部
から5個目までの被演算データD1〜D5に係わり最小
値Dmin が抽出処理され、その後、ステップP7で抽出
処理に基づいて9個の被演算データD1〜D9に係わり
再配列された最前部から5個の被演算データD1〜D5
の中の最大値Dmax が出力処理される。
As described above, according to the median value calculating method according to the second embodiment of the present invention, as shown in the processing flowchart of FIG. The minimum value Dmin is extracted according to the data D1 to D5, and then, at step P7, the five operands from the forefront rearranged according to the extraction data according to the nine data D1 to D9 are rearranged. Data D1 to D5
Is output.

【0104】このため、第1の実施例と同様に、従来例
に比べ、データ比較回数を低減することが可能となり、
その比較時間や比較量の低減化を図ることが可能とな
る。これにより、本発明に係るシフト分割法に基づい
て、その中央値を高速に演算することができ、データ比
較回数の低減化からデータ処理の高速化を図ることが可
能となる。
Therefore, as in the first embodiment, the number of data comparisons can be reduced as compared with the conventional example.
The comparison time and the amount of comparison can be reduced. Accordingly, the median value can be calculated at high speed based on the shift division method according to the present invention, and the data processing can be speeded up by reducing the number of data comparisons.

【0105】なお、本発明の第2の実施例では、メモリ
領域〜の最前部から被演算データDnの最小値Dmi
n を抽出する場合について説明をしたが、メモリ領域
〜の最後部から被演算データDnの最大値Dmin を抽
出しても同様な効果が得られる。
In the second embodiment of the present invention, the minimum value Dmi of the data Dn to be operated is
Although the case where n is extracted has been described, the same effect can be obtained by extracting the maximum value Dmin of the data Dn to be operated from the last part of the memory area.

【0106】[0106]

【発明の効果】以上説明したように、本発明のデータ処
理装置によれば、記憶手段,データ抽出手段,中央値出
力手段,補助記憶手段及び制御手段が具備され、該デー
タ抽出手段により記憶手段の読出し領域が順次変更され
る。
As described above, according to the data processing apparatus of the present invention, there are provided storage means, data extraction means, median value output means, auxiliary storage means, and control means. Are sequentially changed.

【0107】このため、被演算データの読出し領域の変
更とその最大値や最小値の交換に基づいて抽出された中
央値を中央値出力手段から出力するシフト分割法を実施
することが可能となる。このことで、画像処理や音声処
理分野において、ユーザの使用態様により取扱いデータ
量が増加した場合であっても、被演算データの中ら順
次,最大値や最小値を抽出する比較交換手段におけるデ
ータ比較回数が従来例に比べて少なくなる。また、それ
を構成するハードウエアの増加を最小限に留めることが
可能となる。
Therefore, it is possible to implement a shift division method in which the median value extracted based on the change of the readout area of the data to be operated and the exchange of the maximum value and the minimum value is output from the median value output means. . As a result, in the field of image processing and audio processing, even if the amount of data handled increases due to the usage of the user, the data in the comparison and exchange means for sequentially extracting the maximum value and the minimum value from the data to be operated on. The number of comparisons is smaller than in the conventional example. In addition, it is possible to minimize an increase in hardware constituting the system.

【0108】また、本発明のデータ処理方法によれば、
配列処理された最前部又は最後部からm+1個目までの
被演算データの中から最大値又は最小値が抽出処理され
ると、その最大値又は最小値と最前部又は最後部の被演
算データとが交換処理され、以後、被演算データの読出
し領域が順次変更され、これに基づいてその最大値又は
最小値が抽出処理され、その最大値又は最小値と順次変
更された読出し領域の最前部又は最後部の被演算データ
とが交換処理されている。
Further, according to the data processing method of the present invention,
When the maximum value or the minimum value is extracted from the m + 1-th processed data from the foremost part or the last part of the array processing, the maximum value or the minimum value and the foremost or last part of the processed data are extracted. Is exchanged, and thereafter, the read area of the data to be operated is sequentially changed, the maximum value or the minimum value is extracted based on this, and the maximum value or the minimum value is sequentially changed to the forefront of the read area or the read area that is sequentially changed. The data to be processed is exchanged with the last data.

【0109】このため、奇数個の被演算データに係わり
再配列された最前部又は最後部からm+1個の被演算デ
ータの中の最小値又は最大値の出力処理を含めて、従来
例に比べ、データ比較回数を低減することが可能とな
る。このことで、取扱いデータ量が増加した場合であっ
ても、従来例に比べて比較回数を約2/3に低減するこ
とが可能となり、その比較時間や比較量の低減化を図る
ことが可能となる。
For this reason, including the output processing of the minimum value or the maximum value of the m + 1 pieces of operation data from the frontmost or rearmost part rearranged with respect to the odd number of operation data, compared with the conventional example, It is possible to reduce the number of data comparisons. As a result, even when the amount of handled data increases, the number of comparisons can be reduced to about 2/3 as compared with the conventional example, and the comparison time and comparison amount can be reduced. Becomes

【0110】これにより、本発明に係るシフト分割法に
基づいて、その中央値を高速に演算することができ、演
算処理の高効率化が図られ、データ処理の高速化に寄与
するところが大きい。
As a result, the median value can be calculated at high speed based on the shift division method according to the present invention, and the efficiency of the arithmetic processing can be increased, which greatly contributes to speeding up the data processing.

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

【図1】本発明に係るデータ処理装置の原理図である。FIG. 1 is a principle diagram of a data processing device according to the present invention.

【図2】本発明に係るデータ処理方法の原理図である。FIG. 2 is a principle diagram of a data processing method according to the present invention.

【図3】本発明の第1の実施例に係る中央値演算装置の
構成図である。
FIG. 3 is a configuration diagram of a median value calculation device according to a first example of the present invention.

【図4】本発明の第1の実施例に係る中央値演算装置の
機能説明図である。
FIG. 4 is a functional explanatory diagram of the median value calculating device according to the first embodiment of the present invention.

【図5】本発明の第1の実施例に係る中央値演算の処理
フローチャートである。
FIG. 5 is a processing flowchart of a median value calculation according to the first embodiment of the present invention.

【図6】本発明の第1の実施例に係る中央値演算処理の
補足説明図(その1)である。
FIG. 6 is a supplementary explanatory diagram (part 1) of the median value calculation process according to the first embodiment of the present invention.

【図7】本発明の第1の実施例に係る中央値演算処理の
補足説明図(その2)である。
FIG. 7 is a supplementary explanatory diagram (part 2) of the median value calculation process according to the first embodiment of the present invention.

【図8】本発明の第1の実施例に係る中央値演算処理の
補足説明図(その3)である。
FIG. 8 is a supplementary explanatory diagram (part 3) of the median value calculation process according to the first embodiment of the present invention.

【図9】本発明の第2の実施例に係る中央値演算装置の
構成図である。
FIG. 9 is a configuration diagram of a median value calculation device according to a second example of the present invention.

【図10】本発明の第2の実施例に係る中央値演算装置の
機能説明図である。
FIG. 10 is an explanatory diagram of functions of a median value calculation device according to a second example of the present invention.

【図11】本発明の第2の実施例に係る中央値演算の処理
フローチャートである。
FIG. 11 is a processing flowchart of a median value calculation according to the second embodiment of the present invention.

【図12】本発明の第2の実施例に係る中央値演算処理の
補足説明図である。
FIG. 12 is a supplementary explanatory diagram of the median value calculation processing according to the second example of the present invention.

【図13】従来例に係る中央値演算装置の説明図である。FIG. 13 is an explanatory diagram of a median value calculation device according to a conventional example.

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

11…記憶手段、 12…データ抽出手段、 13…中央値出力手段、 14…補助記憶手段、 15…制御手段、 Ci…比較交換手段、 Dn〔n=2m+1〕…被演算データ。 11: storage means, 12: data extraction means, 13: median output means, 14: auxiliary storage means, 15: control means, Ci: comparison and exchange means, Dn [n = 2m + 1]: operated data.

Claims (7)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 奇数〔n=2m+1,m≧1〕個の被演
算データ(Dn)を順次記憶する記憶手段(11)と、
前記被演算データ(Dn)の中から中央値を含む被演算
データ(Dn)を抽出するデータ抽出手段(12)と、
前記抽出された被演算データ(Dn)の中央値を出力す
る中央値出力手段(13)とを具備し、前記データ抽出
手段(12)が記憶手段(11)の読出し領域を順次変
更することを特徴とするデータ処理装置。
A storage means (11) for sequentially storing odd [n = 2m + 1, m ≧ 1] pieces of operation data (Dn);
Data extraction means (12) for extracting operation data (Dn) including a median from the operation data (Dn);
Median value output means (13) for outputting a median value of the extracted data to be operated (Dn), wherein the data extraction means (12) sequentially changes the read area of the storage means (11). Characteristic data processing device.
【請求項2】 請求項1記載のデータ処理装置におい
て、前記データ抽出手段(12)が〔n+1〕/2個の
比較交換手段(Ci)から成り、前記比較交換手段(C
i)が最前部又は最後部からm+1個目までの被演算デ
ータ(Dn)を比較して、該被演算データ(Dn)の中
の最大値を抽出し、前記被演算データ(Dn)の最大値
と最前部又は最後部の被演算データ(Dn)とを交換す
ることを特徴とするデータ処理装置。
2. The data processing apparatus according to claim 1, wherein said data extracting means comprises [n + 1] / 2 comparison and exchange means (Ci), and said comparison and exchange means (Ci).
i) compares the (m + 1) -th data to be operated (Dn) from the foremost part or the last part, extracts the maximum value among the data to be operated (Dn), and calculates the maximum value of the data to be processed (Dn). A data processing device for exchanging a value with the foremost or last data to be operated (Dn).
【請求項3】 請求項2記載のデータ処理装置におい
て、前記比較交換手段(Ci)が最前部又は最後部から
m+1個目までの被演算データ(Dn)を比較して、該
被演算データ(Dn)の中の最小値を抽出し、前記被演
算データ(Dn)の最小値と最前部又は最後部の被演算
データ(Dn)とを交換することを特徴とするデータ処
理装置。
3. The data processing device according to claim 2, wherein the comparison and exchange means (Ci) compares the (m + 1) th data to be operated (Dn) from the foremost part or the last part to obtain the data to be operated on (Dn). Dn), wherein the minimum value of the data to be processed (Dn) is extracted and the minimum value of the data to be processed (Dn) is exchanged with the foremost or last data to be processed (Dn).
【請求項4】 請求項1,2及び3記載のデータ処理装
置において、前記抽出された被演算データ(Dn)を一
次記憶する補助記憶手段(14)が設けられることを特
徴とするデータ処理装置。
4. A data processing apparatus according to claim 1, further comprising an auxiliary storage means for temporarily storing said extracted data to be processed (Dn). .
【請求項5】 請求項1,2,3及び4記載のデータ処
理装置において、前記記憶手段(11),データ抽出手
段(12),中央値出力手段(13)及び補助記憶手段
(14)の入出力を制御する制御手段(15)が設けら
れることを特徴とするデータ処理装置。
5. A data processing apparatus according to claim 1, wherein said storage means (11), data extraction means (12), median value output means (13) and auxiliary storage means (14). A data processing device provided with control means (15) for controlling input / output.
【請求項6】 奇数〔n=2m+1,m≧1〕個の被演
算データ(Dn)の配列処理をし、前記配列処理された
最前部又は最後部からm+1個目までの被演算データ
(Dn)の中から最大値の抽出処理をし、前記被演算デ
ータ(Dn)の最大値と最前部又は最後部の被演算デー
タ(Dn)との交換処理をし、以後、前記被演算データ
(Dn)の読出し領域を順次変更して、該被演算データ
(Dn)の最大値の抽出処理をし、前記被演算データ
(Dn)の最大値と順次変更された読出し領域の最前部
又は最後部の被演算データ(Dn)との交換処理をし、
前記奇数個の被演算データ(Dn)に係わり再配列され
た最前部又は最後部からm+1個の被演算データ(D
n)の中の最小値の出力処理をすることを特徴とするデ
ータ処理方法。
6. Arrangement processing of odd [n = 2m + 1, m ≧ 1] pieces of operation data (Dn) is performed, and the m + 1-th operation data (Dn) from the foremost or last part of the array processing is processed. ), The maximum value of the data to be operated (Dn) is exchanged with the foremost or last data to be operated (Dn), and thereafter the data to be operated (Dn) is exchanged. ) Is sequentially changed, the maximum value of the data to be operated (Dn) is extracted, and the maximum value of the data to be operated (Dn) and the forefront or last part of the sequentially changed read area are changed. Exchange processing with the operated data (Dn)
M + 1 pieces of data (Dn) from the forefront or rearmost rearranged with respect to the odd number of pieces of data (Dn)
a data processing method for performing output processing of a minimum value in n).
【請求項7】 請求項6記載のデータ処理方法におい
て、前記被演算データ(Dn)の配列処理の後に、該配
列処理された最前部又は最後部からm+1個目までの被
演算データ(Dn)に係わり最小値の抽出処理をし、前
記抽出処理に基づいて奇数個の被演算データ(Dn)に
係わり再配列された最前部又は最後部からm+1個の被
演算データ(Dn)の中の最大値の出力処理することを
特徴とするデータ処理方法。
7. The data processing method according to claim 6, wherein after the array processing of the data to be operated (Dn), the data to be operated (Dn) from the foremost part or the last part of the array processing to the (m + 1) -th element , The minimum value is extracted, and the maximum of m + 1 pieces of operation data (Dn) from the frontmost or rearmost part rearranged according to the odd number of operation data (Dn) based on the extraction processing. A data processing method characterized by performing value output processing.
JP11378892A 1992-05-06 1992-05-06 Data processing apparatus and control method thereof Expired - Fee Related JP3320767B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11378892A JP3320767B2 (en) 1992-05-06 1992-05-06 Data processing apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11378892A JP3320767B2 (en) 1992-05-06 1992-05-06 Data processing apparatus and control method thereof

Publications (2)

Publication Number Publication Date
JPH05313855A JPH05313855A (en) 1993-11-26
JP3320767B2 true JP3320767B2 (en) 2002-09-03

Family

ID=14621114

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11378892A Expired - Fee Related JP3320767B2 (en) 1992-05-06 1992-05-06 Data processing apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP3320767B2 (en)

Also Published As

Publication number Publication date
JPH05313855A (en) 1993-11-26

Similar Documents

Publication Publication Date Title
JP3584053B2 (en) Mask for selecting multi-bit elements in compound operands
JP4339381B2 (en) Shared memory multiprocessor system and information processing method thereof
EP2017743A2 (en) High speed and efficient matrix multiplication hardware module
WO2021232422A1 (en) Neural network arithmetic device and control method thereof
JPH0944356A (en) Processor and data processing device
US6598061B1 (en) System and method for performing modular multiplication
JP3320767B2 (en) Data processing apparatus and control method thereof
CN112639836A (en) Data processing device, electronic equipment and data processing method
JP3593439B2 (en) Image processing device
US7058787B2 (en) Method and circuit for generating memory addresses for a memory buffer
JP7797522B2 (en) Data compressor for matrix approximation for matrix multiplication operations
KR100732426B1 (en) Computer with high-speed context switching
JP2002269067A (en) Matrix arithmetic unit
JP3305406B2 (en) Program-controlled processor
JP2007183712A (en) Data-driven information processing device
CN116136894B (en) Data processing method based on matrix processor and readable storage medium
JP5072558B2 (en) Data processing device
JP3264114B2 (en) Sorting device
JP2889244B2 (en) Image processing device
JP3088956B2 (en) Arithmetic unit
JP2959497B2 (en) Data processing device and data processing method
JP3324501B2 (en) Arithmetic processing device using parallel operation by divided ALU system, filter calculation method, and recording medium
EP1197874A1 (en) Signal processor and product-sum operating device for use therein with rounding function
US20050240643A1 (en) DCT processor used for implementing discrete cosine transform (DCT)
CN120687064A (en) A large integer multiplication optimization method

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: 20020611

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090621

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees