KR0129786B1 - Medium value filter - Google Patents

Medium value filter

Info

Publication number
KR0129786B1
KR0129786B1 KR1019930012107A KR930012107A KR0129786B1 KR 0129786 B1 KR0129786 B1 KR 0129786B1 KR 1019930012107 A KR1019930012107 A KR 1019930012107A KR 930012107 A KR930012107 A KR 930012107A KR 0129786 B1 KR0129786 B1 KR 0129786B1
Authority
KR
South Korea
Prior art keywords
comparator
output
intermediate value
rij
logic
Prior art date
Application number
KR1019930012107A
Other languages
Korean (ko)
Other versions
KR950001358A (en
Inventor
박종철
심영석
노기홍
Original Assignee
김영욱
생산기술연구원
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 김영욱, 생산기술연구원 filed Critical 김영욱
Priority to KR1019930012107A priority Critical patent/KR0129786B1/en
Publication of KR950001358A publication Critical patent/KR950001358A/en
Application granted granted Critical
Publication of KR0129786B1 publication Critical patent/KR0129786B1/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0248Filters characterised by a particular frequency response or filtering method
    • H03H17/0261Non linear filters
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H21/00Adaptive networks
    • H03H21/0012Digital adaptive filters
    • H03H21/0016Non linear filters

Landscapes

  • Physics & Mathematics (AREA)
  • Nonlinear Science (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Picture Signal Circuits (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

본 발명은 N개의 입력 디지틀 데이타 D1,D2,...,DN중에서 중간값(Dk)를 선택하는 중간값 필터에 관한 것이다. 본 발명에 다른 중간값 필터는 N(N-1)/2개의 비교기(Cij)를 가지며(여기서 N을 홀수이며, i,j,k는 양의 정수), 각각의 비교기(Cij)는 자신의 두 입력단(X1,X2)을 통해 인가되는 입력 데이타의 조합(Di,Dj)을 비교하여 DiDj인 경우에는 그의 출력(Rij)으로서 로직 1을, DiDj인 경우에는 그의 출력(Rij)으로서 로직 0을 출력하며, 상기 비교기(Cij)에서 ij이고 i≠j인 조건을 만족하는 비교수단(10)과; 상기 비교기 출력(Rij)에서 i=k인 경우의 출력 로직 및 j=k인 경우의 반전된 출력 로직의 0 및 1의 개수를 검사하여 각기(N-1)/2 이 될때 상기 입력 데이타(Dk)를 중간값으로 판별하는 판별신호(Sk)를 출력하는 중간값 판별수단(20); 상기 N개의 디지탈 값 D1,D2,...,DN을 입력으로 하며, 상기 중간값 판별수단(20)에서 제공된 상기 판별 신호(Sk)에 대응하는 중간값(Dk)을 선택하여 출력하는 중간값 선택수단(30)을 포함한다.The present invention relates to a median filter for selecting the median value Dk from among N input digital data D 1 , D 2 ,..., D N. The median filter according to the present invention has N (N-1) / 2 comparators Cij (where N is odd and i, j, k is a positive integer), and each comparator Cij has its own Comparing the combination (Di, Dj) of the input data applied through the two input terminals (X1, X2), logic 1 is represented as its output Rij for DiDj, and logic 0 as its output Rij for DiDj. A comparator (10) for outputting and satisfying a condition of ij and i ≠ j in the comparator Cij; In the comparator output Rij, the number of 0 and 1 of the output logic when i = k and the inverted output logic when j = k is checked and the input data Dk when N-1 / 2, respectively. An intermediate value judging means 20 for outputting a judging signal Sk for judging. The N digital values D 1 , D 2 ,..., D N are input, and an intermediate value Dk corresponding to the determination signal Sk provided by the intermediate value determination means 20 is selected and output. And an intermediate value selecting means (30).

Description

중간값 필터Median filter

제1도는 본 발명에 따른 중간값 필터의 개략적인 블록도.1 is a schematic block diagram of a median filter in accordance with the present invention.

제2도는 입력 데이타의 개수(N)이 5일때 입력 데이타 D1를 중간값으로 판별하는 판별부의 회로 구성도.2 is a circuit diagram of a discriminating unit that discriminates input data D 1 as an intermediate value when the number N of input data is five.

제3도는 입력 데이타의 개수(N)이 5일때 입력 데이타 D3를 중간값으로 판별하는 중간값 판별부의 회로 구성도.3 is a circuit diagram of an intermediate value judging unit for judging input data D 3 as an intermediate value when the number N of input data is 5. FIG.

제4도는 제5도에 도시된 구성을 본 발명에 따라 재구성된 회로 구성도.4 is a circuit diagram reconstructed according to the present invention with the configuration shown in FIG.

제5도는 입력 데이타의 개수(N)이 7일때 입력 데이타 D1를 중간값으로 판별하는 중간값 판별부의 회로 구성도.5 is a circuit diagram of an intermediate value judging unit for judging input data D 1 as an intermediate value when the number N of input data is 7. FIG.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

10 : 비교부 20 : 중간값 판별부10: comparison unit 20: intermediate value determination unit

30 : 중간값 선택부 D1,D2,...,DN: 입력 디지틀 데이타30: Median selector D 1 , D 2 , ..., D N : Input digital data

Dk : 중간값 Rij : 비교기 출력Dk: Median Rij: Comparator Output

본 발명은 디지틀 필터에 관한 것으로, 특히 간단한 하드웨어로 다수의 디지틀값중에서 중간값을 선택할 수 있는 중간값(median)필터에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to digital filters and, more particularly, to median filters that allow the selection of a median value from a plurality of digital values with simple hardware.

영상신호나 일반적인 신호를 디지틀로 양자화하여 디지틀화된 신호를 필터링하는 데는 여러가지 필터들이 사용된다. 중간값 필터는 신호성분에 부가된 임펄스 노이즈를 제거하는 동시에 신호의 모서리 부분을 강조하는 비선형 필터로서 여러분야의 디지틀 신호처리에 이용된다.Various filters are used to filter a digitalized signal by quantizing a video signal or a general signal digitally. The median filter is a nonlinear filter that emphasizes the edges of the signal while removing the impulse noise added to the signal components, and is used for digital signal processing in your field.

이러한 중간값 필터는 N개 디지탈 입력 데이타 신호로부터 중간값을 갖는 하나의 신호를 선택하는 기능을 수행하며, 통상 비교부, 중간값 판별부, 중간값 선택부로 구성된다. 2진 코드의 N개의 디지틀 입력 데이타가 D1,D2,...,DN일때, 이들 신호는 조합(Di,Dj), 즉, (D1,D2)(D1,D3),...(D1,DN);(D2,D3),...,(D2,DN);(D3,D4),... 와 같은 방식으로 한쌍의 신호로 조합된다. 이러한 방식에 따르면, 입력 조합의 개수 M은 N(N-1)/2개의 조합을 가질 수 있으며, 이들 조합은 비교부로 제공된다.The median filter performs a function of selecting one signal having a median value from the N digital input data signals, and is usually composed of a comparator, a median value discriminator, and a median selector. When N digital input data of binary code is D 1 , D 2 , ..., D N , these signals are combined (Di, Dj), that is, (D 1 , D 2 ) (D 1 , D 3 ) , ... (D 1 , D N ); (D 2 , D 3 ), ..., (D 2 , D N ); (D 3 , D 4 ), ... Are combined. According to this scheme, the number M of input combinations may have N (N-1) / 2 combinations, which are provided to the comparison unit.

비교부는 이들 조합을 각기 비교하는 M개의 비교기를 가지고 있다. 각각의 비교기는 비교 동작에 의해 논리 1을 출력하는 출력으로서, DiDj인 경우의 제1출력(Rij), Di=Dj인 경우의 제2출력(Qij) 및 DiDj인 경우의 제3출력(Pij)을 가지고 있으며, 이들 출력은 다음단의 중간값 판별부로 제공된다. 중간값 판별부에서는 비교기의 출력(Pij),(Qij) 및 (Rij)을 입력받아 중간값을 선택하고, 중간값 선택부에서는 중간값 판별부로 부터의 판별신호에 따라 N개의 입력 신호로부터 중간값이 선택되어 출력되도록 N개의 입력 디지틀 신호를 스위칭한다.The comparator has M comparators for comparing these combinations, respectively. Each comparator is an output for outputting a logic 1 by a comparison operation, and includes a first output Rij when DiDj, a second output Qij when Di = Dj, and a third output Pij when DiDj. These outputs are provided to the median value discriminator in the next stage. The intermediate value judging section receives the outputs Pij, (Qij) and (Rij) of the comparator and selects the intermediate value. The intermediate value selecting section selects the intermediate value from the N input signals according to the discrimination signal from the intermediate value judging section. Switches the N input digital signals to be selected and output.

종래 기술에 있어서, 중간값 판별부에서 N개의 입력 데이타로 부터 중간값 선택부에서 필요로 하는 판별신호를 발생시키는데 많은 양의 하드웨어가 필요하다.In the prior art, a large amount of hardware is required to generate the discrimination signal required by the intermediate value selector from the N input data in the intermediate value discriminator.

즉, 입력 데이타가 개수가 적은 경우에는 비교기의 개수가 많지않지만, 입력 데이타의 개수가 많은 경우에는 비교기의 개수는 상술한 수식(N(N-1)/2)에 따라 기하급수적으로 증가한다.That is, when the number of input data is small, the number of comparators is not large, but when the number of input data is large, the number of comparators increases exponentially according to the above-described formula (N (N-1) / 2).

또한, 비교기의 개수가 증가됨에 따라 중간값 판별부는 증가된 비교기의 출력 개수를 이용하여 중간값을 판별하기 때문에 그 구성이 복잡해진다. 이러한 문제를 개선하기위하여 중간값 판별부를 구성할 때 롬(ROM)이나 램(RAM)등을 사용하여 테이블 룩업(Table Look-up)방식을 사용하기도한다. 그러나, 이 방법에 의하면 중간값 판별부의 구성 부품수를 줄일 수 있으나 전체 중간값 필터를 EPGA(Field Programable Gate Array)또는 하나의 집적회로(IC)내에서 구현할 때에는 별도의 다른 메모리 소자가 필요하며, 그 결과 회로 기판의 크기와 외부 입출력 단자가 많이 필요하다는 문제가 있었다.In addition, as the number of comparators increases, the configuration of the intermediate value determiner determines the intermediate value by using the increased number of outputs of the comparator. In order to solve this problem, a table look-up method may be used by using a ROM or a RAM when configuring an intermediate value determiner. However, according to this method, the number of components of the intermediate value discrimination unit can be reduced, but when the entire intermediate value filter is implemented in a field programmable gate array (EPGA) or an integrated circuit (IC), a separate memory device is required. As a result, there has been a problem that a large amount of circuit board and external input / output terminals are required.

중간값 필터를 구현하는 다른 방법으로는 입력되는 데이타 D1,D2,...,DN을 소그룹으로 구별하여 비교부내의 비교기 개수와 중간값 판별부의 하드웨어의 복잡도를 줄일 수 있으나, 이 방법을 취할 경우에는 중간값 선택부가 커지며 입력 데이타의 지연으로 인한 래치가 많이 사용된다.As another method of implementing the median filter, the input data D 1 , D 2 , ..., D N can be divided into small groups to reduce the number of comparators in the comparator and the hardware complexity of the median discriminator. In this case, the intermediate value selector becomes large, and latches are frequently used due to delay of input data.

따라서, 본 발명의 목적은 간단한 하드웨어로 구성되는 중간값 판별부를 갖는 중간값 필터를 제공하는데 있다.Accordingly, an object of the present invention is to provide a median filter having a median value discriminating section composed of simple hardware.

본 발명의 바람직한 실시예에 따르면, N개의 입력 디지틀 데이타 D1,D2,...,DN중에서 중간값(Dk)를 선택하는 중간값 필터는:N(N-1)/2개의 비교기(Cij)를 가지며, 각각의 비교기(Cij)는 자신의 두 입력단(X1,X2)을 통해 인가되는 입력 데이타의 조합(Di,Dj)을 비교하여 DiDj인 경우에는 그의 출력(Rij)으로서 로직 1을, DiDj인 경우에는 그의 출력(Rij)으로서 로직 0을출력하며, 상기 비교기(Cij)에서 ij이고 i≠j인 조건을 만족하는 비교수단(10)과;상기 비교기 출력(Rij)중에서 i=k 인 경우의 출력 로직 및 j=k인 경우의 반전된 출력 로직의 0 및 1의 개수를 검사하여 각기 (N-1)/2이 될때 상기 입력 데이타(Dk)를 중간값으로 판별하는 판별 신호(Sk)를 출력하는 중간값 판별수단(20); 상기 N개의 디지탈 값 D1,D2,...,DN을 입력으로 하며, 상기 중간값 판별수단(20)에서 제공된 상기 판별신호(Sk)에 대응하는 중간값을 출력하는 중간값 선택수단(30)을 포함하며, 여기서 N을 홀수이며, i,j,k는 양의 정수인 것을 특징으로 한다.According to a preferred embodiment of the present invention, the median filter for selecting the median value Dk among the N input digital data D 1 , D 2 , ..., D N is: N (N-1) / 2 comparators (Cij), and each comparator (Cij) compares the combination (Di, Dj) of the input data applied through its two input terminals (X1, X2) and, in the case of DiDj, logic 1 as its output (Rij). In the case of DiDj, a logic 0 is output as its output Rij, and the comparator 10 satisfies the condition of ij and i ≠ j in the comparator Cij; and i = in the comparator output Rij. A discrimination signal for checking the number of 0 and 1 of the output logic in the case of k and the inverted output logic in the case of j = k and discriminating the input data Dk as an intermediate value when each becomes (N-1) / 2. An intermediate value judging means 20 for outputting Sk; An intermediate value selection means for inputting the N digital values D 1 , D 2 ,..., D N and outputting an intermediate value corresponding to the determination signal Sk provided by the intermediate value determination means 20. (30), wherein N is odd and i, j, k is a positive integer.

이하, 본 발명에 따라 구성되는 중간값 필터는 첨부된 도면을 참조하여 다음과 같이 상세히 설명될 것이다.Hereinafter, the median filter constructed in accordance with the present invention will be described in detail as follows with reference to the accompanying drawings.

제1도는 본 발명에 따른 중간값 필터의 개략적인 블록도로서 B개의 비트로 이루어진 N(N은 홀수)개의 디지틀값 D1,D2,...,DN을 수신하는 것으로 도시된다.The first turn is shown for receiving an intermediate value B consisting of N bits, a schematic block diagram of the filter (N is an odd number) of the digital values D 1, D 2, ..., D N according to the present invention.

중간값 필터는 입력 신호를 비교하여 비교 결과를 출력하는 비교부(10)와, 비교부(10)의 출력에 따라 N개의 입력 데이타중 임의의 입력이 중간값인지를 판별하는 중간값 판별부(20)와, 중간값 판별부(20)로부터 제공되는 중간값 판별 신호에 따라서 N개의 디지틀값에서 중간값(Dk)이 출력되도록 스위칭하여 중간값을 선택하는 중간값 선택부(30)로 구성된다.The median filter includes a comparator 10 for comparing input signals and outputting a comparison result, and a median value discriminating unit for determining whether an arbitrary input among the N input data is an intermediate value according to the output of the comparator 10 ( 20) and an intermediate value selector 30 for switching the output of the intermediate values Dk from the N digital values according to the intermediate value discrimination signal provided from the intermediate value discriminator 20 to select an intermediate value. .

B비트로 구성된 N개의 디지틀 신호 D1,D2,...,DN는 조합(Di,Dj)의 형태로 비교부(10)로 입력된다. 이때, N개의 입력 데이타는 M(=N(N-1)/2)개의 입력 조합(Di,Dj)으로 구성될 수 있다. M개의 조합이 비교부(10)에 입력되면, 이들 조합의 디지틀값은 각기 대응하는 M개의 비교기에 의해 비교된다. 각각의 비교기가 디지틀 신호의 조합(Di,Dj)을 수신하는 두 입력단(X1,X2)을 갖는 Cij로 정의하면, i는 X1의 입력으로, j는 X2의 입력으로 인가되므로, i=1,2,...,N-1이고, j=2,3,...이 될 수 있다. 여기서, ij이고 i≠j이어야한다.N digital signals D 1 , D 2 ,..., D N composed of B bits are input to the comparator 10 in the form of a combination Di, Dj. In this case, the N input data may be composed of M (= N (N-1) / 2) input combinations Di and Dj. When M combinations are input to the comparator 10, the digital values of these combinations are compared by corresponding M comparators, respectively. If each comparator is defined as Cij with two inputs (X1, X2) receiving a combination of digital signals (Di, Dj), i is applied to the input of X1 and j is the input of X2, so i = 1, 2, ..., N-1, and j = 2,3, ... Where ij and i ≠ j

예를 들어, 중간값 필터 입력의 개수(N)이 5개인 경우, 디지탈 신호의 조합(Di,Dj)은 (D1,D2)(D1,D3),(D1,D4)(D1,D5),;(D2,D3),(D2,D4),(D2,D5);(D3,D4),(D3,D5);For example, if the number N of median filter inputs is five, the combination of digital signals Di and Dj is (D 1 , D 2 ) (D 1 , D 3 ), (D 1 , D 4 ) (D 1 , D 5 ),; (D 2 , D 3 ), (D 2 , D 4 ), (D 2 , D 5 ); (D 3 , D 4 ), (D 3 , D 5 );

(D4,D5)의 10개로 구성된다. 이때, 비교기는 각기 상기 입력 조합을 비교하는C12,C13,(D 4, D 5) is configured to 10 of. At this time, the comparator compares the input combination, respectively, C 12 , C 13 ,

C14,C15,C23,C24,C25,C34,C35,C45로서 총 10개가 된다.C 14 , C 15 , C 23 , C 24 , C 25 , C 34 , C 35 , C 45 , a total of 10.

각각의 비교기(C12,C13,C14,C15,C23,C24,C25,C34,C35,C45)는 비교기의 조합 입력(Di,Dj)에 대한 비교 결과가 DiDj 일때 논리 하이(logic high) 또는 논리 1신호를 출력하고, 그렇지 않을 경우 논리 0을 출력하는 출력(Rij)을 가지고 있다.Each comparator (C 12 , C 13 , C 14 , C 15 , C 23 , C 24 , C 25 , C 34 , C 35 , C 45 ) compares the combined inputs of the comparator (Di, Dj) to DiDj. Has the output Rij that outputs a logic high or logic 1 signal, and otherwise outputs a logic 0.

또한, 각각의 비교기(Cij)는 Di=Dj인 경우의 출력(Qij) 및 DiDj인 경우의 출력(Pij)을 가지고 있으며, 본 발명에서는 이들 출력은 사용하지않는다. 각각의 비교기(Cij)의 출력(Rij)은 중간값 판별부(20)로 제공된다.Each comparator Cij has an output Qij when Di = Dj and an output Pij when DiDj, and these outputs are not used in the present invention. The output Rij of each comparator Cij is provided to the intermediate value discriminating unit 20.

제2도에는 비교부(10)로부터 출력되는 각각의 비교기 출력(Rij)신호가 입력되는 중간값 판별부(20)의 상세 회로도가 도시된다. 중간값 판별부(20)는 M개의 비교기에서 각기 제공되는 출력(Rij)을 수신할때, N개의 입력 데이타중에서 임의의 k번째 입력 데이타(Dk)가 중간값인지 아닌지를 판별하는 구성을 갖는다.FIG. 2 is a detailed circuit diagram of the intermediate value discriminating unit 20 to which the respective comparator output Rij signals output from the comparator 10 are input. The median value discriminating unit 20 has a configuration for determining whether any k-th input data Dk among the N input data is an intermediate value when receiving the output Rij provided from the M comparators.

본 발명에 따르면, N개의 입력 데이타중에서 임의의 k번째 입력 데이타(Dk)가 중간값인지 아닌지를 판별하는데는 비교기 출력(Rij)중에서 i=k 이거나 j=k인 조건에 해당하는 경우만 비교한다. 이러한 조건을 만족하는 비교기 출력(Rij)은 (N-1)개이며, (N-1)개의 비교기(Cij)의 출력(Rij)으로부터 임의의 k번째 데이타가 중간값 인지를 판별한다.According to the present invention, in determining whether or not any k-th input data Dk among the N input data is an intermediate value, it is compared only when the condition corresponding to i = k or j = k in the comparator output Rij. . There are (N-1) comparator outputs Rij that satisfy these conditions, and it is determined whether any k-th data is an intermediate value from the outputs Rij of the (N-1) comparators Cij.

본 발명의 예로 입력 데이타 개수(N)을 5으로 가정하면, 10개의 입력 조합중에서 임의의 k번째 데이타가 중간값 인지를 판단하기위하여 i 또는 j가 k와 같은(i=k,j=k)조건을 만족하는 4개의 비교기 출력(Rij)에 대해서만 판별한다.In the example of the present invention, assuming that the number of input data (N) is 5, i or j is equal to k (i = k, j = k) to determine whether any k th data among 10 input combinations is an intermediate value. Only four comparator outputs Rij satisfying the condition are determined.

임의의 k를 1이라 할때, 상술한 i=k 또는 j=k조건을 만족하는 4개의 비교기의 출력은(R12,R13,R14,R15)가 될 것이다. 따라서, k=1, 즉, D1이 중간값이 되기 위해서는 4개의 비교기(Cij)의 출력(Rij)값, 즉 논리 0과 논리 1의 개수가 (N-1)/2(N=5 경우 논리 0이 2개 논리 1이 2개)때이다. 예를 들어 설명하면, D1이 중간값이 될수있는 경우는 네개의 비교기(C12,C13,C14,C15)의 출력(R12,R13,R14,R15)값이 각각 다음과 같을때만 가능할 것이다 즉,(R12,R13,R14,R15)이 각기 (0011),(0101),(0110),(1001)When any k is 1, the outputs of the four comparators satisfying the above i = k or j = k conditions will be (R 12 , R 13 , R 14 , R 15 ). Therefore, k = 1, that is, in order for D 1 to become an intermediate value, the output Rij values of the four comparators Cij, that is, the number of logic 0 and logic 1 are (N-1) / 2 (N = 5). Logic 0 is 2 logic 1 is 2). For example, if D 1 can be an intermediate value, the outputs of the four comparators (C 12 , C 13 , C 14 , C 15 ) (R 12 , R13, R 14 , R 15 ) are respectively (R 12 , R 13 , R 14 , R 15 ), respectively, is equal to (0011), (0101), (0110), (1001)

,(1010),(1100)일 경우 D1이 중간값이 된다. 이와같이 (R12,R13,R14,R15)로부터 상술한 조건을 만족시키는 중간값 판별 회로는 제2도와 같다. 제2도는 상기 결과에 따라 중간값 판별부(20)를 배타적 OR(XOR)게이트와 AND-OR게이트로 표현한 것이며, D1이 중간값일 경우 중간값 판별부(20)는 판별신호 S1로서 논리 1을 출력한다. 상기 결과를 이용하여 제2도에 도시된 회로를 구현하는 것은 본 기술분야에서 공지된 사실이므로 상세한 설명은 생략한다.In the case of (1010) and (1100), D 1 is an intermediate value. Thus, the intermediate value discrimination circuit which satisfies the above conditions from (R 12 , R 13 , R 14 , R 15 ) is as shown in FIG. 2. 2 illustrates the intermediate value discrimination unit 20 as an exclusive OR (XOR) gate and an AND-OR gate according to the above results. When D 1 is an intermediate value, the intermediate value discrimination unit 20 is configured as a determination signal S 1 . Outputs 1 Implementation of the circuit shown in FIG. 2 using the above results is well known in the art, and thus a detailed description thereof will be omitted.

한편, Dk는 중간값이라고 가정할때 비교기 출력(Rij)중에서 i=k인 경우가 아닌 j=k인 경우에는 비교기의 출력값을 반전하여 로직 0 및 1의 수가 (N-1)/2가 되는지를 검사해야 한다. 예를 들어, 임의의 입력 데이타 D3이 중간값인지를 판별하는 경우 비교기(Cij)중에서 i=3, 혹은 j=3인 경우가 나타난다. 입력 데이타 D3가 중간값인지를 비교하는 비교기들{C23,C23,C34,C35}의 4개가 될 것이며, 이들 비교기들로 부터 배타적 OR을 포함하는 회로를 구성하면 제3도와 같다. 도시된 바와 같이, 비교기의 출력(Ri3, j=3)을 반전하여 사용하여야한다.On the other hand, if Dk is an intermediate value, if j = k instead of i = k in the comparator output Rij, the output value of the comparator is inverted so that the number of logic 0 and 1 becomes (N-1) / 2. Should be inspected. For example, when determining whether any input data D 3 is an intermediate value, a case where i = 3 or j = 3 appears in the comparator Cij. There will be four comparators {C 23 , C 23 , C 34 , C 35 } for comparing whether the input data D 3 is an intermediate value, and a circuit including exclusive OR from these comparators is shown in FIG. . As shown, the output of the comparator (R i3 , j = 3) should be inverted and used.

제4도에서는 제3도에 도시된 회로 구성을 통상의 논리식을 이용하여 재구성한 판별부를 도시한다. 본 발명에 따르면, 논리식을 이용하지않고 다음의 규칙을 이용하여 비교기 출력(Rij)을 그대로 사용하여 쉽게 구성할 수 있다. 즉, 비교부(10)로부터 중간값 판별부(20)로 제공되는 비교기 출력(Rij)중에서 j=3인 입력이 0 개이거나 두개(2)인 경우는 그대로 배타적 OR 게이트로 구성하고 j=3인 입력이 하나(1)인 경우는 배타적 OR 게이트와 배타적 NOR 게이트로 바꾸어 구성하고 입력을 (Rij)로 표현하면 된다. 상술한 방식에 따라 제3도에 도시된 배타적 OR게이트의 구성은 제4도와 같이 변경된 배타적 NOR 게이트로 구성된다.FIG. 4 shows a discriminating unit in which the circuit configuration shown in FIG. 3 is reconstructed using ordinary logic. According to the present invention, it is possible to easily configure the comparator output Rij without using a logical expression and using the following rule. That is, in the comparator output Rij provided from the comparator 10 to the intermediate value discrimination unit 20, when there are zero or two inputs with j = 3, the exclusive OR gate is configured as it is and j = 3. If the input is one (1), it can be configured by switching to an exclusive OR gate and an exclusive NOR gate and expressing the input as (Rij). According to the above-described scheme, the configuration of the exclusive OR gate shown in FIG. 3 is composed of the modified exclusive NOR gate as shown in FIG.

전술한 중간값 판별에 있어서, 입력 데이타 D1,D2,...,DN이 모두 다른 값을 갖는다면 중간값을 항상 선택할 수 있으나, 만일 i,j≤N, ij인 조건하에서 Di=Dj인 경우 이들 Di와 Dj를 비교하는 비교기(Cij)의 출력(Rij)은 0 이 된다. 또한 i,j≤N, ij인 조건하에서 Di=Dj인 경우, 이들 Di와 Dj를 비교하는 비교기(Cij)는 그의 출력(Rij)으로서 1을 출력하게 된다. 따라서, 이러한 규칙을 Di 와 Dj에 대한 식으로 표현하면 다음과 같다.In the above-described determination of the intermediate value, the intermediate value can always be selected if the input data D 1 , D 2 , ..., D N all have different values, but if i, j≤N, ij, Di = In the case of Dj, the output Rij of the comparator Cij comparing these Di and Dj is zero. When Di = Dj under the conditions i, j ≤ N and ij, the comparator Cij comparing these Di and Dj outputs 1 as its output Rij. Therefore, this rule is expressed as Di and Dj as follows.

상기 식(1)에서 ε은 미세한 양의 값을 나타낸다. 따라서, Dj=Di라 해도 상기 식(1)에 의해 항상 중간값이 선택될 수 있다.In the formula (1), ε represents a minute positive value. Therefore, even if Dj = Di, the intermediate value can always be selected by the above equation (1).

즉 비교기의 출력으로 R을 사용할 경우 비교기의 다른 출력 P는 R의 역이며, Q는 Di=Dj인 경우 출력은 1이 되고 그 나머지 0이 되는 출력이므로, 이러한 P,Q의 출력은 본 발명의 중간값 판별부에서 사용해서는 안된다. 반대로 비교기의 출력을 P로 사용할 경우 Q,R의 출력은 사용하지 않는다.That is, when using R as the output of the comparator, the other output P of the comparator is the inverse of R, and when Q is Di = Dj, the output becomes 1 and the remaining 0 becomes the output of the P and Q. It should not be used in the median determination unit. On the contrary, if the output of the comparator is used as P, the outputs of Q and R are not used.

비교기의 출력으로 P를 사용한다면 중각값 Dk는 다음과 같이 선택될 수 있다. 먼저 중간값 Dk를 가정하고 비교기 출력(Pij)중에서 j=k인 경우의 출력 로직 및 i=k인 경우의 반전된 출력 로직 0 및 1의 수가 (N-1)/2가 되는 지를 검사하면 된다. 또한 비교부는 입력 조합(Di,Dj)의 값이 동일할때, ij이면 출력 P는 로직 1가 되고, ij인 경우 출력 P는 로직 0이 된다. 즉, P는 전술한 R의 역이므로 R의 규칙에 비교 판별부의 역을 대입하면 가능하다.If P is used as the output of the comparator, the median value Dk can be selected as follows. First, assuming the intermediate value Dk, check whether the output logic of j = k and the number of inverted output logic 0 and 1 when i = k becomes (N-1) / 2 in the comparator output Pij. . In addition, when the values of the input combinations Di and Dj are the same, the output P becomes logic 1 if ij, and the output P becomes logic 0 when ij. That is, since P is the inverse of R described above, it is possible to substitute the inverse of the comparison determination unit in the rule of R.

상술한 규칙은 일반적인 N에 대해 확장 가능하다. 그 예로, N이 7일 경우 비교기의 조합은 {C12,C13,C14,C15,C16,C17,;C23,C24,C25,C26,C27,;C34,C35,C36,C37;C45,C46,C47 The above rules are extensible for general N. For example, if N is 7, the combination of comparators is {C 12 , C 13 , C 14 , C 15 , C 16 , C 17 ,; C 23 , C 24 , C 25 , C 26 , C 27 ,; C 34 , C 35 , C 36 , C 37 ; C 45 , C 46 , C 47

;C56,C57;C67}로 총 21개의 비교기가 필요하고, D1이 중간값 인지를 판별하는 판별 회로는 상술한 규칙을 만족하는 회로를 구성함으로써 제5도와 같은 중간값 판별부로서 구현될 수 있을 것이다. 마찬가지로, 나머지 D2,D3,D4,D5,D6,D7의 중간값 판별부의 회로 구성도 상술한 규칙을 이용하여 용이하게 구현될 수 있다.C 56 , C 57 ; C 67 }, a total of 21 comparators are required, and the discrimination circuit for determining whether D 1 is an intermediate value is configured as a median value discriminating unit as shown in FIG. Could be implemented. Similarly, the circuit configuration of the intermediate value discriminating unit of the remaining D 2 , D 3 , D 4 , D 5 , D 6 , and D 7 can be easily implemented using the above-described rules.

그러므로, 상술한 바와 같이, 본 발명에 따른 중간값 필터는 사전에 알고 있는 중간값에 대한 정보를 이용함을써 별도의 메모리의 사용없이 간단한 하드웨어의 구조로서 중간값을 선택할 수 있다.Therefore, as described above, the median filter according to the present invention can select the median as a simple hardware structure without using a separate memory by using information about the median known in advance.

Claims (4)

N 개의 입력 디지틀 데이타 D1,D2,..., DN중에서 중간값(Dk)를 선택하는 중간값 필터에 있어서, N(N-1)/2개의 비교기(Cij)를 가지며, 각각의 비교기(Cij)는 자신의 두 입력단(X1,X2)을 통해 인가되는 입력 데이타의 조합(Di,Dj)을 비교하여 DiDj인 경우에는 그의 출력(Rij)으로서 로직 1을, DiDj인 경우에는 그의 출력(Rij)으로서 로직 0을 출력하며, 상기 비교기(Cij)에서 ij이고 i≠j인 조건을 만족하는 비교수단(10)과; 상기 비교기 출력(Rij)중에서 i=j인 경우의 출력 로직 및 i=k인 경우의 반전된 출력 로직의 0 및 1의 개수를 검사하여 각기 (N-1)/2이 될때 상기 입력 데이타(Dk)를 중간값으로 판별하는 판별 신호(Sk)를 출력하는 중간값 판별수단(20); 상기 N 개의 디지탈값 D1, D2, . . ., DN을 입력으로 하며, 상기 중간값 판별수단(20)에서 제공된 상기 판별 신호(Sk)에 대응하는 중간값(Dk)을 선택하여 출력하는 중간값 선택수단(30)을 포함하며, 여기서 N을 홀수이며, i, j, k는 양의 정수인 중간값 필터.In the median filter for selecting the median value Dk among the N input digital data D 1 , D 2 ,..., And D N , each N (N-1) / 2 comparators Cij are provided. The comparator Cij compares a combination Di and Dj of the input data applied through its two input terminals X1 and X2 and compares logic 1 as its output Rij in the case of DiDj and its output in the case of DiDj. A comparator (10) for outputting logic 0 as (Rij) and satisfying a condition of ij and i ≠ j in the comparator Cij; In the comparator output Rij, the number of 0 and 1 of the output logic in the case of i = j and the inverted output logic in the case of i = k is examined, and the input data Dk is obtained when (N-1) / 2 respectively. An intermediate value judging means 20 for outputting a judging signal Sk for judging. The N digital values D 1 , D 2 ,. . , D N as an input, and including an intermediate value selecting means (30) for selecting and outputting an intermediate value (Dk) corresponding to the discriminating signal (Sk) provided by the intermediate value determining means (20), wherein A median filter in which N is odd and i, j, k are positive integers. 제1항에 있어서, 상기 비교수단(10)은 상기 입력 조합(Di,Dj)에서 Di 와 Dj의 값이 동일할때, ij이면 비교기 출력(Rij)는 로직 0 가 되고, ij인 경우 비교기 출력(Rij)는 로직 1 이 되도록 하는 중간값 필터.The comparator output Rij according to claim 1, wherein when the values of Di and Dj are the same in the input combination Di and Dj, the comparator output Rij becomes logic 0, and the comparator output is ij. (Rij) is the median filter that makes logic 1 N 개의 입력 디지틀 데이타 D1,D2,..., DN중에서 중간값(Dk)를 선택하는 중간값 필터에 있어서, N(N-1)/2개의 비교기(Cij)를 가지며, 각각의 비교기(Cij)는 자신의 두 입력단(X1,X2)을 통해 인가되는 입력 데이타의 조합(Di,Dj)을 비교하여 DiDj인 경우에는 비교기 출력(Rij)으로서 로직 1을, DiDj인 경우에는 비교기 출력(Rij)으로서 로직 0을 출력하며, 상기 비교기(Cij)에서 ij이고 i≠j인 조건을 만족하는 비교수단(10)과; 상기 비교기 출력(Rij)중에서 j=k인 경우의 출력 로직 및 i=k인 경우의 반전된 출력 로직의 0 및 1의 개수가 각기 (N-1)/2이 되는지를 검사하여 각기 (N-1)/2 이 될때 상기 입력 데이타(Dk)를 중간값으로 판별하는 판별 신호(Sk)를 출력하는 중간값 판별수단(20); 상기 N 개의 디지탈값 D1,D2,..., DN을 입력으로 하며, 상기 중간값 판별 수단(20)에서 제공된 상기 판별 신호에 대응하는 중간값(Dk)을 선택하여 출력하는 중간값 선택수단(30)을 포함하며, 여기서 N 은 홀수이며, i, j, k 는 양의 정수인 중간값 필터.In the median filter for selecting the median value Dk among the N input digital data D 1 , D 2 ,..., And D N , each N (N-1) / 2 comparators Cij are provided. The comparator Cij compares the combination (Di, Dj) of input data applied through its two input terminals X1 and X2 and compares logic 1 as a comparator output Rij for DiDj and a comparator output for DiDj. A comparator (10) for outputting logic 0 as (Rij) and satisfying a condition of ij and i ≠ j in the comparator Cij; In the comparator output Rij, it is checked whether the number of 0 and 1 of the output logic when j = k and the inverted output logic when i = k becomes (N-1) / 2, respectively. Intermediate value discriminating means (20) for outputting a discriminating signal (Sk) for discriminating the input data (Dk) as an intermediate value when 1) / 2 is obtained; An intermediate value for selecting and outputting the N digital values D 1 , D 2 ,..., And D N , and selecting and outputting an intermediate value Dk corresponding to the determination signal provided by the intermediate value determining means 20. Median filter comprising selection means (30), where N is an odd number and i, j, k are positive integers. 제3항에 있어서, 상기 비교수단(10)은 상기 입력 조합(Di,Dj)에서 Di 와 Dj의 값이 동일할때, ij이면 비교기 출력(Rij)는 로직 1 가 되고, ij인 경우 비교기 출력(Rij)는 로직 0 이 되도록 하는 중간값 필터.The comparator output Rij according to claim 3, wherein when the values of Di and Dj are the same in the input combination Di, Dj, the comparator output Rij becomes logic 1, and when the ij is comparator output. (Rij) is the median filter that causes logic to be zero.
KR1019930012107A 1993-06-30 1993-06-30 Medium value filter KR0129786B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019930012107A KR0129786B1 (en) 1993-06-30 1993-06-30 Medium value filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019930012107A KR0129786B1 (en) 1993-06-30 1993-06-30 Medium value filter

Publications (2)

Publication Number Publication Date
KR950001358A KR950001358A (en) 1995-01-03
KR0129786B1 true KR0129786B1 (en) 1998-10-01

Family

ID=19358339

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019930012107A KR0129786B1 (en) 1993-06-30 1993-06-30 Medium value filter

Country Status (1)

Country Link
KR (1) KR0129786B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060075808A (en) * 2004-12-29 2006-07-04 주식회사 알티비코리아 The method of snow removal and deicing on the track beam
KR101704439B1 (en) * 2010-09-28 2017-02-09 삼성전자주식회사 Apparatus and method for median filtering

Also Published As

Publication number Publication date
KR950001358A (en) 1995-01-03

Similar Documents

Publication Publication Date Title
US5535402A (en) System for (N•M)-bit correlation using N M-bit correlators
JPH04312184A (en) Method and apparatus for detecting edge of image processing system
KR100258870B1 (en) Binary comparison circuit
KR0129786B1 (en) Medium value filter
US4695971A (en) Circuit for rapidly determining the greatest difference among three binary numerical values
KR0146655B1 (en) Multi-nary and logic device
US6836525B1 (en) Method for establishing a gray code and related counter circuit
KR0146656B1 (en) Multi-nary or logic device
US6341296B1 (en) Method and apparatus for efficient selection of a boundary value
US3277462A (en) Parallel-parallel encoding system
US4933978A (en) Method and apparatus for determining the value of a sample in the mth position of an ordered list of a plurality of samples
Astola et al. New digit-serial implementations of stack filters
US4918642A (en) Isolated carry propagation fast adder
Gevorkian et al. Modified K-nearest neighbour filters for simple implementation
Woolfries et al. Fast adaptive image processing in fpgas using stack filters
KR100548800B1 (en) Digital filter
KR100239369B1 (en) Median filter
US5941937A (en) Layout structure for barrel shifter with decode circuit
KR200232068Y1 (en) 2's complement converter for high speed operation
Falkowski et al. Properties and applications of paired Haar transform
KR0136433B1 (en) Variable counter
SU1107291A2 (en) Digital filter
JP2533909B2 (en) Digital data sorting method and circuit configuration thereof
JPS6385930A (en) Signal processing circuit
US4859985A (en) Reconfigurable parameter filter having filter sections selectively operating independently on respective low precision binary numbers or together on a higher precision binary number

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20010628

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee