JPH05128253A - Two-dimensional sequence filter circuit - Google Patents

Two-dimensional sequence filter circuit

Info

Publication number
JPH05128253A
JPH05128253A JP3286075A JP28607591A JPH05128253A JP H05128253 A JPH05128253 A JP H05128253A JP 3286075 A JP3286075 A JP 3286075A JP 28607591 A JP28607591 A JP 28607591A JP H05128253 A JPH05128253 A JP H05128253A
Authority
JP
Japan
Prior art keywords
pixel
value
pixel data
circuit
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP3286075A
Other languages
Japanese (ja)
Other versions
JP2587555B2 (en
Inventor
Hideki Yoneda
秀樹 米田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JFE Steel Corp
Original Assignee
Kawasaki Steel Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP3286075A priority Critical patent/JP2587555B2/en
Publication of JPH05128253A publication Critical patent/JPH05128253A/en
Application granted granted Critical
Publication of JP2587555B2 publication Critical patent/JP2587555B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Picture Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To exactly extract desired picture data by a small scale circuit constitution by arranging the picture data in each partial area in the order of a picture value by a one-dimensional sorter circuit, and comparing the maximum values or the minimum values in the plural partial areas by a prescribed number of times. CONSTITUTION:The picture data having a central value are selected from an area 20 constituted of total 9 picture elements of three picture elements in the direction and three picture elements in the column direction. The three picture data are arranged in the order of the picture value by a one dimensional sorter circuit 11, and latched by a latch circuit. The maximum values of the picture data latched by the three latch circuits 12, 13, and 14 are detected by a maximum value detecting circuit 15. Then, while the maximum values are counted by a counter 16, they are pushed out only by the necessary number of times by a shift circuit. Therefore, for example, the desired data such as the some number-th data from the maximum value can be exactly detected.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、行方向および列方向に
それぞれ多数並ぶ多数の画素から構成される2次元画像
上の、行方向、列方向にそれぞれ複数個並ぶ画素から構
成される領域内の各画素にそれぞれ対応する各画素デー
タを画素値順に並べた際に最大値側もしくは最小値側か
ら所定の順位にある画素データを選択する操作を、上記
領域を順次移動しながら前記2次元画像上の全域に亘っ
て行なう2次元順序フィルタ回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a two-dimensional image composed of a large number of pixels arranged in a row direction and a large number of pixels arranged in a column direction in an area composed of a plurality of pixels arranged in each of the row direction and the column direction. The operation of selecting the pixel data in a predetermined order from the maximum value side or the minimum value side when arranging each pixel data corresponding to each pixel in the order of pixel value The present invention relates to a two-dimensional order filter circuit that is performed over the entire area above.

【0002】[0002]

【従来の技術】例えば2次元画像上の所定領域内の複数
の画素データの中から中央値を有する画素データをピッ
クアップするいわゆるメジアンフィルタ等、2次元画像
上の所定領域内の画素データを画素値に並べることを要
する2次元順序フィルタが画像処理の分野で多用されて
おり、ハードウェア化に適した2次元順序フィルタを実
現するアルゴリズムも種々提案されている。
2. Description of the Related Art For example, a so-called median filter for picking up pixel data having a median value from a plurality of pixel data in a predetermined area on a two-dimensional image, pixel data in a predetermined area on a two-dimensional image, etc. A two-dimensional ordered filter that needs to be lined up is frequently used in the field of image processing, and various algorithms for realizing a two-dimensional ordered filter suitable for hardware have been proposed.

【0003】図3は、2次元順序フィルタを実現するア
ルゴリズムの一例である、いわゆるオッド・イーブン・
ソート(Odd-Even-Sort) の説明図である(「Design and
Implementation of a General-Purpose Median FilterU
nit in CMOS VLSI 」MUSTAFA KARAMAN, LEVENT ONURAL,
ABDULLAH ATALAR, GOURNAL OF SOLID-STATECIRCUITS,
VOL.25, NO.2. APRIL 1990, P505〜P513 参照)。ここ
では9個のデータをその値順に並べる場合について説明
する。
FIG. 3 is an example of an algorithm for realizing a two-dimensional ordered filter, so-called odd-even-type.
It is an explanatory view of sort (Odd-Even-Sort).
Implementation of a General-Purpose Median FilterU
nit in CMOS VLSI '' MUSTA FA KARAMAN, LEVENT ONURAL,
ABDULLAH ATALAR, GOURNAL OF SOLID-STATECIRCUITS,
VOL.25, NO.2. APRIL 1990, P505 to P513). Here, a case where 9 pieces of data are arranged in the order of their values will be described.

