JP2000293681A - Image filter circuit and filtering method using median filter - Google Patents

Image filter circuit and filtering method using median filter

Info

Publication number
JP2000293681A
JP2000293681A JP11095286A JP9528699A JP2000293681A JP 2000293681 A JP2000293681 A JP 2000293681A JP 11095286 A JP11095286 A JP 11095286A JP 9528699 A JP9528699 A JP 9528699A JP 2000293681 A JP2000293681 A JP 2000293681A
Authority
JP
Japan
Prior art keywords
histogram
pixel
value
data
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP11095286A
Other languages
Japanese (ja)
Inventor
Katsumi Otsuka
克己 大塚
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP11095286A priority Critical patent/JP2000293681A/en
Publication of JP2000293681A publication Critical patent/JP2000293681A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a picture filter circuit which can be constituted by using a digital circuit, simplified in the circuit constitution and reduced in the circuit scale by simplifying processing and a filtering method. SOLUTION: In the filtering method, a region to be processed by a media filter is moved, and the histogram of pixels newly added to the region is calculated, and stored in a partial histogram memory 203A. The data of partial histogram memories 203B-203F corresponding to each column are successively shifted so that the data of pixels removed from the region are stored in the partial histogram memory 203F. Those data are added and subtracted so that the data of a history memory 2 can be updated, and the updated histogram data are cumulatively added in the order of the size so that a median can be calculated by a median selection adding circuit 3.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、メディアンフィル
タを用いた画像フィルタ回路および画像フィルタリング
方法に関し、特に、デジタル画像処理において、孤立雑
音の除去を行うメディアンフィルタを用いた画像フィル
タ回路および画像フィルタリング方法に関するものであ
る。
The present invention relates to an image filter circuit and an image filtering method using a median filter, and more particularly to an image filter circuit and an image filtering method using a median filter for removing isolated noise in digital image processing. It is about.

【0002】[0002]

【従来の技術】各画素が多値で表現されるデジタル画像
から、エッジなどの重要な情報を損なうことなくスパイ
ク状の孤立雑音を取り除く画像フィルタとして、メディ
アンフィルタが知られている。
2. Description of the Related Art A median filter is known as an image filter for removing spike-like solitary noise from a digital image in which each pixel is represented by multi-values without losing important information such as edges.

【0003】メディアンフィルタは、原画像上に注目画
素とその周辺の画素を含む領域としてマトリクス状のウ
インドウを設定し、該ウインドウ内の画素の値を昇順も
しくは降順に並び替えを行い、注目画素の値を画素値の
中央値で置き換えるものである。
The median filter sets a matrix-like window on the original image as an area including a pixel of interest and its surrounding pixels, sorts the values of the pixels in the window in ascending or descending order, and The value is replaced with the median of the pixel values.

【0004】この様なメディアンフィルタをデジタル回
路によって構成する場合、各画素の値を比較するために
比較回路を用いるのが一般的である。
When such a median filter is constituted by a digital circuit, a comparison circuit is generally used to compare the values of each pixel.

【0005】また、比較回路を使用しないでメディアン
フィルタを構成する手法として、処理対象となる画素が
0〜2M-1の値をとる画像に対して、M1/2のレベルをも
つ一次元のサマリテーブルと縦横M1/2の大きさを持つ
詳細テーブルとからメディアンフィルタを構成する手法
が特開平5−233802号公報に記載されている。
As a technique for constructing a median filter without using a comparison circuit, a one-dimensional image having a level of M 1/2 is used for an image in which the pixel to be processed takes a value of 0 to 2 M -1. approach to configuring a median filter and a detailed table with the summary table and the magnitude of the vertical and horizontal M 1/2 is described in Japanese Patent Laid-Open No. 5-233802.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、比較回
路を用いてメディアンフィルタを構成すると、処理対象
となるウインドウ内の全ての画素の大きさを比較して順
序を決定するために、ウインドウのサイズが大きくなる
と多数の比較回路が必要となり、複雑な回路構成とな
る。
However, when a median filter is configured using a comparison circuit, the size of the window is reduced because the size of all pixels in the window to be processed is compared to determine the order. As the size increases, a large number of comparison circuits are required, resulting in a complicated circuit configuration.

【0007】また、ウインドウ内の画素を昇順もしくは
降順に並び替える方法も、処理対象ウインドウのサイズ
が大きくなればなるほど複雑となり、かつ回路規模も莫
大な大きさとなってしまい、デジタル回路で実現する事
が非常に困難である。
Also, the method of rearranging the pixels in the window in ascending or descending order becomes more complicated as the size of the processing target window increases, and the circuit scale becomes enormous. Is very difficult.

【0008】一方、上記公報には、サマリテーブル及び
詳細テーブルの作成方法および更新時にデータを設定す
る方法が記載されておらず、どのように実現するのか不
明である。また、このような手法をデジタル回路等のハ
ードウエアで実現する事は、回路規模的にも不可能であ
る。
On the other hand, the above publication does not describe a method of creating a summary table and a detail table and a method of setting data at the time of updating, and it is not clear how to realize the method. Further, it is impossible to realize such a method using hardware such as a digital circuit in terms of a circuit scale.

【0009】本発明は以上のような状況に鑑みてなされ
たものであり、処理を単純化して回路構成を簡略化しつ
つ回路規模を小さくでき、デジタル回路を使用して構成
することのできる、メディアンフィルタを用いた画像フ
ィルタ回路および画像フィルタリング方法を提供するこ
とを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and has been made in consideration of the above-described circumstances. It is an object to provide an image filter circuit and an image filtering method using a filter.

【0010】[0010]

【課題を解決するための手段】上記の目的を達成する本
発明のメディアンフィルタを用いた画像フィルタ回路
は、注目画素とその周辺の画素を含む領域内の各画素の
値を入力して、前記注目画素の値を前記領域内の画素の
値の中央値で置き換えるメディアンフィルタを、所定方
向に移動させて1フレームの画像データを得る画像フィ
ルタ回路であって、前記領域内の画素の値のヒストグラ
ムを記憶するヒストグラムメモリと、前記メディアンフ
ィルタの移動によって、前記領域に新たに加えられた画
素の値および前記領域から除外された画素の値を求めて
前記ヒストグラムメモリのデータを更新するヒストグラ
ム更新手段と、更新されたヒストグラムメモリのデータ
を大きさの順に累積加算して中央値を求める中央値選択
加算手段とを備えている。
An image filter circuit using a median filter according to the present invention, which achieves the above object, inputs the value of each pixel in an area including a pixel of interest and its surrounding pixels. An image filter circuit that obtains one frame of image data by moving a median filter that replaces a value of a pixel of interest with a median of values of pixels in the region in a predetermined direction, the histogram including a pixel value in the region. A histogram memory for storing the histogram memory for storing a value of a pixel newly added to the region and a value of a pixel excluded from the region by moving the median filter, and updating the data of the histogram memory. Median selection adding means for cumulatively adding the updated data in the histogram memory in order of size to obtain a median value That.

【0011】また、上記目的を達成する本発明のメディ
アンフィルタを用いた画像フィルタリング方法は、注目
画素とその周辺の画素を含む領域内の各画素の値を入力
して、前記注目画素の値を前記領域内の画素の値の中央
値で置き換えるメディアンフィルタを、所定方向に移動
させて1フレームの画像データを得る画像フィルタリン
グ方法であって、前記領域内の画素の値のヒストグラム
を記憶するヒストグラム記憶工程と、前記メディアンフ
ィルタの移動によって、前記領域に新たに加えられた画
素の値および前記領域から除外された画素の値を求めて
前記ヒストグラムのデータを更新するヒストグラム更新
工程と、更新されたヒストグラムメモリのデータを大き
さの順に累積加算して中央値を求める中央値選択加算工
程とを備えている。
Further, in the image filtering method using a median filter according to the present invention, which achieves the above object, a value of each pixel in an area including a pixel of interest and its surrounding pixels is inputted, and the value of the pixel of interest is changed. An image filtering method for obtaining a frame of image data by moving a median filter that replaces a median value of pixel values in the region in a predetermined direction, wherein the histogram storage stores a histogram of pixel values in the region. Updating the histogram data by determining the value of a pixel newly added to the region and the value of a pixel excluded from the region by moving the median filter; and updating the histogram. A median selection addition step of obtaining a median by accumulatively adding the data in the memory in order of size.

