Mystery formula...
- From: Don <phoney.email@xxxxxxxxx>
- Date: Sat, 11 Jun 2005 19:05:58 +0200
Well, it's a mystery to me... Can someone please explain the following
formula:
N(i,j)=Sum(m=-1 to 2) Sum(n=-1 to 2) O(i+m,j+n) R(m-dx) R(dy-n)
where
R(x)=1/6[P(x+2)^3 - 4P(x+1)^3 + 6P(x)^3 - 4P(x-1)^3]
where
P(x) = {x x>0}
P(x) = {0 x<=0}
This is how far I got, but somehow it doesn't seem right:
Newpix(i, j) = 0
For m = -1 To 2
For n = -1 To 2
x = m - dx
p1 = (x + 2) ^ 3: If p1 < 0 Then p1 = 0
p2 = (x + 1) ^ 3: If p2 < 0 Then p2 = 0
p3 = x ^ 3: If p3 < 0 Then p3 = 0
p4 = (x - 1) ^ 3: If p4 < 0 Then p4 = 0
rm = (p1 - 4 * p2 + 6 * p3 - 4 * p4) / 6
x = dy - n
p1 = (x + 2) ^ 3: If p1 < 0 Then p1 = 0
p2 = (x + 1) ^ 3: If p2 < 0 Then p2 = 0
p3 = x ^ 3: If p3 < 0 Then p3 = 0
p4 = (x - 1) ^ 3: If p4 < 0 Then p4 = 0
rn = (p1 - 4 * p2 + 6 * p3 - 4 * p4) / 6
Newpix(i, j) = Newpix(i, j) + _
(Oldpix(i + m, j + n) * rm * rn)
Next n
Next m
Thanks!
Don.
.
- Prev by Date: Re: probability
- Next by Date: Re: Differentiability at a point: understanding starting from set theory; request for help.
- Previous by thread: Re: Mathematical cartoons (related to simplification)
- Next by thread: Re: Differentiability at a point: understanding starting from set theory; request for help.
- Index(es):