【0004】図に示す多数の各ブロック10は、それぞ
れに入力された2つのデータの値を比較し、値の大きな
データを左側の出力端子から出力し値の小さなデータを
右側の出力端子から出力する、例えばコンパレータとマ
ルチプレクサとの組合せからなる回路ブロックである。
例えばこのアルゴリズムを採用して最大値側から5番目
のデータを選択すればメジアルフィルタが実現される。
A large number of blocks 10 shown in the figure compare the values of two data respectively inputted, and output the data having a large value from the output terminal on the left side and the data having a small value from the output terminal on the right side. The circuit block is composed of, for example, a combination of a comparator and a multiplexer.
For example, if this algorithm is adopted and the fifth data from the maximum value side is selected, a medial filter is realized.

【0005】[0005]

【発明が解決しようとする課題】しかし、上記のアルゴ
リズムを用いた2次元順序フィルタをハードウェア化す
ると、9つのデータをその値順に並べ換えるために図3
に示す各ブロック10に相当する回路を36個も備える
必要があり、回路規模が大きくなってしまうという問題
がある。
However, if the two-dimensional order filter using the above algorithm is implemented in hardware, nine pieces of data are rearranged in the order of their values.
It is necessary to provide as many as 36 circuits corresponding to the respective blocks 10 shown in (1), which causes a problem that the circuit scale becomes large.

【0006】回路規模の小さなメジアンフィルタを実現
するアルゴリズムとして以下のものが知られている(特
開平1−116887号公報 参照)。図4は、このメ
ジアンフィルタを実現するアルゴリズムの説明図であ
る。この図において、図に示す各升目が各画素に対応
し、その中に記された数字がその画素の画素データの画
素値であるとする。
The following algorithms are known as algorithms for realizing a median filter having a small circuit scale (see Japanese Patent Laid-Open No. 1-116887). FIG. 4 is an explanatory diagram of an algorithm that realizes this median filter. In this figure, it is assumed that each square shown in the figure corresponds to each pixel, and the number written therein is the pixel value of the pixel data of that pixel.

【0007】図4(a)に示す縦横に3画素ずつ合計9
画素を図4(b)に示すように各列毎に分け、各列内の
各3つの画素データのうちの各中央値(図3(b)に丸
印を付した数字)を検出する。次にこのようにして検出
された3つの中央値のうちからさらに中央値を検出す
る。この場合、各列内の3つの画素データのうちの各中
央値を検出するために各2つのコンパレータが必要と
し、3つの中央値のうちからさらに中央値を検出するた
めに2つのコンパレータが必要とし、したがって合計8
個のコンパレータを備えるだけで9つの画素データの中
央値を検出することができる。
A total of 9 pixels each including 3 pixels vertically and horizontally as shown in FIG.
The pixels are divided into columns as shown in FIG. 4B, and the median value (the number circled in FIG. 3B) of each of the three pixel data in each column is detected. Next, a median value is further detected from the three median values thus detected. In this case, two comparators are required to detect each median value of the three pixel data in each column, and two comparators are required to detect the median value from among the three median values. And therefore a total of 8
It is possible to detect the median value of the nine pixel data only by providing the number of comparators.

