Treść książki
Przejdź do opcji czytnikaPrzejdź do nawigacjiPrzejdź do informacjiPrzejdź do stopki
Medianalgorithmtotheinterpolationof2-Ddigitaldata
21
wellefficientfornoiseswithGaussianandevendistribution(likein[3])arealso
wellknown.
Majorityofmedianfilteringalgorithmsreferstocalculationofamedianfora
sequenceofnumberswiththeoddquantityofterms.Then,amedianisthatrandom
variable,forwhichtheprobabilityofexceedingitsvalue(inplusandinminus)is
notlessthan0.5.Incaseofaserieswiththeoddnumberofterms,themedian
unequivocallytakesitsvaluefromasetofrandomvariables(termsofasequence).
Inthesimplestcase,2-Dmedianfiltercanbedescribedinthefollowingway[3]:
Let{X(*,*)}bea2-Ddiscretesequencesuchthat{X(m,n);m,n∈Z}andZisa
setofintegralnumbers.AlongwiththatwedefineawindowWawithinwhicha
medianiscalculatedinconsecutivestepsofpicturematrixscanning.Anexample
windowmaylooklikethis:
W
a
=
{X(m
+
l
1
,
n
+
l
2
),
-
L
≤
l
1
,
l
2
≤
L}
(6)
withacentralelementinthepointwithcoordinatesof(m,n).Thefilteroutput
sampleisexpressedbytherelation:
Y(m,
n)
=
Med{X(m,
n)
∈
Wa
}
(7)
Itcanbeeasilynoticedthatforsuchdescribedmedianfilter,foreachnatural
valueL,thewindowwillcomprisetheoddnumberofelements.Inthefilteroutput,
oneofX(m,n)valuesincludedinthefilterwindowareawilloccur.
Theissueappearsdifferentlyincaseofawindowwiththeoddnumberof
elements,i.e.forexample:
Wb'
=
{X(m
+
l
1
,
n
+
l
2
),
-
L
≤
l
1
,
l
2
≤
L
+
1}
(8a)
withacentralelementinapointwithcoordinatesof(m+0.5,n+0.5)or
Wb'
'
=
{X(m
+
l
1
,
n
+
l
2
),
-
L
-
1
≤
l
1
,
l
2
≤
L}
(8b)
withacentralelementinapointwithcoordinatesof(m-0.5,n-0.5),and
Y(m
+
0.5,
n
+
0.5)
=
Med{X(m,
n)
∈
Wb
'
}
(9a)
and
Y(m
-
0.5,
n
-
0.5)
=
Med{X(m,
n)
∈
Wb
'
'
}
(9b)
Consideringdependencies(8a)do(9b)andthemediandefinition,itisplainly
prominentthatthemediancannotbedefinedunequivocally,sincethemedianmay
beassignedanynumberfromtheclosedinterval<X1(m,n),X2(m,n)>,where
X1(m,n),X2(m,n)∈{X(m,n)∈Wb}arerespectivelythesmallestandthelargest
numberfromamongthose,whichmeetamediandefinitionwithintheWbwindow.
Inthecasediscussed,mediancanbethisnumericvalue,therandomvariable
X(m,n)ofwhichisnotassumedwithinthewindow.Inthiscase,[4]recommends
thefollowingassumption:
Med
{
X
(
m
,
n
)
∈
Wb
=
0
.
5
l
[
X
1
(
m
,
n
)
+
X
2
(
m
,
n
)]
(10)
Basingontheremarkspresentedabove,whenusinganalgorithmincreasing
picturematrixdensity,applicationofmedianfilterwithuseofawindowwiththe