【0012】すなわち、領域内の各画素の値の中央値を
出力するメディアンフィルタを所定方向に移動させて1
フレームの画像データを得る画像フィルタ回路におい
て、領域内の画素の値のヒストグラムを記憶するヒスト
グラムメモリのデータに、処理対象となる領域を移動さ
せることによって、新たに領域に加えられた画素の値お
よび領域から除外された画素の値を求めて、これらのデ
ータをそれぞれ加算および減算することによって、ヒス
トグラムデータを更新し、更新されたヒストグラムデー
タを大きさの順に累積加算して中央値を求める。
That is, the median filter that outputs the median of the values of the pixels in the region is moved in a predetermined direction to
In an image filter circuit that obtains image data of a frame, by moving a region to be processed to data in a histogram memory that stores a histogram of pixel values in the region, the value of a pixel newly added to the region and The value of the pixel excluded from the region is obtained, and the histogram data is updated by adding and subtracting these data, respectively, and the updated histogram data is cumulatively added in order of size to obtain a median value.

【0013】このようにすると、中央値を求める際に比
較演算を行う必要がなく、加算と減算のみの簡単な演算
処理を行うだけでよいので、回路構成が簡単となり、処
理速度の点でも有利である。また、フィルタの処理対象
となる領域のサイズが大きくなっても、ヒストグラムメ
モリのサイズを領域に合わせて増加させるだけでよく、
処理速度に影響を与える事がほとんどない。
With this configuration, it is not necessary to perform a comparison operation when obtaining the median value, and only a simple operation process of addition and subtraction is required. Therefore, the circuit configuration is simplified and the processing speed is also advantageous. It is. Also, even if the size of the area to be processed by the filter increases, it is sufficient to simply increase the size of the histogram memory according to the area.
It hardly affects the processing speed.

【0014】[0014]

【発明の実施の形態】始めに、本発明の原理について図
面を参照しながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First, the principle of the present invention will be described with reference to the drawings.

【0015】図1は、本発明のメディアンフィルタの概
略構成を示すブロック図である。図示されたように、本
発明のメディアンフィルタは、ヒストグラム更新回路1
とヒストグラムメモリ2と中央値選択加算回路3とから
構成される。
FIG. 1 is a block diagram showing a schematic configuration of a median filter of the present invention. As shown, the median filter of the present invention includes a histogram update circuit 1
, A histogram memory 2, and a median selection and addition circuit 3.

【0016】図1において、入力される画像データは、
「処理対象マトリクス」とも呼ばれるマトリクス状のウ
インドウのサイズをN×L(N、Lは自然数)とした場
合には、1行または1列分のN個の画素値である。
In FIG. 1, the input image data is
When the size of a matrix-like window, also called a “matrix to be processed”, is N × L (N and L are natural numbers), it is N pixel values for one row or one column.

【0017】図2は、本発明における処理対象マトリク
スの例を示す図である。図中処理対象マトリクスは5×
5のウインドウで示されており、中心に注目画素を含ん
でいる。このような処理対象マトリクスを、1フレーム
内の全ての画素が注目画素となるように、水平または垂
直方向に1画素ずつ移動させ、フィルタリング処理を行
う。
FIG. 2 is a diagram showing an example of a matrix to be processed in the present invention. The matrix to be processed in the figure is 5 ×
5 and includes a target pixel at the center. The filtering process is performed by moving such a processing target matrix one pixel at a time in the horizontal or vertical direction so that all the pixels in one frame become the target pixel.

【0018】本発明では、このように処理対象マトリク
スを移動させることによって、新たに処理対象マトリク
スに加えられる1行または1列の画素値を入力データと
する。
In the present invention, by moving the matrix to be processed in this way, the pixel value of one row or one column newly added to the matrix to be processed is used as input data.

【0019】なお、ここではメディアンフィルタの処理
対象範囲をマトリクス状のウインドウとしてが、この形
状はマトリクス状に限られるものではなく、所望するフ
ィルタリング効果等に応じて異なった形状とすることが
できる。また、注目画素の位置も、処理対象範囲の中央
に限定されるものではない。
Here, the processing range of the median filter is a matrix-shaped window, but the shape is not limited to the matrix, and may be different depending on the desired filtering effect or the like. Further, the position of the target pixel is not limited to the center of the processing target range.

【0020】ヒストグラム更新回路1は、入力された画
像データの1行または1列の各画素の値に基づいて、ヒ
ストグラムメモリ2を更新する。
The histogram updating circuit 1 updates the histogram memory 2 based on the value of each pixel in one row or one column of the input image data.

【0021】ヒストグラムメモリ2は、各画素が取りう
る値のそれぞれと1対1に対応する数の記憶素子から構
成されている。このヒストグラムメモリ2を構成する各
記憶素子が表現できる最大の値は、処理対象マトリクス
内の画素の数に等しい整数である。
The histogram memory 2 is composed of a number of storage elements corresponding one-to-one with the possible values of each pixel. The maximum value that can be represented by each storage element constituting the histogram memory 2 is an integer equal to the number of pixels in the processing target matrix.

【0022】中央値選択加算回路3は、ヒストグラムメ
モリ2の各記憶素子に記憶されているデータを昇順また
は降順に累積加算し、加算した値が処理対象マトリクス
内の画素数の中心値以上となったときに、該記憶素子に
対応する値を注目画素に対する出力とする。
The median value selecting and adding circuit 3 cumulatively adds data stored in each storage element of the histogram memory 2 in ascending order or descending order, and the added value is equal to or larger than the central value of the number of pixels in the processing target matrix. Then, the value corresponding to the storage element is set as the output for the pixel of interest.

【0023】このような処理を、フレーム内の全画素が
注目画素となるように処理対象マトリクスを1画素ずつ
所定の方向に移動させて順次行う。
Such processing is sequentially performed by moving the processing target matrix one pixel at a time in a predetermined direction so that all the pixels in the frame become the target pixel.

【0024】以下添付図面を参照して本発明の好適な実
施形態について詳細に説明する。
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

【0025】図3は、本発明のメディアンフィルタの第
1の実施形態の構成を示すブロック図である。
FIG. 3 is a block diagram showing the configuration of the first embodiment of the median filter of the present invention.

【0026】なお、ここでは説明の便宜上、処理対象マ
トリクスのサイズを5×5、原画像の各画素の値は6ビ
ット(0〜63)で現されており、処理対象マトリクス
は原画像を水平方向に移動されてフィルタリング処理を
行うものとする。
Here, for convenience of explanation, the size of the matrix to be processed is represented by 5 × 5, and the value of each pixel of the original image is represented by 6 bits (0 to 63). It is assumed that it is moved in the direction to perform filtering processing.

【0027】本実施形態のメディアンフィルタは、列毎
に部分的ヒストグラムを求めるヒストグラム更新回路1
と、部分的ヒストグラムから得られた処理対象マトリク
ス全体のヒストグラムを記憶するヒストグラムメモリ2
と、処理対象マトリクス全体のヒストグラムから中央値
を求めて出力する中央値選択加算回路3とから構成され
ている。
The median filter of this embodiment is a histogram updating circuit 1 for obtaining a partial histogram for each column.
And a histogram memory 2 for storing a histogram of the entire processing target matrix obtained from the partial histogram
And a median selection / addition circuit 3 which calculates and outputs a median from the histogram of the entire processing target matrix.