【0008】但し、このアルゴリズムでは正しい中央値
を検出することができない場合があり、例えばこの図4
に示した例では、真の中央値は「5」であるにも拘らず
「4」が検出されてしまう結果となる。本発明は、上記
事情に鑑み、小さな回路規模で実現されるとともに所望
とするデータを正しく検出することのできる2次元順序
フィルタ回路を提供することを目的とする。
However, there are cases where the correct median value cannot be detected by this algorithm.
In the example shown in, the result is that although the true median value is "5", "4" is detected. In view of the above circumstances, it is an object of the present invention to provide a two-dimensional order filter circuit which can be realized with a small circuit scale and can correctly detect desired data.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
の本発明の第1の2次元順序フィルタ回路は、行方向お
よび列方向にそれぞれ多数並ぶ多数の画素から構成され
る2次元画像上の、行方向にN1個、列方向にN2個並
ぶN1×N2個の画素から構成される領域内の各画素に
それぞれ対応する各画素データを画素値順に最大値側か
ら並べた際に該最大値から所定の順位にある画素データ
を選択する操作を、上記領域を順次移動しながら2次元
画像上の全域に亘って行なう2次元順序フィルタ回路に
おいて、 (1)上記領域内の、行方向に1個、列方向にN2個並
ぶN2個の画素からなる部分領域内の各画素に対応する
各画素データを画素値順に並べ換える操作を該各部分領
域毎に順次行なう1次元ソータ回路 (2)該1次元ソータ回路により画素値順に並べられた
上記各部分領域に対応するN2個の画素データを画素値
順に記憶しておく、上記各部分領域毎に備えられたN1
個のラッチ回路 (3)該N1個のラッチ回路に記憶された画素データ
の、該各ラッチ回路毎の最大値どおしを比較してこれら
N1個の最大値中の最大値を検出する最大値検出回路 (4)該最大値検出回路で検出された最大値を有する画
素データが記憶されたラッチ回路に記憶されているN2
個の画素データを、大きな画素値を有する画素データ側
に1つずつシフトして該ラッチ回路に記憶された画素デ
ータ中の最小値を有する画素データの後段に画素データ
中の最小値を有するデータあるいは画素データと区別さ
れる値を有するデータを記憶させる、上記N1個のラッ
チ回路のそれぞれに付随して備えられたN1個のシフト
回路 (5)上記最大値検出回路において最大値を検出し上記
シフト回路において画素データをシフトするルーチンの
回数をカウントするカウンタの各要素を備えたことを特
徴とするものである。
A first two-dimensional order filter circuit of the present invention for achieving the above object is provided on a two-dimensional image composed of a large number of pixels arranged in the row direction and the column direction. , When the pixel data corresponding to each pixel in an area formed by N1 × N2 pixels arranged in the row direction and N2 arranged in the column direction are arranged in the pixel value order from the maximum value side, the maximum value In a two-dimensional order filter circuit that performs the operation of selecting pixel data in a predetermined order from the whole area on a two-dimensional image while sequentially moving the area, (1) 1 in the row direction in the area A one-dimensional sorter circuit for sequentially performing, for each of the partial regions, an operation of rearranging each pixel data corresponding to each pixel in the partial region consisting of N2 pixels arranged in the column direction and N2 in the column direction (2) For one-dimensional sorter circuit N1 provided for each of the partial areas, in which N2 pieces of pixel data corresponding to the partial areas arranged in the order of pixel values are stored in the pixel value order.
Latch circuits (3) The maximum value of the pixel data stored in the N1 latch circuits is compared with the maximum value of each of the latch circuits to detect the maximum value among these N1 maximum values. Value detection circuit (4) N2 stored in the latch circuit in which the pixel data having the maximum value detected by the maximum value detection circuit is stored
This pixel data is shifted to the pixel data side having a large pixel value one by one, and the pixel data having the minimum value in the pixel data stored in the latch circuit is followed by the data having the minimum value in the pixel data. Alternatively, N1 shift circuits provided in association with each of the N1 latch circuits for storing data having a value different from the pixel data (5) detect the maximum value in the maximum value detection circuit, and In the shift circuit, each element of a counter for counting the number of routines for shifting pixel data is provided.

【0010】また本発明の第2の2次元順序フィルタ回
路は、行方向および列方向にそれぞれ多数並ぶ多数の画
素から構成される2次元画像上の、行方向にN1個、列
方向にN2個並ぶN1×N2個の画素から構成される領
域内の各画素にそれぞれ対応する各画素データを画素値
順に最小値側から並べた際に該最小値から所定の順位に
ある画素データを選択する操作を、上記領域を順次移動
しながら2次元画像上の全域に亘って行なう2次元順序
フィルタ回路において、 (6)上記領域内の、行方向に1個、列方向にN2個並
ぶN2個の画素からなる部分領域内の各画素に対応する
各画素データを画素値順に並べ換える操作を該各部分領
域毎に順次行なう1次元ソータ回路 (7)該1次元ソータ回路により画素値順に並べられた
上記各部分領域に対応するN2個の画素データを画素値
順に記憶しておく、上記各部分領域毎に備えられたN1
個のラッチ回路 (8)該N1個のラッチ回路に記憶された画素データ
の、該各ラッチ回路毎の最小値どおしを比較してこれら
N1個の最小値中の最小値を検出する最小値検出回路 (9)該最小値検出回路で検出された最小値を有する画
素データが記憶されたラッチ回路に記憶されているN2
個の画素データを、小さな画素値を有する画素データ側
に1つずつシフトして該ラッチ回路に記憶された画素デ
ータ中の最大値を有する画素データの後段に画素データ
中の最大値を有するデータあるいは画素データと区別さ
れる値を有するデータを記憶させる、上記N1個のラッ
チ回路のそれぞれに付随して備えられたN1個のシフト
回路 (10)上記最小値検出回路において最小値を検出し上
記シフト回路において画素データをシフトするルーチン
の回数をカウントするカウンタの各要素を備えたことを
特徴とするものである。
The second two-dimensional order filter circuit according to the present invention has N1 in the row direction and N2 in the column direction on a two-dimensional image composed of a large number of pixels arranged in the row direction and the column direction. An operation of selecting pixel data in a predetermined order from the minimum value when the pixel data corresponding to each pixel in the area formed by N1 × N2 pixels arranged in order is arranged from the minimum value side in the pixel value order. In a two-dimensional order filter circuit for performing the entire area on a two-dimensional image while sequentially moving the area, (6) N2 pixels arranged in the row direction and one in the row direction and N2 in the column direction. A one-dimensional sorter circuit for sequentially performing an operation of rearranging each pixel data corresponding to each pixel in the partial area consisting of the pixel values in order of the pixel values. (7) The one-dimensional sorter circuit arranged in the order of pixel values. Each section N1 provided for each of the partial areas, in which N2 pieces of pixel data corresponding to the areas are stored in the order of pixel values.
Latch circuits (8) The minimum value of the pixel data stored in the N1 latch circuits is compared with the minimum value of each latch circuit to detect the minimum value among these N1 minimum values. Value detection circuit (9) N2 stored in the latch circuit in which the pixel data having the minimum value detected by the minimum value detection circuit is stored
Data having the maximum value in the pixel data is provided after the pixel data having the maximum value in the pixel data stored in the latch circuit by shifting the pixel data one by one to the pixel data side having the small pixel value. Alternatively, N1 shift circuits provided in association with each of the N1 latch circuits for storing data having a value different from the pixel data (10) detect the minimum value in the minimum value detection circuit, and In the shift circuit, each element of a counter for counting the number of routines for shifting pixel data is provided.

