Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

The FOTO (Fourier Transform Textural Ordination) R package.

License

NotificationsYou must be signed in to change notification settings

bluegreen-labs/foto

Repository files navigation

R-CMD-checkcodecovCRAN_Status_BadgeDOI

The FOTO (Fourier Transform Textural Ordination) method uses a principalcomponent analysis (PCA) on radially averaged 2D Fourier spectra tocharacterize (grayscale) image texture. The FOTO method was described byCouteron etal. 2005to quantify canopy stucture in relation to biomass and biodiversity.More recently, the code base of this package was used in a similar studybySolorzano etal. 2018.Although the techniques as presented in these papers is applied on acanopy level, the principle works on images of all types.

How to cite this package

Please cite the software in publication as: Koen Hufkens (2019). foto:an R implementation of the “fourier transform textural ordination”method.https://doi.org/10.5281/zenodo.3337885

Installation

stable release

To install the current stable release use a CRAN repository:

install.packages("foto")library("foto")

development release

To install the development releases of the package run the followingcommands:

if(!require(remotes)){install.packages("remotes")}remotes::install_github("bluegreen-labs/foto")library("foto")

Vignettes are not rendered by default, if you want to include additionaldocumentation please use:

if(!require(remotes)){install.packages("remotes")}remotes::install_github("bluegreen-labs/foto",build_vignettes=TRUE)library("foto")

Use

To classify image texture using the FOTO algorithm use thefoto()function. Thefoto() routine returns a nested list with the sourcedata (aggregated zones used and fourier components used in the PCAanalysis) and a final colour image consisting of the three majorprincipal components for every pixel.

detailed parameter description (click to expand)

ParameterDescription
xa raster layer (stack or brick)
window_sizea window size in pixels
plotplot output (TRUE / FALSE)
norm_specnormalize the radial spectrum (TRUE / FALSE)
method“zones” or “mw” (i.e. moving window)

Zones

The original implementation used discrete zones (blocks of x pixelswide, window_size parameter) to classify an image. This originalimplementation is the default, and the least computationally intensive,as it effectively reduces to resolution of the orignal data. In short,data is aggregated at the size of the specified window.

An example analysis is run below. In the resulting image pixels with asimilar colour have a similar texture. The analysis is run on ahistorical image of plantations near Yangambi, DR Congo, as recovered intheCOBECORE project. The regular pattern ofplanted trees is picked up readily by the algorithm.

# load the librarylibrary(foto)# load demo datar<-raster::raster(system.file("extdata","yangambi.png",package="foto",mustWork=TRUE))# classify pixels using zones (discrete steps)output<- foto(r,plot=TRUE,window_size=25,method="zones")

# print data structureprint(names(output))#> [1] "zones"          "radial_spectra" "rgb"

Moving window

To maintain the resolution of the original image a moving windowapproach can be used (method = “mw”). This approach overlays a window ofsize x (window_size parameter) on every pixel in the image and appliesthe FOTO methodology. This obviously represents a considerablecomputational burden and should be used with caution. An example isgiven below for a smaller subsection of the processed image above. Theoutput format of the moving window analysis is consistent with that ofthe zoned approach.

# crop the image for speedr<- crop(r, extent(1,100,1,100))# crop the imageoutput<- foto(r,plot=TRUE,window_size=25,method="mw")#> A moving window approach is computationally intensive.#> This might take a while.

Partitioned normalization

Partitioned normalization as described inBarbier etal. 2010 is notprovided but easily accomplished once all images are processed. I referto this paper for the appropriate routines.

References

  • Couteron P, Pelissier R, Nicolini E a., Paget D (2005) Predictingtropical forest stand structure parameters from Fourier transform ofvery high-resolution remotely sensed canopy images. Journal ofApplied Ecology, 42, 1121–1128.

  • Barbier N, Couteron P, Proisy C, Malhi Y, Gastellu-EtchegorryJ-P (2010) The variation of apparent crown size and canopyheterogeneity across lowland Amazonian forests. Global Ecology andBiogeography, 19, 72–84.

  • Solórzano JV, Gallardo-cruz JA, González EJ et al. (2018)Contrasting the potential of Fourier transformed ordination and graylevel co-occurrence matrix textures to model a tropical swamp forest’ s structural and diversity attributes. Journal of Applied RemoteSensing, 12, 036006.

Acknowledgements

This package is supported through the Belgian Science Policy officeCOBECORE project (BELSPO; grant BR/175/A3/COBECORE).


[8]ページ先頭

©2009-2025 Movatter.jp