【0028】ヒストグラム更新回路1は、入力された画
像データの各画素の値を6ビットデータをデコードして
64本の信号線のいずれか1本を有効にして出力するデ
コーダ103、処理対象マトリクスの各列に対応した5
つと移動により新たに加えられる列に対応した1つと
の、部分的ヒストグラムをそれぞれ記憶する合計6個の
ヒストグラム記憶部203A〜203F、新たに加えら
れる列のヒストグラムデータを加算する加算回路30
3、および移動により処理対象マトリクスに含まれなく
なる列のヒストグラムデータを減算する減算回路403
を備えている。
The histogram updating circuit 1 decodes the value of each pixel of the input image data by decoding 6-bit data and validating and outputting any one of the 64 signal lines. 5 corresponding to each column
A total of six histogram storage units 203A to 203F for storing partial histograms, one each corresponding to a column newly added by movement, and an addition circuit 30 for adding histogram data of a newly added column
3, and a subtraction circuit 403 for subtracting histogram data of a column that is not included in the processing target matrix due to movement.
It has.

【0029】図4は、デコーダ103とヒストグラム記
憶部203Aのより詳細な回路構成を示した図である。
この図を参照して、入力された画像データからどのよう
にして部分的ヒストグラムが求められるかを説明する。
FIG. 4 is a diagram showing a more detailed circuit configuration of the decoder 103 and the histogram storage unit 203A.
With reference to this figure, how to obtain a partial histogram from the input image data will be described.

【0030】原画像上に設定された処理対象マトリクス
が移動する事で新たにマトリクスの要素となった5つの
画素のデータは、デコーダ103に入力され、5つの6
To64デコーダ部104にそれぞれ入力される。この
5つのデコーダ部104はそれぞれ64本の1ビット出
力を有しており、64×5=320本の全てがヒストグ
ラム記憶部203Aに入力される。
The data of the five pixels which have newly become elements of the matrix by moving the processing target matrix set on the original image are input to the decoder 103,
The signals are input to the To64 decoder unit 104, respectively. Each of the five decoder units 104 has 64 1-bit outputs, and all 64 × 5 = 320 lines are input to the histogram storage unit 203A.

【0031】ヒストグラム記憶部203Aでは、5つの
デコーダ部104から出力される同一の値を示す出力が
4つの加算器によって加算され、各値に対応する、例え
ばフリップフロップ等からなる記憶素子204に入力さ
れる。このようにして、新たに処理対象マトリクスに加
わった5つのデータの分布が、ヒストグラム記憶部20
3Aにセットされる。
In the histogram storage unit 203A, outputs indicating the same value output from the five decoder units 104 are added by four adders, and input to the storage element 204 corresponding to each value, such as a flip-flop. Is done. Thus, the distribution of the five data newly added to the processing target matrix is stored in the histogram storage unit 20.
Set to 3A.

【0032】図4では、デコーダ部103内の5つのデ
コーダからの64本の出力の中の15番目の出力のみを
示しているが、他の出力も同様に加算された後に対応す
る記憶素子204に入力される。すなわち、この例の場
合には画素値が0〜63の64種類の値を取りうるの
で、ヒストグラム記憶部203Aは64個の記憶素子2
04で構成される。また、各記憶素子204の記憶出来
るビット数は、処理対象マトリクスの1列分の画素数を
表現できる数であればよく、ここでは1列の画素数が5
であるので3ビット幅となる。
FIG. 4 shows only the fifteenth output among the sixty-four outputs from the five decoders in the decoder unit 103. However, the other outputs are similarly added, and then the corresponding storage elements 204 are output. Is input to That is, in the case of this example, since the pixel value can take 64 values from 0 to 63, the histogram storage unit 203A stores 64 storage elements 2
04. The number of bits that can be stored in each storage element 204 may be a number that can represent the number of pixels in one column of the processing target matrix. In this case, the number of pixels in one column is five.
Therefore, the width is 3 bits.

【0033】ヒストグラム記憶部203Bから203F
は、ヒストグラム記憶部203Aから4つの加算器を除
いた構成であり、いずれも64個の記憶素子204を有
する同一の構成をしている。それぞれのヒストグラム記
憶部のデータは、処理対象マトリクスが移動する毎に、
203Fには203Eのデータ、203Eには203D
のデータというように、順次図中右側のヒストグラム記
憶部にシフトされて上書きされる。
The histogram storage units 203B to 203F
Is a configuration in which four adders are removed from the histogram storage unit 203A, and all have the same configuration having 64 storage elements 204. Each time the matrix to be processed moves, the data in each histogram storage unit
203F data for 203F, 203D for 203E
Is sequentially shifted to the histogram storage unit on the right side in the figure and overwritten.

【0034】このように、ヒストグラム記憶部203A
〜203Fのデータをそれぞれシフトすると、ヒストグ
ラム記憶部203Fのデータは、移動によって処理対象
マトリクスに含まれなくなった列のデータとなる。
As described above, the histogram storage unit 203A
When each of the data of .about.203F is shifted, the data of the histogram storage unit 203F becomes data of a column which is not included in the processing target matrix due to the movement.

【0035】従って、移動前の処理対象マトリクスのヒ
ストグラムが記憶されているヒストグラムメモリ2に、
新たに加えられる列のヒストグラムデータである203
Aのデータを加算し、203Fのデータを減算すると、
現在の処理対象マトリクス内の画素値のヒストグラムが
得られる。
Accordingly, the histogram memory 2 storing the histogram of the processing target matrix before the movement is
203 which is the histogram data of the newly added column
When the data of A is added and the data of 203F is subtracted,
A histogram of the pixel values in the current processing target matrix is obtained.

【0036】ここで、ヒストグラム記憶部203A〜2
03Fにおける記憶素子は、個数が画素値の取りうる数
である64個であり、ビット幅が1列の画素数5を表現
できる3ビットであったが、ヒストグラムメモリ2にお
ける記憶素子の構成は、個数がヒストグラム記憶部20
3A〜203Fと同様に64個であり、ビット幅は処理
対象マトリクス内の画素数25を表現できる6ビット幅
である。
Here, the histogram storage units 203A to 203A-2
The number of storage elements in 03F is 64, which is the number of possible pixel values, and the bit width is 3 bits that can represent 5 pixels in one column. However, the configuration of the storage elements in the histogram memory 2 is as follows. The number is the histogram storage unit 20
Similarly to 3A to 203F, there are 64 bits, and the bit width is a 6-bit width capable of expressing 25 pixels in the processing target matrix.

【0037】ヒストグラム記憶部203Aのデータは、
加算回路303で、単純にヒストグラムメモリ2の出力
と加算される。加算回路303からの出力は、減算回路
403で、ヒストグラム記憶部203Fのデータと減算
される。減算回路403の出力は、ヒストグラムメモリ
2に入力される。
The data in the histogram storage unit 203A is
In the adding circuit 303, the output is simply added to the output of the histogram memory 2. The output from the addition circuit 303 is subtracted by the subtraction circuit 403 from the data in the histogram storage unit 203F. The output of the subtraction circuit 403 is input to the histogram memory 2.

【0038】このように、本実施形態では、ヒストグラ
ム記憶部203A〜203Fの記憶素子の数と、ヒスト
グラムメモリ2の記憶素子の数が等しく、それぞれの内
容を一対一に対応させているので、上記のように加算お
よび減算を単純に行うことができる。
As described above, in the present embodiment, the number of storage elements in the histogram storage units 203A to 203F is equal to the number of storage elements in the histogram memory 2, and the contents correspond to one to one. The addition and the subtraction can be simply performed as follows.

【0039】図5は、上記の加算および減算処理を、ヒ
ストグラム記憶部203Aおよび203Fの15番目お
よび16番目の記憶素子からのデータに着目して示した
図である。
FIG. 5 is a diagram showing the above addition and subtraction processing by focusing on data from the fifteenth and sixteenth storage elements of the histogram storage units 203A and 203F.

