Fourier transforms for multitemporal analysis

From GRASS-Wiki
Jump to navigation Jump to search

Fourier transforms for detecting multitemporal landscape fragmentation by remote sensing GRASS GIS and R code used in:

Rocchini, D., Metz, M., Ricotta, C., Landa, M., Frigeri, A., Neteler, M. (2013). Fourier transforms for detecting multitemporal landscape fragmentation by remote sensing. International Journal of Remote Sensing, 34: 8907-8916. (DOI) (IF: 1.138)

GRASS GIS: Fourier transform calculation

The used data are from the North Carolina set available for free at:

# Setting the region of interest based on a Landsat image
g.region rast=lsat7_2002_10 -p

Performing PCA on a multitemporal set of images (Landsat images in this case)


i.pca input=lsat5_1987_10,lsat5_1987_20,lsat5_1987_30,lsat5_1987_40,lsat5_1987_50,lsat5_1987_70 \


i.pca input=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70 \

Showing the first principal component


d.mon x0
d.rast lsat5_1987_pca.1


d.mon x1
d.rast lsat7_2002_pca.1

Fourier transform


i.fft input=lsat5_1987_pca.1 real=lsat5_1987_pca1.real imaginary=lsat5_1987_pca1.imag


i.fft input=lsat7_2002_pca.1 real=lsat7_2002_pca1.real imaginary=lsat7_2002_pca1.imag

Creating Fig. 2 in Rocchini et al. (2013)


d.mon x2
d.rast lsat5_1987_pca1.real


d.mon x3
d.rast lsat7_2002_pca1.real

Additional example with MODIS data: Fig. 6 in Rocchini et al. (2013)

Import data: image covering a temporal period from 2005-02-02 to 2005-03-05 (band 2 being used) input=Goodes.EUAS.2005033.band2.tif output=Goodes.EUAS.2005033.band2

Import data: image covering a temporal period from 2005-07-12 to 2005-08-12 (band 2 being used) input=Goodes.EUAS.2005193.band2.tif output=Goodes.EUAS.2005193.band2

Fourier transforms

i.fft input=Goodes.EUAS.2005033.band2 real=Goodes.EUAS.2005033.band2.real imaginary=Goodes.EUAS.2005033.band2.imag
i.fft input=Goodes.EUAS.2005193.band2 real=Goodes.EUAS.2005193.band2.real imaginary=Goodes.EUAS.2005193.band2.imag

R: statistical analysis

Importing the Fourier image from GRASS GIS by the spgrass6 library

    cat=c(F,F), ignore.stderr=TRUE, plugin=NULL)

where lsat5_1987_pca1.real and lsat7_2002_pca1.real are the Fourier transform images derived from GRASS GIS

Kernel Density Plot: Fig. 4 in Rocchini et al. (2013)

sm.density(fft.images$lsat5_1987_pca1.real, lty=1, lwd=2, ann=T, 
   xlim=c(0,255), ylim=c(0,0.013), xlab='Fourier transform value', col='blue', cex.label=4)
sm.density(fft.images$lsat7_2002_pca1.real,lty=1, lwd=2, ann=F, 
   xlim=c(0,255), ylim=c(0,0.013), xlab=' ', col='red', cex.label=4)
legend(110, 0.012, c('Density function 1987', 'Density function 2002'), 
   fill = c('blue', 'red'), cex=1.2, box.lty=0)

Hexagon binning: Fig. 5 in Rocchini et al. (2013)

hbin <- hexbin(fft.images$lsat5_1987_pca1.real, fft.images$lsat7_2002_pca1.real, xbins = 50)
plot.bin<-plot(hbin, style = 'nested.lattice', legend=F, 
  xlab='Fourier transform value 1987', ylab='Fourier transform value 2002')
hexVP.abline(plot.bin$plot.vp, 0, 1)