[GRASSLIST:9631] Re: filtering with FFT
Markus Neteler
neteler at itc.it
Fri Dec 23 11:28:15 EST 2005
Martin,
I have made these steps
g.region rast=tm1
i.fft in=tm1 real=tm1_r imag=tm1_i --o
# g.region rast=tm1_r
# r.circle -b out=ff coord=-769058,-988168 max=1550 --o
r.circle -b out=ff coord=-769058,-988168 max=10550 --o
d.rast tm1_r
d.rast -o ff
r.mapcalc 'mymask=if(isnull(ff),1,null())'
g.rename rast=mymask,MASK
i.ifft real=tm1_r imag=tm1_i out=tm1_hp --o
g.remove rast=MASK
# g.region rast=tm1
r.colors map=tm1_hp col=grey.eq
d.rast tm1
d.rast tm1_hp
and get the same ugly result.
I suspect that 'krovak' with it's negative coordinates may be
the case to let misbehave i.[i]fft.
You may reproject to an UTM location and try again.
If this works, we have to understand what i.[i]fft doesn't
work with negative coordinates. If it doesn't work, the
problem is more generic.
Markus
On Thu, Dec 22, 2005 at 09:06:26PM +0100, Martin Landa wrote:
> Hi Markus,
>
> > can you put a mini location somewhere to play?
>
> the dataset which I use for lessons "Image processing" [1] (only in
> Czech) at my university
> is available at [2].
>
> [1] http://gama.fsv.cvut.cz/wiki/index.php/Zpracov%C3%A1n%C3%AD_obrazov%C3%BDch_dat
>
> [2]
> http://grass.fsv.cvut.cz/~martin/vyuka/zzoz/datasety/
>
> Best regards, Martin
>
> PS: merry Christmas all GRASS developers/users...
>
> >
> > Markus
> >
> > On Mon, Dec 19, 2005 at 10:38:43PM +0100, Martin Landa wrote:
> > > Hi all,
> > >
> > > according to OSS GIS: A GRASS GIS Approach (see page 243) I am trying
> > > to apply high pass filter with FFT. I always get a strange result
> > > image (see the attached file).
> > >
> > > g.region rast=tm1
> > > i.fft in=tm1 real=tm1_r imag=tm1_i
> > > g.region rast=tm1_r
> > > r.circle -b out=ff coord=-769058,-988168 max=1550
> > > r.mapcalc 'MASK=if(isnull(ff),1,null())'
> > > i.ifft real=tm1_r imag=tm1_i out=tm1_hp
> > > g.remove rast=MASK
> > > g.region rast=tm1
> > > r.colors map=tm1_hp col=grey.eq
> > > d.rast tm1_hp
> > >
> > > I don't know where I am wrong ... Does anyone have the same problem?
> > >
> > > Thanks for help, best regards,
> > >
> > > Martin
> >
> >
> >
> > --
> > Markus Neteler <neteler itc it> http://mpa.itc.it
> > ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
> > MPBA - Predictive Models for Biol. & Environ. Data Analysis
> > Via Sommarive, 18 - 38050 Povo (Trento), Italy
> >
--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy
More information about the grass-user
mailing list