【0040】ヒストグラム記憶部203Aの15番目の
記憶部204(A15)のデータは、加算回路303の
15番目の加算器で、ヒストグラムメモリ2の15番目
の記憶素子305(G15)のデータと加算され、加算
結果からヒストグラム記憶部203Fの15番目の記憶
素子204(F15)のデータが、減算回路403の1
5番目の減算器で減算され、減算結果がヒストグラムメ
モリ2の15番目の記憶素子305(G15)に上書き
されて記憶される。
The data of the fifteenth storage unit 204 (A15) of the histogram storage unit 203A is added to the data of the fifteenth storage element 305 (G15) of the histogram memory 2 by the fifteenth adder of the addition circuit 303. From the addition result, the data of the fifteenth storage element 204 (F15) of the histogram storage unit 203F is stored in the subtraction circuit 403.
The subtraction is performed by the fifth subtractor, and the subtraction result is overwritten and stored in the fifteenth storage element 305 (G15) of the histogram memory 2.

【0041】更新されたヒストグラムメモリ2の15番
目の記憶素子305(G15)のデータは、中央値選択
加算回路3の加算器で、ヒストグラムメモリ2の14番
目までの記憶素子のデータを累積加算した結果を表わす
信号GADD(14)に加算されて、GADD(15)
となる。
The updated data of the fifteenth storage element 305 (G15) of the histogram memory 2 is cumulatively added with the data of the fourteenth storage elements of the histogram memory 2 by the adder of the median selection and addition circuit 3. It is added to the signal GADD (14) representing the result, and GADD (15)
Becomes

【0042】これと同様に、ヒストグラム記憶部203
Aの16番目の記憶部204(A16)のデータは、加
算回路303の16番目の加算器で、ヒストグラムメモ
リ2の16番目の記憶素子305(G16)のデータと
加算され、加算結果からヒストグラム記憶部203Fの
16番目の記憶素子204(F16)のデータが、減算
回路403の16番目の減算器で減算され、減算結果が
ヒストグラムメモリ2の16番目の記憶素子305(G
16)に上書きされて記憶される。
Similarly, the histogram storage unit 203
The data of the 16th storage unit 204 (A16) of A is added to the data of the 16th storage element 305 (G16) of the histogram memory 2 by the 16th adder of the addition circuit 303, and the histogram storage is performed based on the addition result. The data of the 16th storage element 204 (F16) of the section 203F is subtracted by the 16th subtractor of the subtraction circuit 403, and the subtraction result is stored in the 16th storage element 305 (G
16) is overwritten and stored.

【0043】そして、更新されたヒストグラムメモリ2
の16番目の記憶素子305(G16)のデータは、中
央値選択加算回路3の加算器で、ヒストグラムメモリ2
の15番目までの記憶素子のデータを累積加算した結果
を表わす信号GADD(15)に加算されて、GADD
(16)となる。
Then, the updated histogram memory 2
The data of the sixteenth storage element 305 (G16) is stored in the histogram memory 2 by the adder of the median selection and addition circuit 3.
Is added to a signal GADD (15) representing the result of cumulative addition of the data of the storage elements up to the fifteenth storage element.
(16).

【0044】以上のようにして、対応する記憶素子20
4および305のデータの加算と減算を行うだけで、処
理対象マトリクス内の画素値のヒストグラムデータを、
処理対象マトリクスの移動に伴って更新する事ができ
る。ヒストグラムの作成および更新を加算および減算の
みで行うことができるので、回路構成も非常に簡単とな
り、処理速度の点でも有利である。
As described above, the corresponding storage element 20
By simply adding and subtracting the data of 4 and 305, the histogram data of the pixel values in the processing target matrix is calculated as
It can be updated with the movement of the processing target matrix. Since the creation and update of the histogram can be performed only by addition and subtraction, the circuit configuration becomes very simple, which is advantageous in terms of processing speed.

【0045】本実施形態におけるヒストグラム記憶部2
03の数は、処理対象マトリクスの列の数+1に等し
く、上記の例では6である。ただし、ヒストグラム記憶
部203A内部の加算回路およびデコーダ部103の処
理が1ステージ中に可能であれば、ヒストグラム記憶部
203Aをなくして更に回路構成を簡略化することが可
能である。
The histogram storage unit 2 in the present embodiment
The number 03 is equal to the number of columns of the matrix to be processed + 1, which is 6 in the above example. However, if the processing of the addition circuit and the decoder unit 103 inside the histogram storage unit 203A can be performed in one stage, the circuit configuration can be further simplified by eliminating the histogram storage unit 203A.

【0046】次に、中央値選択加算回路3の構成につい
て説明する。上述のそうな処理によってヒストグラムメ
モリ2には、処理対象マトリクス内の画素値の分布が記
憶されている。従って、この画素値の分布を、最小値か
らまたは最大値から順に加算して累積値を求めることに
より、中央値を求めることができる。
Next, the configuration of the median selection and addition circuit 3 will be described. The histogram memory 2 stores the distribution of pixel values in the matrix to be processed by the above-described processing. Therefore, the median value can be obtained by adding the pixel value distribution in order from the minimum value or the maximum value to obtain the accumulated value.

【0047】図5に関して上記で説明したように、ヒス
トグラムメモリ2を構成する各記憶素子305からの出
力を加算器で順次加算することにより、累積加算結果を
表わす信号GADDが得られる。
As described above with reference to FIG. 5, by sequentially adding the outputs from the storage elements 305 constituting the histogram memory 2 by the adder, a signal GADD representing the cumulative addition result is obtained.

【0048】図6は、中央値選択加算回路3の内部構成
を示す図である。ただし、図5に示した累積加算を求め
る部分は省略してある。画素値0の画素数を表わす信号
GADD(0)から、画素値63までの画素数(結果的
に処理対象マトリクス内の全画素数である25となる)
を表わす信号GADD(63)までの64の信号が中央
値選択回路106に入力される。
FIG. 6 is a diagram showing an internal configuration of the median value selection adding circuit 3. As shown in FIG. However, the portion for obtaining the cumulative addition shown in FIG. 5 is omitted. From the signal GADD (0) representing the number of pixels having the pixel value 0 to the number of pixels from the signal GADD (0) to the pixel value 63 (resulting in 25 as the total number of pixels in the processing target matrix)
Are input to the median value selection circuit 106 up to a signal GADD (63) representing

【0049】中央値選択回路106は、これら64本の
累積加算結果を表わす信号から、25個の画素数の中央
である13番目の画素値がどの信号に含まれているかを
求める。中央値がどの信号に含まれているかを求めるの
に、画素値の最小値0に対応する信号から画素値31に
対応する信号まで昇順に順次判定する第1段階と、画素
値の最大値63に対応する信号から画素値32に対応す
る信号まで降順に順次判定する第2段階とに分けて判定
を行う。
The median selection circuit 106 determines which signal contains the 13th pixel value, which is the center of the number of 25 pixels, from the 64 signals representing the cumulative addition result. In order to determine which signal the median value is included in, a first step of sequentially determining the signal corresponding to the minimum pixel value 0 to the signal corresponding to the pixel value 31 in ascending order, and the maximum pixel value 63 And a second step of sequentially determining in descending order from the signal corresponding to pixel signal 32 to the signal corresponding to pixel value 32.

【0050】各段階において、次のような2つの条件に
よって中央値が含まれる信号を特定する。
At each stage, a signal including the median is specified under the following two conditions.

【0051】第1の判定条件は、 である。The first judgment condition is as follows: It is.

【0052】ここで、Iは0〜31までの整数であり、
TEMP(I)は中央値選択回路106の内部信号であ
る。このTEMP(I)(I=0〜31の整数)に対して
以下の第2の判定条件で判定を行う。
Where I is an integer from 0 to 31;
TEMP (I) is an internal signal of the median value selection circuit 106. This TEMP (I) (I = 0 to an integer of 0 to 31) is determined under the following second determination condition.

