convolution frequency relation
Message-ID:
Subject:
convolution-frequency relation
Date:Fri, 17 Oct 2008 17:50:50 +0100
17-OCT-2008 Hi all -- I'm using two Gaussian kernels (5x5) and (15x15) to convolve duplicates of an image, which I'm then differencing (small blur minus big blur); the kernel coefficients are as follows: 5x5 1 1 2 1 1 1 2 4 2 1 2 4 8 4 2 1 2 4 2 1 1 1 2 1 1 15x15 2 2 3 4 5 5 6 6 6 5 5 4 3 2 2 2 3 4 5 7 7 8 8 8 7 7 5 4 3 2 3 4 6 7 9 10 10 11 10 10 9 7 6 4 3 4 5 7 9 10 12 13 13 13 12 10 9 7 5 4 5 7 9 11 13 14 15 16 15 14 13 11 9 7 5 5 7 10 12 14 16 17 18 17 16 14 12 10 7 5 6 8 10 13 15 17 19 19 19 17 15 13 10 8 6 6 8 11 13 16 18 19 20 19 18 16 13 11 8 6 6 8 10 13 15 17 19 19 19 17 15 13 10 8 6 5 7 10 12 14 16 17 18 17 16 14 12 10 7 5 5 7 9 11 13 14 15 16 15 14 13 11 9 7 5 4 5 7 9 10 12 13 13 13 12 10 9 7 5 4 3 4 6 7 9 10 10 11 10 10 9 7 6 4 3 2 3 4 5 7 7 8 8 8 7 7 5 4 3 2 2 2 3 4 5 5 6 6 6 5 5 4 3 2 2 These are the kernels that come canned with NIH-Image. I have two questions: 1. I don't know how these particular kernels are computed in order to result in such relatively small integer coefficients. What is a simple method to obtain identical or similar results for arbitrary size matrices? 2. Is there a reasonably straightforward means of quantifying the spread in spatial frequencies defined by these (or any pair of) Gaussians? Many thanks in advance for any help. Regards, mark jonathan horn
Message-ID:
Subject:
Re: convolution-frequency relation
Date:Mon, 20 Oct 2008 09:40:56 +0100
On Oct 17, 5:50=A0pm, mark_h...@sbcglobal.net wrote: > 17-OCT-2008 > > Hi all -- > > I'm using two Gaussian kernels (5x5) and (15x15) to convolve > duplicates of an image, which I'm then differencing (small blur minus > big blur); the kernel coefficients are as follows: > > 5x5 > > 1 =A01 =A02 =A01 =A01 > 1 =A02 =A04 =A02 =A01 > 2 =A04 =A08 =A04 =A02 > 1 =A02 =A04 =A02 =A01 > 1 =A01 =A02 =A01 =A01 > > 15x15 > > 2 2 =A03 =A04 =A05 =A05 =A06 =A06 =A06 =A05 =A05 =A04 =A03 2 2 > 2 3 =A04 =A05 =A07 =A07 =A08 =A08 =A08 =A07 =A07 =A05 =A04 3 2 > 3 4 =A06 =A07 =A09 10 10 11 10 10 =A09 =A07 =A06 4 3 > 4 5 =A07 =A09 10 12 13 13 13 12 10 =A09 =A07 5 4 > 5 7 =A09 11 13 14 15 16 15 14 13 11 =A09 7 5 > 5 7 10 12 14 16 17 18 17 16 14 12 10 7 5 > 6 8 10 13 15 17 19 19 19 17 15 13 10 8 6 > 6 8 11 13 16 18 19 20 19 18 16 13 11 8 6 > 6 8 10 13 15 17 19 19 19 17 15 13 10 8 6 > 5 7 10 12 14 16 17 18 17 16 14 12 10 7 5 > 5 7 =A09 11 13 14 15 16 15 14 13 11 =A09 7 5 > 4 5 =A07 =A09 10 12 13 13 13 12 10 =A09 =A07 5 4 > 3 4 =A06 =A07 =A09 10 10 11 10 10 =A09 =A07 =A06 4 3 > 2 3 =A04 =A05 =A07 =A07 =A08 =A08 =A08 =A07 =A07 =A05 =A04 3 2 > 2 2 =A03 =A04 =A05 =A05 =A06 =A06 =A06 =A05 =A05 =A04 =A03 2 2 > > These are the kernels that come canned with NIH-Image. =A0I have two > questions: > > 1. =A0I don't know how these particular kernels are computed in order to > result in such relatively small integer coefficients. =A0What is a > simple method to obtain identical or similar results for arbitrary > size matrices? Inaccurately if they are meant to be a 2D Gaussian. The centre line of the first 5x5 matrix should look more like 1 5 8 5 1, 2 8 13 8 2 or even 1 4 6 4 1 and the extreme corner elements should round to 0. BTW For the larger one I think a peak height of 18 gives smaller residual error from rounding ona 15x15 grid. The lines of Pascals triangle are not a bad integer coefficient approximation to a Gaussian. Or int( 0.5+A*exp( -B*(x^2 + y^2)) For suitable choices of A and B. > 2. Is there a reasonably straightforward means of quantifying the > spread in spatial frequencies defined by these (or any pair of) > Gaussians? > > Many thanks in advance for any help. Their Fourier transform shows you how they attentaute various frequencies. Regards, Martin Brown



RSS News Feed