|
From: Eyal Spielman on 19 Jun 2008 03:39 Rune Allnor <allnor(a)tele.ntnu.no> wrote in message <1ab41a94-4de0-44da-8801- 7033c962de59(a)34g2000hsh.googlegroups.com>... > On 18 Jun, 17:03, "Eyal Spielman" <eyal_...(a)yahoo.com> wrote: > > Hi all, > > > > I have three signals in the frequency domain, which > > arranged in mathematical way as follow: > > Your description doesn't correspond to anything > I am familiar with. Since you ask to help with > expressing an algorithm in terms of maths, I suspect > the mathemathical description might be flawed. > > Could you please describe the problem in plain text? > > Rune
From: Eyal Spielman on 19 Jun 2008 04:43 Rune Allnor <allnor(a)tele.ntnu.no> wrote in message <1ab41a94-4de0-44da-8801- 7033c962de59(a)34g2000hsh.googlegroups.com>... > On 18 Jun, 17:03, "Eyal Spielman" <eyal_...(a)yahoo.com> wrote: > > Hi all, > > > > I have three signals in the frequency domain, which > > arranged in mathematical way as follow: > > Your description doesn't correspond to anything > I am familiar with. Since you ask to help with > expressing an algorithm in terms of maths, I suspect > the mathemathical description might be flawed. > > Could you please describe the problem in plain text? > > Rune Hi Rune, The signal M is a fourier transform of a random matrix, and R is a low pass filter. I make a simulation in the frequency domain. m = rand(64); M = fftshift(fft2(fftshift(m-mean(m(:))))); R = zeros(64); R(28:36,28:36)=1; Also I have a target image o, o = double(rgb2gray(imread('***.bmp'))); O = fftshift(fft2(fftshift(o-mean(o(:))))); In the case that I don't use the low pass the order of the simulation is: result = conv2(conv2(O,M),M); Since m is a random matrix, conv2(M,M) gives strong delta function (DC value) plus very small energy in the rest of the spectrum. In this case I can change the order of the simulation (without changing the result, of course), result = conv2(conv2(M,M),O); by taking conv2(M,M) first, I can suppress the very small energy from the spectrum and keep the DC value, and then to make a convolution with O which exactly reconstruct O. In the case that I do use the low pass the simulation is: result_lpf = conv2((conv2(O,M).*R),M); My problem is, how do I suppress these tiny energy components from the spectrum (and keep the DC value) in this case.
From: Rune Allnor on 19 Jun 2008 05:25 On 19 Jun, 10:43, "Eyal Spielman" <eyal_...(a)yahoo.com> wrote: > Rune Allnor <all...(a)tele.ntnu.no> wrote in message > > <1ab41a94-4de0-44da-8801- > 7033c962d...(a)34g2000hsh.googlegroups.com>... > > > On 18 Jun, 17:03, "Eyal Spielman" <eyal_...(a)yahoo.com> > wrote: > > > Hi all, > > > > I have three signals in the frequency domain, which > > > arranged in mathematical way as follow: > > > Your description doesn't correspond to anything > > I am familiar with. Since you ask to help with > > expressing an algorithm in terms of maths, I suspect > > the mathemathical description might be flawed. > > > Could you please describe the problem in plain text? > > > Rune > > Hi Rune, > > The signal M is a fourier transform of a random matrix, and > R is a low pass filter. I make a simulation in the > frequency domain. > > m = rand(64); > M = fftshift(fft2(fftshift(m-mean(m(:))))); > R = zeros(64); > R(28:36,28:36)=1; > > Also I have a target image o, > > o = double(rgb2gray(imread('***.bmp'))); > O = fftshift(fft2(fftshift(o-mean(o(:))))); Change those names! That's a disaster waiting to happen. To see why, take a look at your keyboard. What key is located on the line above the 'o' key, immediately to its right? It doesn't take much of a miss when you're hacking away, to type the wrong character. And when (not if) that happens you will find yourself in serious trouble. > In the case that I don't use the low pass the order of the > simulation is: > > result = conv2(conv2(O,M),M); Wrong. First, why would you apply two convolutions? One ought to be enough. Second, convolutions take place in spatial domain wheras M comtains frequency domain data. Substitute 'm' for 'M' and see if things improve. In general, you need to look up the basics on filtering, amd maybe make a few tutorials and tests on simple data, so that you understand how filtering works. Leave the images out of this while you do the learning excercises. Rune
|
Pages: 1 Prev: Solving Quadratic equations Next: read text and binary data |