【0053】すなわち、 IF(TEMP(L)=‘0’and TEMP(L+1)=‘1’)THEN X(L)<=‘1’; ELSE X(L)<=‘0’; END IF; である。That is, IF (TEMP (L) = '0' and TEMP (L + 1) = '1') THEN X (L) <= '1'; ELSE X (L) <= '0'; END IF; It is.

【0054】ここで、L=I−1(L=0〜31の整
数)であり、X(L)は中央値選択回路106の出力信号
である。
Here, L = I-1 (L = 0 to 31), and X (L) is an output signal of the median value selection circuit 106.

【0055】上記の第1および第2の判定条件によっ
て、画素値0〜31に対応する信号X(L)が得られ
る。これと同様に第2の段階として、画素値の最大値6
3に対応する信号から画素値32に対応する信号に対す
る判定を、第1および第2の判定条件によって信号X
(L)を求める。
A signal X (L) corresponding to pixel values 0 to 31 is obtained according to the first and second determination conditions. Similarly, as the second stage, the maximum pixel value 6
3 from the signal corresponding to the pixel value 32 by the first and second determination conditions.
(L) is obtained.

【0056】なお、第1の段階で中央値を含む信号が特
定されたときに、信号X(32)〜X(63)全てを0
として第2の段階を省略することもできる。また、画像
のエッジ以外では画素値は急激には変化しないことを考
慮して、1つ前の処理対象マトリクスに対する信号X
(L)が1となった段階から先に実施するようにして、
中央値を含む信号が特定された場合には、他方の段階を
省略するようにしてもよい。
When the signal including the median is specified in the first stage, all signals X (32) to X (63) are set to 0.
The second step may be omitted. Also, taking into account that the pixel value does not change abruptly except at the edge of the image, the signal X for the immediately preceding processing target matrix is considered.
(L) will be implemented from the stage when it becomes 1,
If a signal including the median is specified, the other step may be omitted.

【0057】図7は、アドレス出力回路206の詳細な
構成を示す図である。アドレス出力回路206は、中央
値選択回路106の出力信号X(0)〜X(63)を入
力として、処理対象マトリクス内の画素値の中央値に相
当する値をメディアンフィルタの最終的な出力とする。
FIG. 7 is a diagram showing a detailed configuration of the address output circuit 206. The address output circuit 206 receives the output signals X (0) to X (63) of the median value selection circuit 106 as inputs, and outputs a value corresponding to the median value of the pixel values in the processing target matrix as the final output of the median filter. I do.

【0058】中央値選択回路106の出力信号Xは、X
(0)は107で示されるMUX0、X(1)は207
で示されるMUX1というように、それぞれ対応する6
4個のマルチプレクサの1つに選択信号として入力され
る。各マルチプレクサには0と対応する画素値が入力さ
れており、選択信号Xが1となったときに、画素値が出
力される。
The output signal X of the median value selection circuit 106 is X
(0) is MUX0 indicated by 107, X (1) is 207
6 corresponding to MUX1 indicated by
The selection signal is input to one of the four multiplexers. A pixel value corresponding to 0 is input to each multiplexer, and when the selection signal X becomes 1, the pixel value is output.

【0059】ある時点での処理対象マトリクスに対応し
て値が1となる選択信号Xは1つだけである。従って、
各マルチプレクサの出力のORを取る事で、最終的なメ
ディアンフィルタの出力が得られる。
There is only one selection signal X having a value of 1 corresponding to the matrix to be processed at a certain point in time. Therefore,
The final output of the median filter is obtained by ORing the outputs of the multiplexers.

【0060】以下、本発明によるメディアンフィルタの
第2の実施形態について説明する。図8は、本実施形態
の概略回路構成を示す図である。ただし、メディアンフ
ィルタの処理対象マトリクスサイズや画素値のビット数
は、上記第1の実施形態と同一である。
Hereinafter, a second embodiment of the median filter according to the present invention will be described. FIG. 8 is a diagram showing a schematic circuit configuration of the present embodiment. However, the processing target matrix size of the median filter and the number of bits of the pixel value are the same as in the first embodiment.

【0061】本実施形態と第1の実施形態とは、ヒスト
グラム更新回路1の構成のみが異なっており、ヒストグ
ラムメモリ2および中央値選択加算回路3については説
明を省略する。
The present embodiment is different from the first embodiment only in the configuration of the histogram updating circuit 1, and the description of the histogram memory 2 and the median selection adding circuit 3 is omitted.

【0062】本実施形態においては、入力された処理対
象マトリクスに新たに含まれた列の5つの画素値は、は
じめに同一値判定回路108に入力され、同一データが
いくつあるかが判定される。この同一値判定回路108
は、入力された5つの画素値のすべての組み合わせにつ
いて、画素値同士のANDを求め、同一データの組み合
わせがいくつあるかを判定する。出力として、同一と判
定された数が一番多いデータについての情報が各加算回
路308〜708に送られる。
In this embodiment, the five pixel values of the column newly included in the input matrix to be processed are first input to the same value determination circuit 108, and it is determined how many pieces of the same data exist. This same value determination circuit 108
Calculates the AND of the pixel values for all combinations of the five input pixel values, and determines how many combinations of the same data exist. As output, information about data having the largest number determined to be the same is sent to each of the adders 308 to 708.

【0063】図9は、加算回路308〜708の詳細な
回路構成を示す図である。加算回路708に入力される
信号の種類は、画素値を表す6ビットの信号と、同一デ
ータ数を表す3ビットの信号である。
FIG. 9 is a diagram showing a detailed circuit configuration of the adders 308 to 708. The types of signals input to the addition circuit 708 are a 6-bit signal representing a pixel value and a 3-bit signal representing the same data number.

【0064】画素値は、デコーダ209に入力されて、
入力画素値に相当する1つの信号が64の信号から選択
される。ゲート709には、出力された信号の表わす値
とヒストグラムメモリ2からの信号が入力され、同じ画
素値のデータ数が出力される。そして内部の加算器で、
ヒストグラムメモリ2に記憶されているデータ数に新た
に加えられた列中のデータ数が加算されて出力される。
The pixel value is input to the decoder 209,
One signal corresponding to the input pixel value is selected from 64 signals. The value represented by the output signal and the signal from the histogram memory 2 are input to the gate 709, and the number of data having the same pixel value is output. And with the internal adder,
The number of data in the newly added column is added to the number of data stored in the histogram memory 2 and output.

【0065】ここで、図中上側に示した加算回路708
には、5個の画素値のうちデータ数が最も多い値とその
データ数が入力される。加算回路608〜308には2
番目〜5番目に多い値とそのデータ数がそれぞれ入力さ
れる。
Here, the adder circuit 708 shown in the upper part of FIG.
, The value having the largest number of data among the five pixel values and the number of data are input. Addition circuits 608 to 308 have 2
The fifth to fifth largest values and the number of data are input.

【0066】本実施形態では1列の画素数が5個である
ので、同一データ数が5である場合には、加算回路70
8のみに有効なデータが入力され、他の加算回路での処
理は不要となる。同一データ数が4である場合には、加
算回路708および608に有効なデータが入力され
る。
In this embodiment, since the number of pixels in one column is five, if the number of identical data is five, the addition circuit 70
Valid data is input to only 8, and the processing in other adders is not required. When the same data number is 4, valid data is input to the adders 708 and 608.

【0067】5個の画素値の様々な組み合わせを考えて
も、加算回路308〜508に入力されるデータの数は
最大で1である。従って、本実施形態では、加算回路3
08〜508にはデータ数を入力せず、内部の加算器で
定数1を加算するように構成している。
Even if various combinations of five pixel values are considered, the maximum number of data input to the adders 308 to 508 is one. Therefore, in the present embodiment, the addition circuit 3
The number of data is not input to 08 to 508, and a constant 1 is added by an internal adder.