【0011】ここで上記「行方向」および「列方向」
は、画像を単にどのように配置するかというだけの問題
であり、したがっていずれの方向を行方向もしくは列方
向とみなしてもよいことはもちろんである。また、上記
シフト回路はラッチ回路に記憶されたデータを物理的、
電気的にシフトする回路である必要はなく、例えばメモ
リ回路のリードポインタ、ライトポインタを指示する回
路等であってもよい。また、ラッチ回路に記憶されたデ
ータがシフト回路により現実にシフトされ、このシフト
により最初のデータが失なわれるように構成する場合
は、1次元ソータ回路から出力された、ラッチ回路に最
初に記憶される画素データを保存しておくことが好まし
い。
Here, the above "row direction" and "column direction"
Is, of course, just a matter of how the images are arranged, and thus it goes without saying that either direction may be considered as the row direction or the column direction. Further, the shift circuit physically stores data stored in the latch circuit,
The circuit need not be an electrically shifting circuit, and may be, for example, a circuit that instructs a read pointer or a write pointer of a memory circuit. When the data stored in the latch circuit is actually shifted by the shift circuit and the first data is lost due to this shift, the first data stored in the latch circuit output from the one-dimensional sorter circuit is first stored. It is preferable to store the pixel data to be stored.

【0012】[0012]