【0068】また、先に述べたように、5個の画素値の
組み合わせによっては、加算回路608〜308には有
効なデータが入力されない場合が生じる。このような倍
に対処するため、同一値判定回路108は、Valid出力
を有しており、1209〜1509の各マルチプレクサ
に入力されるValid出力の値が1であるときに、ヒスト
グラムメモリ2の値をそのまま保持して出力する。
As described above, depending on the combination of the five pixel values, valid data may not be input to the adders 608 to 308. In order to cope with such a double, the identical value determination circuit 108 has a Valid output, and when the value of the Valid output input to each of the multiplexers 1209 to 1509 is 1, the value of the histogram memory 2 is Is output as it is.

【0069】本実施形態では図8に示したように遅延回
路208を有しているが、これは加算回路308〜70
8に入力された信号を、処理対象マトリクスの列に対応
する数だけ処理ステップを遅延させるものである。従っ
て、減算回路808〜1208には、5つ前の列に対応
する処理で加算回路308〜708に入力された信号が
そのまま入力される。
In the present embodiment, the delay circuit 208 is provided as shown in FIG.
The processing steps are delayed by the number corresponding to the columns of the matrix to be processed, for the signal input to 8. Therefore, the signals input to the addition circuits 308 to 708 in the processing corresponding to the five previous columns are input to the subtraction circuits 808 to 1208 as they are.

【0070】上記の加算回路308〜708で行った処
理と同様な処理を減算回路808〜1208で行い、減
算結果をヒストグラムメモリ2に入力して記憶内容を更
新する。
The same processing as that performed by the above-described addition circuits 308 to 708 is performed by the subtraction circuits 808 to 1208, and the subtraction result is input to the histogram memory 2 to update the stored contents.

【0071】以上のように構成することにより、処理対
象マトリクス内の画素値のヒストグラムデータを、処理
対象マトリクスの移動に伴って更新する事ができる。ヒ
ストグラムの作成および更新を加算および減算のみで行
うことができるので、回路構成も非常に簡単となり、処
理速度の点でも有利である。
With the above configuration, the histogram data of the pixel values in the processing target matrix can be updated as the processing target matrix moves. Since the creation and update of the histogram can be performed only by addition and subtraction, the circuit configuration becomes very simple, which is advantageous in terms of processing speed.

【0072】本実施形態では、同一の値を有する画素が
多い画像データに対しては、特に処理が簡単となるので
有利である。
This embodiment is advantageous in that the processing is particularly simple for image data having many pixels having the same value.

【0073】ここで本発明のメディアンフィルタの処理
について、図10のフローチャートを参照して再度説明
する。
Here, the processing of the median filter of the present invention will be described again with reference to the flowchart of FIG.

【0074】はじめに、ステップS1で、処理対象マト
リクス内の新たに処理対象となった1列の画素値のデー
タを、後の工程での演算が容易となるように加工処理す
る。この処理は、上記第1の実施形態では1列分のヒス
トグラムの作成であり、第2の実施形態では同一値判定
回路での処理である。
First, in step S1, data of one column of pixel values newly processed in the processing target matrix is processed so as to facilitate the calculation in the subsequent process. This process is to create a histogram for one column in the first embodiment, and is a process in the same value determination circuit in the second embodiment.

【0075】ステップS2では、新たに処理対象となっ
たデータをヒストグラムメモリに加算する。これは上記
第1の実施形態では303で示され、第2の実施形態で
は308〜708で示される加算回路で行われる。
In step S2, data to be newly processed is added to the histogram memory. This is performed by an adder circuit denoted by reference numeral 303 in the first embodiment, and denoted by reference numerals 308 to 708 in the second embodiment.

【0076】ステップS3では、処理対象から除外され
たデータをヒストグラムメモリから減算する。これは上
記第1の実施形態では403で示され、第2の実施形態
では808〜1208で示される加算回路で行われる。
In step S3, the data excluded from the processing target is subtracted from the histogram memory. This is performed by an adder circuit indicated by 403 in the first embodiment and indicated by 808 to 1208 in the second embodiment.

【0077】このステップS1〜S3までの処理は、本
発明のヒストグラム更新回路1によって行われる。
The processing of steps S1 to S3 is performed by the histogram updating circuit 1 of the present invention.

【0078】ステップS4では、更新されたヒストグラ
ムメモリ2のデータを、大きさの順に昇順または降順で
累積加算して、各画素値までの累積数のデータを得る。
これは上記第1および第2の実施形態では、中央値選択
加算回路の図5に示した部分で行われる。
In step S4, the updated data in the histogram memory 2 is cumulatively added in ascending order or descending order in order of magnitude to obtain data of the cumulative number up to each pixel value.
In the first and second embodiments, this is performed in the portion shown in FIG. 5 of the median selection and addition circuit.

【0079】ステップS5では、累積加算データに基づ
いて、メディアンフィルタの最終的な出力値として中央
値を出力する。これは上記第1および第2の実施形態で
は、中央値選択加算回路の図6および図7に示した部分
によって行われる。
In step S5, a median value is output as a final output value of the median filter based on the accumulated data. In the first and second embodiments, this is performed by the portion shown in FIGS. 6 and 7 of the median selection and addition circuit.

【0080】以上のような処理により、処理対象マトリ
クスの更新部分に関するデータのみを加算および減算す
る単純な処理で中央値を得ることができる。
With the above processing, the median can be obtained by a simple processing of adding and subtracting only the data relating to the updated portion of the processing target matrix.

【0081】なお、本発明は、複数の機器(例えばホス
トコンピュータ、インタフェイス機器、リーダ、プリン
タなど)から構成されるシステムに適用しても、一つの
機器からなる装置(例えば、複写機、ファクシミリ装置
など)に適用してもよい。
The present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.), but can be applied to a single device (for example, a copier, a facsimile). Device).

【0082】また、本発明の目的は、前述した実施形態
の機能を実現するソフトウェアのプログラムコードを記
録した記憶媒体(または記録媒体)を、システムあるい
は装置に供給し、そのシステムあるいは装置のコンピュ
ータ(またはCPUやMPU)が記憶媒体に格納されたプログ
ラムコードを読み出し実行することによっても、達成さ
れることは言うまでもない。この場合、記憶媒体から読
み出されたプログラムコード自体が前述した実施形態の
機能を実現することになり、そのプログラムコードを記
憶した記憶媒体は本発明を構成することになる。また、
コンピュータが読み出したプログラムコードを実行する
ことにより、前述した実施形態の機能が実現されるだけ
でなく、そのプログラムコードの指示に基づき、コンピ
ュータ上で稼働しているオペレーティングシステム(OS)
などが実際の処理の一部または全部を行い、その処理に
よって前述した実施形態の機能が実現される場合も含ま
れることは言うまでもない。
Further, an object of the present invention is to supply a storage medium (or a recording medium) recording software program codes for realizing the functions of the above-described embodiments to a system or an apparatus, and to provide a computer (a computer) of the system or the apparatus. It is needless to say that the present invention can also be achieved by a CPU or an MPU) reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium implements the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention. Also,
When the computer executes the readout program code, not only the functions of the above-described embodiments are realized, but also the operating system (OS) running on the computer based on the instructions of the program code.
It is needless to say that a case in which the functions of the above-described embodiments are implemented by performing part or all of the actual processing.

【0083】さらに、記憶媒体から読み出されたプログ
ラムコードが、コンピュータに挿入された機能拡張カー
ドやコンピュータに接続された機能拡張ユニットに備わ
るメモリに書込まれた後、そのプログラムコードの指示
に基づき、その機能拡張カードや機能拡張ユニットに備
わるCPUなどが実際の処理の一部または全部を行い、そ
の処理によって前述した実施形態の機能が実現される場
合も含まれることは言うまでもない。
Further, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the program code is read based on the instruction of the program code. Needless to say, the CPU included in the function expansion card or the function expansion unit performs part or all of the actual processing, and the processing realizes the functions of the above-described embodiments.

【0084】本発明を上記記憶媒体に適用する場合、そ
の記憶媒体には、先に説明した(図10に示す)フロー
チャートに対応するプログラムコードが格納されること
になる。
When the present invention is applied to the storage medium, the storage medium stores program codes corresponding to the above-described flowchart (shown in FIG. 10).

【0085】[0085]

【発明の効果】以上説明したように、本発明によれば、
中央値を求める際に比較演算を行う必要がなく、加算と
減算のみの簡単な演算処理を行うだけでよいので、回路
構成が簡単となり、処理速度の点でも有利である。ま
た、フィルタの処理対象となる領域のサイズが大きくな
っても、ヒストグラムメモリのサイズを領域に合わせて
増加させるだけでよく、処理速度に影響を与える事がほ
とんどないという効果がある。
As described above, according to the present invention,
When calculating the median, there is no need to perform a comparison operation, and only a simple operation process of addition and subtraction is required, so that the circuit configuration is simplified and the processing speed is also advantageous. Further, even if the size of the area to be processed by the filter is increased, it is sufficient to increase the size of the histogram memory according to the area, and there is an effect that the processing speed is hardly affected.

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

【図1】本発明のメディアンフィルタの概略構成を示す
図である。
FIG. 1 is a diagram showing a schematic configuration of a median filter of the present invention.

【図2】図1のメディアンフィルタの処理対象マトリク
スを説明するための図である。
FIG. 2 is a diagram for explaining a matrix to be processed by a median filter in FIG. 1;

【図3】本発明のメディアンフィルタの第1の実施形態
の回路構成を示す図である。
FIG. 3 is a diagram showing a circuit configuration of a first embodiment of a median filter of the present invention.

【図4】図3のデコーダ部103とヒストグラム記憶部
203Aの詳細な回路図である。
FIG. 4 is a detailed circuit diagram of a decoder unit 103 and a histogram storage unit 203A of FIG.

【図5】図3の加算回路303、減算回路403および
ヒストグラムメモリ2の詳細な回路図である。
FIG. 5 is a detailed circuit diagram of an addition circuit 303, a subtraction circuit 403, and a histogram memory 2 of FIG.

【図6】図3の中央値選択加算回路3の構成を示す図で
ある。
FIG. 6 is a diagram showing a configuration of a median selection and addition circuit 3 of FIG. 3;

【図7】図6のアドレス出力回路206の詳細な回路図
である。
FIG. 7 is a detailed circuit diagram of the address output circuit 206 of FIG.

【図8】本発明のメディアンフィルタの第2の実施形態
の回路構成を示す図である。
FIG. 8 is a diagram showing a circuit configuration of a second embodiment of the median filter of the present invention.

【図9】図8の加算回路308〜708の回路図であ
る。
9 is a circuit diagram of the adders 308 to 708 in FIG.

【図10】本発明のメディアンフィルタにおける処理を
示すフローチャートである。
FIG. 10 is a flowchart showing processing in the median filter of the present invention.

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