【作用】本発明の2次元順序フィルタは、上記1次元ソ
ータ回路(上記(1),(6))により各画素データを
画素値順に並べ換えてラッチ(上記(2),(7))し
ておき、最大値検出回路(上記(3))ないし最小値検
出回路(上記(7))により最大値ないし最小値を検出
してその最大値ないし最小値をカウンタ(上記(5),
(10))でカウントしながらシフト回路(上記
(4),(9))により必要回数だけ押し出すように構
成したものであるため、小さな回路規模で、例えば中央
値、最大値から3番目のデータ等所望とするデータを正
しく検出することができる。
In the two-dimensional order filter of the present invention, each pixel data is rearranged in the order of pixel value by the one-dimensional sorter circuit ((1), (6)) and latched ((2), (7)). Every time, the maximum value detection circuit (above (3)) or the minimum value detection circuit (above (7)) detects the maximum value or minimum value, and the maximum value or minimum value is counted by the counter (above (5),
Since the shift circuit ((4), (9) above) is configured to push out the necessary number of times while counting in (10), the circuit size is small, for example, the third data from the median value and the maximum value. It is possible to correctly detect desired data.

【0013】ちなみに、前述した従来例と同様にN1=
3,N2=3,即ち9画素中から中央値(最大値もしく
は最小値から5番目の値を有する画素データ)を抽出す
る場合を例にとると、2つのデータの大小を判定する回
数は、1次元コンパレータで2回、最大値検出回路ない
し最小値検出回路で2回×5回、合計12回の比較で済
み、図3に示すオッド・イーブン・ソートの36回と比
べ1/3で済むこととなる。また、図4を用いて説明し
たアルゴリズムと比べ、正確な中央値を求めることがで
きることとなる。
Incidentally, N1 =
3, N2 = 3, that is, when the median value (pixel data having the fifth value from the maximum value or the minimum value) is extracted from 9 pixels as an example, the number of times of determining the magnitude of two data is A one-dimensional comparator requires two comparisons, a maximum value detection circuit or a minimum value detection circuit performs two times × 5 times, a total of 12 times, which is 1/3 of the 36 times of odd-even sort shown in FIG. It will be. In addition, an accurate median value can be obtained as compared with the algorithm described with reference to FIG.

【0014】[0014]

【実施例】以下、本発明の実施例について説明する。図
1は、本発明の第1の2次元順序フィルタ回路の一実施
例である、3×3=9画素の中から中央値を選び出すよ
うに構成された回路のアルゴリズムを示した図、図2
は、図1におけるデータの移動を表わした模式図であ
る。
EXAMPLES Examples of the present invention will be described below. FIG. 1 is a diagram showing an algorithm of a circuit configured to select a median value from 3 × 3 = 9 pixels, which is an embodiment of the first two-dimensional ordered filter circuit of the present invention.
FIG. 3 is a schematic diagram showing the movement of data in FIG. 1.

【0015】行方向Aおよび列方向Bにそれぞれ多数並
ぶ多数の画素Pから構成される2次元画像上に、行方向
に3個、列方向にも3個並ぶ合計9個の画素からなる領
域20に、図に示すような画素値を有する画素データが
対応しているものとする。ここではこれら9個の画素デ
ータの中から中央値を有する画素データが選び出され
る。
On a two-dimensional image composed of a large number of pixels P arranged in a row direction A and a large number of pixels P in a column direction B, a region 20 consisting of a total of nine pixels arranged in the row direction and three in the column direction is arranged. It is assumed that the pixel data having pixel values as shown in FIG. Here, pixel data having a median value is selected from these nine pieces of pixel data.

【0016】前々回に1次元ソータ11に入力され、行
方向に1つ、列方向に3つ並ぶ、‘25’,‘6’,
‘1’の各画素値を有する3つの画素からなる部分領域
20aの画素データが、これらの画素データの画素値の
大小が判定され、ラッチ回路12に図の下側から順に最
大値‘25’,中央値‘6’,最小値‘1’がラッチさ
れている。また同様にして前回に1次元ソータ11に入
力された、その次の‘31’,‘5’,‘7’の各画素
値を有する3つの画素からなる部分領域20bの画素デ
ータがラッチ回路13にラッチされている。
"25", "6", which are input to the one-dimensional sorter 11 two times before and are arranged one in the row direction and three in the column direction.
Regarding the pixel data of the partial area 20a composed of three pixels having each pixel value of "1", the magnitude of the pixel value of these pixel data is determined, and the maximum value "25" is sequentially given to the latch circuit 12 from the bottom of the figure. , The median value "6" and the minimum value "1" are latched. Similarly, the pixel data of the partial area 20b consisting of three pixels having the subsequent pixel values of "31", "5", and "7", which were input to the one-dimensional sorter 11 last time, are latched by the latch circuit 13. Is latched to.

【0017】その状態において、今回は、やはり同様に
して‘2’,‘3’,‘9’の各画素値を有する3つの
画素からなる部分領域20cのデータが1次元ソータに
入力されその大小が判定されてラッチ回路14にラッチ
される。このようにしてラッチ回路12,13,14に
各部分領域20a,20b,20cの画素データがラッ
チされると、各ラッチ回路12,13,14の各最大値
‘9’,‘31’,‘25’の大小が比較判定される。
ここではラッチ回路13にラッチされていた‘31’が
最大であるため、図2(a)に示すようにラッチ回路1
3から画素値31を有する画素データが押し出され、ラ
ッチ回路13の図2(a)の最上部に、この2次元順序
フィルタ回路で取り扱われる数値の最小値である‘0’
がラッチされる。この最大値検出回路15による最大値
の検出、およびラッチ回路13によるデータの移動が行
なわれたことにより、カウンタ16が1だけカウントア
ップされる。
In this state, this time, similarly, the data of the partial area 20c consisting of three pixels having the pixel values of "2", "3", and "9" is input to the one-dimensional sorter, and the size of the data is changed. Is determined and latched in the latch circuit 14. When the pixel data of the partial regions 20a, 20b, 20c are latched in the latch circuits 12, 13, 14 in this manner, the maximum values' 9 ',' 31 ',' of the latch circuits 12, 13, 14 are latched. The size of 25 'is compared and judged.
Here, since "31" latched by the latch circuit 13 is the maximum, as shown in FIG.
Pixel data having a pixel value 31 is pushed out from 3, and at the top of the latch circuit 13 in FIG.
Is latched. The detection of the maximum value by the maximum value detection circuit 15 and the movement of the data by the latch circuit 13 cause the counter 16 to count up by one.

【0018】次に最大値検出回路15により、各ラッチ
回路12,13,14の最大値どおし、即ち今度は
‘9’,‘7’,‘25’が比較されて、そのうちの最
大値‘25’が検出され、図2(b)に示すように今度
はラッチ回路12にラッチされたデータが移動され、カ
ウンタ16がカウントアップされて2となる。以上の動
作を繰り返しカウンタ16が5となった時に押し出され
た画素データ‘6’がこの領域20に対応する中央値と
なる。
Next, the maximum value detection circuit 15 compares the maximum values of the latch circuits 12, 13, 14 with each other, that is, "9", "7", and "25" this time, and the maximum value among them is compared. When "25" is detected, the data latched in the latch circuit 12 is moved this time, and the counter 16 counts up to 2 as shown in FIG. The above operation is repeated and the pixel data '6' pushed out when the counter 16 reaches 5 becomes the median value corresponding to this area 20.

【0019】次に領域21の中央値の検出を行なうため
に、部分領域21cの3つの画素データが1次元ソータ
11に入力される。例えば部分領域20cが3つの領域
20,21,22に属するように、各部分領域はそれぞ
れ3つの領域に属し、したがって1次元ソータ11を経
由したデータは、上記のデータ移動により消去されない
ように保存してさえおけば3領域の中央値の検出に用い
ることができる。したがって1つの領域内の中央値を検
出するための2つのデータの比較回数は、1次元ソータ
で2回、最大値検出回路15で2回×繰り返し数5回の
合計12回で済み、しかも中央値を正確に検出すること
ができる。
Next, in order to detect the median of the area 21, three pixel data of the partial area 21c are input to the one-dimensional sorter 11. For example, each partial area belongs to three areas such that the partial area 20c belongs to three areas 20, 21 and 22. Therefore, the data passed through the one-dimensional sorter 11 is stored so as not to be erased by the above data movement. If so, it can be used to detect the median value of the three regions. Therefore, the number of comparisons of the two data for detecting the median value in one area is 2 times with the one-dimensional sorter and 2 times with the maximum value detection circuit 15 × 5 times in total, which is a total of 12 times. The value can be detected accurately.

【0020】尚、上記実施例は、本発明の第1の2次元
順序フィルタ回路の一実施例であるが、3つのラッチ回
路12,13,14に、図の下側に値の小さい画素デー
タが配列されるようにラッチし、最大値検出回路15に
代えて最小値検出回路を備え、各ラッチ回路12,1
3,14の、図の上方から入力する値‘0’に代えてこ
の2次元順序フィルタ回路で取り扱うことのできる最大
の値等を入力するように構成することにより、本発明の
第2の2次元順序フィルタ回路の一実施例が構成され
る。この実施例における動作は上記とほぼ同様に説明さ
れるため、ここではその図示および説明は省略する。
The above embodiment is one embodiment of the first two-dimensional order filter circuit of the present invention, but the three latch circuits 12, 13, 14 are provided with pixel data having a small value on the lower side of the figure. Are arranged so that the maximum value detection circuit 15 is replaced by a minimum value detection circuit, and each latch circuit 12, 1
The second and third aspects of the present invention are configured by inputting the maximum value or the like that can be handled by this two-dimensional order filter circuit in place of the value "0" input from the upper part of the figure of 3,14. An embodiment of a dimensional ordered filter circuit is constructed. The operation in this embodiment is almost the same as that described above, and therefore its illustration and description are omitted here.

【0021】また、上記実施例は行方向、列方向にそれ
ぞれ3画素ずつ並ぶ合計9画素からなる領域内の中央値
を検出する回路であるが、本発明は行方向に任意の数N
1個、列方向にも任意の数N2個並ぶN1×N2画素の
領域内の、最大値もしくは最小値から任意の順位にある
画素データを検出する場合に採用することができるもの
である。
Further, the above embodiment is a circuit for detecting the median value in an area consisting of a total of 9 pixels in which 3 pixels are arranged in each of the row direction and the column direction. However, the present invention is an arbitrary number N in the row direction.
This can be adopted when detecting pixel data in an arbitrary order from the maximum value or the minimum value in an area of N1 × N2 pixels in which one N2 arranged in an arbitrary number N2 in the column direction.

【0022】[0022]

【発明の効果】以上説明したように、本発明の2次元順
序フィルタ回路は、1次元ソータ回路により各部分領域
内の画素データをその画素値順に並べ、複数の部分領域
内の最大値どおしもしくは最小値どおしを所定回数に亘
って比較するように構成したものであるため、小規模の
回路構成で、しかも所望とする画素データを正確に抽出
することができる。
As described above, the two-dimensional order filter circuit of the present invention arranges the pixel data in each partial area in the order of the pixel value by the one-dimensional sorter circuit to set the maximum value in the plurality of partial areas. However, since the minimum value is compared with a predetermined number of times, the desired pixel data can be accurately extracted with a small-scale circuit configuration.

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

【図1】本発明の第1の2次元順序フィルタ回路の一実
施例である。
FIG. 1 is an embodiment of a first two-dimensional order filter circuit of the present invention.

【図2】図1におけるデータの移動を表わした模式図で
ある。
FIG. 2 is a schematic diagram showing the movement of data in FIG.

【図3】2次元順序フィルタを実現するアルゴリズムの
一例である、いわゆるオッド・イーブン・ソートの説明
図である。
FIG. 3 is an explanatory diagram of so-called odd-even sorting, which is an example of an algorithm that realizes a two-dimensional ordered filter.

【図4】従来のメジアンフィルタを実現するアルゴリズ
ムの説明図である。
FIG. 4 is an explanatory diagram of an algorithm that realizes a conventional median filter.

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

11 1次元ソータ 12,13,14 ラッチ回路 15 最大値検出回路 16 カウンタ 11 1-dimensional sorter 12, 13, 14 Latch circuit 15 Maximum value detection circuit 16 Counter

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 行方向および列方向にそれぞれ多数並ぶ
多数の画素から構成される2次元画像上の、行方向にN
1個、列方向にN2個並ぶN1×N2個の画素から構成
される領域内の各画素にそれぞれ対応する各画素データ
を画素値順に最大値側から並べた際に該最大値から所定
の順位にある画素データを選択する操作を、前記領域を
順次移動しながら前記2次元画像上の全域に亘って行な
う2次元順序フィルタ回路において、 前記領域内の、行方向に1個、列方向にN2個並ぶN2
個の画素からなる部分領域内の各画素に対応する各画素
データを画素値順に並べ換える操作を該各部分領域毎に
順次行なう1次元ソータ回路と、 該1次元ソータ回路により画素値順に並べられた前記各
部分領域に対応するN2個の画素データを画素値順に記
憶しておく、前記各部分領域毎に備えられたN1個のラ
ッチ回路と、 該N1個のラッチ回路に記憶された画素データの、該各
ラッチ回路毎の最大値どおしを比較してこれらN1個の
最大値中の最大値を検出する最大値検出回路と、 該最大値検出回路で検出された最大値を有する画素デー
タが記憶されたラッチ回路に記憶されているN2個の画
素データを、大きな画素値を有する画素データ側に1つ
ずつシフトして該ラッチ回路に記憶された画素データ中
の最小値を有する画素データの後段に画素データ中の最
小値を有するデータもしくは画素データと区別される値
を有するデータを記憶させる、前記N1個のラッチ回路
のそれぞれに付随して備えられたN1個のシフト回路
と、 前記最大値検出回路において最大値を検出し前記シフト
回路において画素データをシフトするルーチンの回数を
カウントするカウンタとを備えたことを特徴とする2次
元順序フィルタ回路。
1. An N in the row direction on a two-dimensional image composed of a large number of pixels arranged in the row direction and the column direction.
When each pixel data corresponding to each pixel in the area composed of one pixel and N2 pixels arranged in the column direction is arranged from the maximum value side in the pixel value order, the predetermined order is given from the maximum value. In a two-dimensional order filter circuit that performs the operation of selecting the pixel data in the area over the entire area of the two-dimensional image while sequentially moving the area, one in the row direction and N2 in the column direction in the area. N2 lined up
A one-dimensional sorter circuit for sequentially performing an operation for rearranging each pixel data corresponding to each pixel in a partial region consisting of a plurality of pixels in the order of pixel value; and a one-dimensional sorter circuit for rearranging the pixel data in order of pixel value. Further, N1 latch circuits provided for each of the partial regions and N2 pixel data stored in the N1 latch circuits for storing N2 pixel data corresponding to each of the partial regions in order of pixel value. A maximum value detection circuit for detecting the maximum value among these N1 maximum values by comparing the maximum values of the respective latch circuits, and a pixel having the maximum value detected by the maximum value detection circuit. The pixel having the minimum value in the pixel data stored in the latch circuit by shifting the N2 pixel data stored in the latch circuit storing the data one by one to the pixel data side having the large pixel value Of data N1 shift circuits provided in association with each of the N1 latch circuits for storing data having a minimum value in the pixel data or data having a value distinguished from the pixel data, and the maximum A two-dimensional order filter circuit comprising: a counter that counts the number of routines for detecting the maximum value in the value detection circuit and for shifting the pixel data in the shift circuit.
【請求項2】 行方向および列方向にそれぞれ多数並ぶ
多数の画素から構成される2次元画像上の、行方向にN
1個、列方向にN2個並ぶN1×N2個の画素から構成
される領域内の各画素にそれぞれ対応する各画素データ
を画素値順に最小値側から並べた際に該最小値から所定
の順位にある画素データを選択する操作を、前記領域を
順次移動しながら前記2次元画像上の全域に亘って行な
う2次元順序フィルタ回路において、 前記領域内の、行方向に1個、列方向にN2個並ぶN2
個の画素からなる部分領域内の各画素に対応する各画素
データを画素値順に並べ換える操作を該各部分領域毎に
順次行なう1次元ソータ回路と、 該1次元ソータ回路により画素値順に並べられた前記各
部分領域に対応するN2個の画素データを画素値順に記
憶しておく、前記各部分領域毎に備えられたN1個のラ
ッチ回路と、 該N1個のラッチ回路に記憶された画素データの、該各
ラッチ回路毎の最小値どおしを比較してこれらN1個の
最小値中の最小値を検出する最小値検出回路と、 該最小値検出回路で検出された最小値を有する画素デー
タが記憶されたラッチ回路に記憶されているN2個の画
素データを、小さな画素値を有する画素データ側に1つ
ずつシフトして該ラッチ回路に記憶された画素データ中
の最大値を有する画素データの後段に画素データ中の最
大値を有するデータもしくは画素データと区別される値
を有するデータを記憶させる、前記N1個のラッチ回路
のそれぞれに付随して備えられたN1個のシフト回路
と、 前記最小値検出回路において最小値を検出し前記シフト
回路において画素データをシフトするルーチンの回数を
カウントするカウンタとを備えたことを特徴とする2次
元順序フィルタ回路。
2. N in the row direction on a two-dimensional image composed of a large number of pixels arranged in the row direction and the column direction.
When each pixel data corresponding to each pixel in the area composed of N1 pixels and N2 pixels arranged in the column direction is arranged from the minimum value side in the pixel value order, the predetermined order is given from the minimum value. In a two-dimensional order filter circuit that performs the operation of selecting the pixel data in the area over the entire area of the two-dimensional image while sequentially moving the area, one in the row direction and N2 in the column direction in the area. N2 lined up
A one-dimensional sorter circuit for sequentially performing an operation for rearranging each pixel data corresponding to each pixel in a partial region consisting of a plurality of pixels in the order of pixel value; and a one-dimensional sorter circuit for rearranging the pixel data in order of pixel value. Further, N1 latch circuits provided for each of the partial regions and N2 pixel data stored in the N1 latch circuits for storing N2 pixel data corresponding to each of the partial regions in order of pixel value. , A minimum value detection circuit for comparing the minimum values of the respective latch circuits to detect the minimum value among these N1 minimum values, and a pixel having the minimum value detected by the minimum value detection circuit. The pixel having the maximum value among the pixel data stored in the latch circuit by shifting the N2 pixel data stored in the latch circuit storing the data one by one to the pixel data side having the small pixel value Of data N1 shift circuits provided in association with each of the N1 latch circuits for storing the data having the maximum value in the pixel data or the data having a value distinguished from the pixel data in the stage; A two-dimensional order filter circuit, comprising: a counter that counts the number of routines for detecting the minimum value in the value detection circuit and shifting the pixel data in the shift circuit.
JP3286075A 1991-10-31 1991-10-31 Two-dimensional sequential filter circuit Expired - Fee Related JP2587555B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3286075A JP2587555B2 (en) 1991-10-31 1991-10-31 Two-dimensional sequential filter circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3286075A JP2587555B2 (en) 1991-10-31 1991-10-31 Two-dimensional sequential filter circuit

Publications (2)

Publication Number Publication Date
JPH05128253A true JPH05128253A (en) 1993-05-25
JP2587555B2 JP2587555B2 (en) 1997-03-05

Family

ID=17699626

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3286075A Expired - Fee Related JP2587555B2 (en) 1991-10-31 1991-10-31 Two-dimensional sequential filter circuit

Country Status (1)

Country Link
JP (1) JP2587555B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010178384A (en) * 2010-05-06 2010-08-12 Canon Inc Image signal processing circuit, camera and image signal processing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01184587A (en) * 1988-01-19 1989-07-24 Nec Corp Two-dimensional median filter
JPH01288920A (en) * 1988-05-16 1989-11-21 Nec Corp Data sorting device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01184587A (en) * 1988-01-19 1989-07-24 Nec Corp Two-dimensional median filter
JPH01288920A (en) * 1988-05-16 1989-11-21 Nec Corp Data sorting device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010178384A (en) * 2010-05-06 2010-08-12 Canon Inc Image signal processing circuit, camera and image signal processing method

Also Published As

Publication number Publication date
JP2587555B2 (en) 1997-03-05

Similar Documents

Publication Publication Date Title
US3039683A (en) Electrical calculating circuits
NL8403323A (en) READING DEVICE FOR BAR CODES.
JPH03256485A (en) Motion vector detecting circuit
US4800425A (en) System for displacement vector searching during digital image analysis
US5995163A (en) Median filter with embedded analog to digital converter
JPS62245484A (en) Automatic inspection method and apparatus for cyclic pattern
CN108242051A (en) Median determines
US6199184B1 (en) Parallel signature compression circuit and method for designing the same
US8310570B1 (en) Repairing defective pixels
US7574640B2 (en) Compacting circuit responses
JP4143288B2 (en) Median filter processing device
JP3152203B2 (en) Appearance inspection device
JPH05128253A (en) Two-dimensional sequence filter circuit
US8077363B2 (en) Block matching circuit and data update method
EP0586834A2 (en) Enhanced data analyzer for use in bist circuitry
JPH0666050B2 (en) Sort processing method
JPH0132556B2 (en)
KR100385948B1 (en) Test method of semiconductor device for optimizing test time
US7072240B2 (en) Apparatus for processing data, memory bank used therefor, semiconductor device, and memory for reading out pixel data
US6298086B1 (en) Motion vector detecting apparatus
US20230386106A1 (en) Disparity image filling method and image processing device
JPH10240938A (en) Peak evaluating device and its method
CN109660788B (en) Bad cluster detection method and device
CN115393607A (en) Picture structure comparison method and device
JPH0713809B2 (en) Ordering circuit

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19961022

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

Free format text: PAYMENT UNTIL: 20071205

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20081205

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20091205

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20101205

Year of fee payment: 14

LAPS Cancellation because of no payment of annual fees