1 ヒスグラム更新回路 2 ヒストグラムメモリ 3 中央値選択加算回路 103 デコーダ部 104 デコーダ 203A〜203F ヒストグラム記憶部 204、305 記憶素子 303 加算回路 403 減算回路 106 中央値選択回路 206 アドレス出力回路 107、207 マルチプレクサ 307 OR回路 108 同一値判定回路 208 遅延回路 308〜708 加算回路 808〜1208 減算回路 DESCRIPTION OF SYMBOLS 1 Histogram update circuit 2 Histogram memory 3 Median value selection and addition circuit 103 Decoder unit 104 Decoder 203A-203F Histogram storage unit 204, 305 Storage element 303 Addition circuit 403 Subtraction circuit 106 Median value selection circuit 206 Address output circuit 107, 207 Multiplexer 307 OR Circuit 108 Same value determination circuit 208 Delay circuit 308 to 708 Addition circuit 808 to 1208 Subtraction circuit

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B057 CA02 CA08 CA11 CA12 CA16 CB02 CB08 CB12 CB16 CC02 CE02 CE05 CE06 CH08 CH09 CH11 CH18 DA17 DB02 DB05 DB09 DC19 5C021 PA38 PA77 PA78 XB16 YA02 5C077 LL06 LL17 MP01 PP02 PP46 PP48 PP61 PP68 PQ08 PQ12 PQ19 PQ20 PQ22 RR16  ──────────────────────────────────────────────────続 き Continued on the front page F-term (reference) PQ08 PQ12 PQ19 PQ20 PQ22 RR16

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 注目画素とその周辺の画素を含む領域内
の各画素の値を入力して、前記注目画素の値を前記領域
内の画素の値の中央値で置き換えるメディアンフィルタ
を、所定方向に移動させて1フレームの画像データを得
る画像フィルタ回路であって、 前記領域内の画素の値のヒストグラムを記憶するヒスト
グラムメモリと、 前記メディアンフィルタの移動によって、前記領域に新
たに加えられた画素の値および前記領域から除外された
画素の値を求めて前記ヒストグラムメモリのデータを更
新するヒストグラム更新手段と、 更新されたヒストグラムメモリのデータを大きさの順に
累積加算して中央値を求める中央値選択加算手段とを備
えたことを特徴とする画像フィルタ回路。
1. A median filter that inputs a value of each pixel in a region including a target pixel and its surrounding pixels and replaces the value of the target pixel with a median value of pixels in the region in a predetermined direction. An image filter circuit that obtains image data of one frame by moving the median filter; and a histogram memory that stores a histogram of pixel values in the area; and a pixel newly added to the area by moving the median filter. Histogram updating means for calculating the value of the histogram memory and the value of the pixel excluded from the area, and updating the data of the histogram memory. An image filter circuit comprising: a selection adding unit.
【請求項2】 前記ヒストグラム更新手段は、前記領域
に新たに加えられた画素の値を前記ヒストグラムメモリ
のデータに加算する加算回路と、前記領域から除外され
た画素の値を前記ヒストグラムメモリのデータから減算
する減算回路とを含むことを特徴とする請求項1に記載
の画像フィルタ回路。
2. The histogram updating means according to claim 1, wherein: an adding circuit for adding a value of a pixel newly added to said area to data of said histogram memory; 2. The image filter circuit according to claim 1, further comprising: a subtraction circuit for subtracting from the image signal.
【請求項3】 前記ヒストグラム更新手段は、前記領域
に新たに加えられた画素の値のヒストグラムを作成する
部分的ヒストグラム作成手段を含むことを特徴とする請
求項1または2に記載の画像フィルタ回路。
3. The image filter circuit according to claim 1, wherein the histogram updating unit includes a partial histogram creating unit that creates a histogram of pixel values newly added to the area. .
【請求項4】 前記ヒストグラム更新手段は、前記領域
に新たに加えられた画素で同じ値の画素があるときにそ
の値と個数とを出力する同一値判定手段を含むことを特
徴とする請求項1または2に記載の画像フィルタ回路。
4. The apparatus according to claim 1, wherein said histogram updating means includes an identical value judging means for outputting, when there is a pixel having the same value among the pixels newly added to said area, the value and the number thereof. 3. The image filter circuit according to 1 or 2.
【請求項5】 前記ヒストグラム更新手段は、前記領域
に新たに加えられた画素に関するデータを記憶する部分
的メモリを複数個有しており、該部分的メモリの個数
は、前記メディアンフィルタの移動に伴って、前記部分
的メモリのデータを順次シフトしたときに前記領域から
除外された画素に関するデータが得られる数であること
を特徴とする請求項1から4のいずれか1項に記載の画
像フィルタ回路。
5. The histogram updating means has a plurality of partial memories for storing data relating to pixels newly added to the area, and the number of the partial memories is determined when the median filter is moved. 5. The image filter according to claim 1, wherein when the data of the partial memory is sequentially shifted, data on a pixel excluded from the area is obtained. 6. circuit.
【請求項6】 前記ヒストグラム更新手段は、前記領域
に新たに加えられた画素に関するデータを、前記領域に
新たに加えられた画素が前記メディアンフィルタが移動
して前記領域から除外された画素となるまで遅延させる
遅延手段を含むことを特徴とする請求項1から4のいず
れか1項に記載の画像フィルタ回路。
6. The histogram updating means according to claim 1, wherein said data relating to a pixel newly added to said area is a pixel which is newly excluded from said area due to movement of said median filter. The image filter circuit according to any one of claims 1 to 4, further comprising a delay unit for delaying the image filter.
【請求項7】 前記領域はマトリクス状の矩形であるこ
とを特徴とする請求項1から6のいずれか1項に記載の
画像フィルタ回路。
7. The image filter circuit according to claim 1, wherein the area is a rectangular matrix.
【請求項8】 前記注目画素が前記領域の中心に位置す
ることを特徴とする請求項7に記載の画像フィルタ回
路。
8. The image filter circuit according to claim 7, wherein the pixel of interest is located at the center of the area.
【請求項9】 注目画素とその周辺の画素を含む領域内
の各画素の値を入力して、前記注目画素の値を前記領域
内の画素の値の中央値で置き換えるメディアンフィルタ
を、所定方向に移動させて1フレームの画像データを得
る画像フィルタリング方法であって、 前記領域内の画素の値のヒストグラムを記憶するヒスト
グラム記憶工程と、 前記メディアンフィルタの移動によって、前記領域に新
たに加えられた画素の値および前記領域から除外された
画素の値を求めて前記ヒストグラムのデータを更新する
ヒストグラム更新工程と、 更新されたヒストグラムメモリのデータを大きさの順に
累積加算して中央値を求める中央値選択加算工程とを備
えたことを特徴とする画像フィルタリング方法。
9. A median filter that inputs a value of each pixel in an area including a target pixel and its surrounding pixels and replaces the value of the target pixel with a median value of the pixels in the area in a predetermined direction. And a histogram storing step of storing a histogram of pixel values in the region, and a median filter newly added to the region by moving the median filter. A histogram update step of obtaining the value of a pixel and the value of a pixel excluded from the region to update the data of the histogram; An image filtering method, comprising: a selection addition step.
【請求項10】 前記ヒストグラム更新工程は、前記領
域に新たに加えられた画素の値を前記ヒストグラムのデ
ータに加算する加算工程と、前記領域から除外された画
素の値を前記ヒストグラムのデータから減算する減算工
程とを含むことを特徴とする請求項9に記載の画像フィ
ルタリング方法。
10. The histogram updating step includes an adding step of adding a value of a pixel newly added to the area to the histogram data, and subtracting a value of a pixel excluded from the area from the histogram data. The image filtering method according to claim 9, further comprising: performing a subtraction step.
【請求項11】 前記ヒストグラム更新工程は、前記領
域に新たに加えられた画素の値のヒストグラムを作成す
る部分的ヒストグラム作成工程を含むことを特徴とする
請求項9または10に記載の画像フィルタリング方法。
11. The image filtering method according to claim 9, wherein the histogram updating step includes a partial histogram creating step of creating a histogram of pixel values newly added to the area. .
【請求項12】 前記ヒストグラム更新工程は、前記領
域に新たに加えられた画素で同じ値の画素があるときに
その値と個数とを出力する同一値判定工程を含むことを
特徴とする請求項9または10に記載の画像フィルタリ
ング方法。
12. The histogram updating step includes an identical value determining step of outputting a value and the number of pixels having the same value among pixels newly added to the area when the pixel has the same value. The image filtering method according to 9 or 10.
【請求項13】 前記ヒストグラム更新工程は、前記領
域に新たに加えられた画素に関するデータを複数個の部
分的メモリの1つに記憶する部分的記憶工程を有してお
り、前記部分的メモリの個数は、前記メディアンフィル
タの移動に伴って、前記部分的メモリのデータを順次シ
フトしたときに前記領域から除外された画素に関するデ
ータが得られる数であることを特徴とする請求項9から
12のいずれか1項に記載の画像フィルタリング方法。
13. The partial histogram updating step includes a partial storing step of storing data relating to a pixel newly added to the area in one of a plurality of partial memories. 13. The method according to claim 9, wherein the number is a number by which data relating to a pixel excluded from the area is obtained when data in the partial memory is sequentially shifted with movement of the median filter. The image filtering method according to claim 1.
【請求項14】 前記ヒストグラム更新工程は、前記領
域に新たに加えられた画素に関するデータを、前記領域
に新たに加えられた画素が前記メディアンフィルタが移
動して前記領域から除外された画素となるまで遅延させ
る遅延工程を含むことを特徴とする請求項9から12の
いずれか1項に記載の画像フィルタリング方法。
14. The histogram updating step may include, for the data relating to a pixel newly added to the region, a pixel newly added to the region being a pixel excluded from the region by the movement of the median filter. The image filtering method according to any one of claims 9 to 12, further comprising a delay step of delaying the image filtering.
JP11095286A 1999-04-01 1999-04-01 Image filter circuit and filtering method using median filter Withdrawn JP2000293681A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11095286A JP2000293681A (en) 1999-04-01 1999-04-01 Image filter circuit and filtering method using median filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11095286A JP2000293681A (en) 1999-04-01 1999-04-01 Image filter circuit and filtering method using median filter

Publications (1)

Publication Number Publication Date
JP2000293681A true JP2000293681A (en) 2000-10-20

Family

ID=14133543

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11095286A Withdrawn JP2000293681A (en) 1999-04-01 1999-04-01 Image filter circuit and filtering method using median filter

Country Status (1)

Country Link
JP (1) JP2000293681A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016082306A1 (en) * 2014-11-28 2016-06-02 上海集成电路研发中心有限公司 Median filtering apparatus and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016082306A1 (en) * 2014-11-28 2016-06-02 上海集成电路研发中心有限公司 Median filtering apparatus and method

Similar Documents

Publication Publication Date Title
US5032838A (en) Variable length code parallel decoding apparatus and method
CN101105932A (en) Image zooming device and method thereof
EP0069542B1 (en) Data processing arrangement
Licciardo et al. Stream processor for real-time inverse Tone Mapping of Full-HD images
CN1253340A (en) Signal processing of distributed operation architecture
JP2857292B2 (en) Apparatus for realizing two-dimensional digital filter
US8135229B1 (en) Image processing method and device
JP2000293681A (en) Image filter circuit and filtering method using median filter
US20050286082A1 (en) Image edge filtering
US20060115150A1 (en) Calculation method of a cumulative histogram
JP3072721B2 (en) Image processing method and apparatus, storage medium for storing image processing program
CN114140479B (en) Optimization method, device and related components for portrait segmentation images
CN118916327B (en) Agile development method of laser line extractor for multiple reflection scene
JP2006201914A (en) Unit, method, and computer program for image filtering
JPH07118002B2 (en) Image processing device
JPS6141273A (en) Picture processor
JP3193285B2 (en) Coding noise reduction filter circuit
US7835584B1 (en) Method and apparatus for processing video data
JP2697679B2 (en) Dither image display device
US6985624B2 (en) Image processing apparatus and its method
JP2000242792A (en) Image processing apparatus and method, and program supply medium for supplying image processing program
CN121074606A (en) Execution method, device and equipment of data processing task and readable storage medium
JPH05233802A (en) High-speed processing system for reducing median noise
JP2000182024A (en) Image processing apparatus and method, and providing medium
JPH0668254A (en) Histogram arithmetic unit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060606