https://github.com/bluegreen-labs/foto
The FOTO (Fourier Transform Textural Ordination) R package.
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 10 DOI reference(s) in README -
✓Academic publication links
Links to: wiley.com, zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.6%) to scientific vocabulary
Keywords
Repository
The FOTO (Fourier Transform Textural Ordination) R package.
Basic Info
- Host: GitHub
- Owner: bluegreen-labs
- License: agpl-3.0
- Language: R
- Default Branch: master
- Homepage: https://bluegreen-labs.github.io/foto/
- Size: 20.4 MB
Statistics
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 2
- Releases: 2
Topics
Metadata Files
README.md
FOTO
The FOTO (Fourier Transform Textural Ordination) method uses a principal component analysis (PCA) on radially averaged 2D Fourier spectra to characterize (grayscale) image texture. The FOTO method was described by Couteron et al. 2005 to quantify canopy stucture in relation to biomass and biodiversity. More recently, the code base of this package was used in a similar study by Solorzano et al. 2018. Although the techniques as presented in these papers is applied on a canopy 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:
r
install.packages("foto")
library("foto")
development release
To install the development releases of the package run the following commands:
r
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 additional documentation please use:
r
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 the foto()
function. The foto() routine returns a nested list with the source
data (aggregated zones used and fourier components used in the PCA
analysis) and a final colour image consisting of the three major
principal components for every pixel.
detailed parameter description (click to expand)
| Parameter | Description | |-------------|----------------------------------------------| | x | a raster layer (stack or brick) | | window_size | a window size in pixels | | plot | plot output (TRUE / FALSE) | | norm_spec | normalize the radial spectrum (TRUE / FALSE) | | method | “zones” or “mw” (i.e. moving window) |
Zones
The original implementation used discrete zones (blocks of x pixels wide, window_size parameter) to classify an image. This original implementation 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 a similar colour have a similar texture. The analysis is run on a historical image of plantations near Yangambi, DR Congo, as recovered in the COBECORE project. The regular pattern of planted trees is picked up readily by the algorithm.
``` r
load the library
library(foto)
load demo data
r <- 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") ```

``` r
print data structure
print(names(output))
> [1] "zones" "radial_spectra" "rgb"
```
Moving window
To maintain the resolution of the original image a moving window approach can be used (method = “mw”). This approach overlays a window of size x (window_size parameter) on every pixel in the image and applies the FOTO methodology. This obviously represents a considerable computational burden and should be used with caution. An example is given below for a smaller subsection of the processed image above. The output format of the moving window analysis is consistent with that of the zoned approach.
``` r
crop the image for speed
r <- crop(r, extent(1,100,1,100))
crop the image
output <- 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 in Barbier et al. 2010 is not provided but easily accomplished once all images are processed. I refer to this paper for the appropriate routines.
References
Couteron P, Pelissier R, Nicolini E a., Paget D (2005) Predicting tropical forest stand structure parameters from Fourier transform of very high-resolution remotely sensed canopy images. Journal of Applied Ecology, 42, 1121–1128.
Barbier N, Couteron P, Proisy C, Malhi Y, Gastellu-Etchegorry J-P (2010) The variation of apparent crown size and canopy heterogeneity across lowland Amazonian forests. Global Ecology and Biogeography, 19, 72–84.
Solórzano JV, Gallardo-cruz JA, González EJ et al. (2018) Contrasting the potential of Fourier transformed ordination and gray level co-occurrence matrix textures to model a tropical swamp forest ’ s structural and diversity attributes. Journal of Applied Remote Sensing, 12, 036006.
Acknowledgements
This package is supported through the Belgian Science Policy office COBECORE project (BELSPO; grant BR/175/A3/COBECORE).
Owner
- Name: BlueGreen Labs
- Login: bluegreen-labs
- Kind: organization
- Email: info@bluegreenlabs.org
- Location: Melsele, Belgium
- Website: http://bluegreenlabs.org
- Repositories: 17
- Profile: https://github.com/bluegreen-labs
BlueGreen open science labs & consulting, providing environmental research infrastructure and editorial solutions.
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Koen Hufkens | k****s@g****m | 79 |
| Darío Hereñú | m****a@g****m | 1 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 7
- Total pull requests: 2
- Average time to close issues: 8 months
- Average time to close pull requests: about 21 hours
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 2.14
- Average comments per pull request: 1.5
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- khufkens (5)
- vincent-haller (1)
- rsbivand (1)
Pull Request Authors
- khufkens (2)
- kant (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 220 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: foto
Fourier Transform Textural Ordination
- Homepage: https://github.com/bluegreen-labs/foto
- Documentation: http://cran.r-project.org/web/packages/foto/foto.pdf
- License: AGPL-3
-
Latest release: 1.0.0
published about 7 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.4 depends
- grDevices * imports
- parallel * imports
- raster * imports
- stats * imports
- covr * suggests
- knitr * suggests
- rgdal * suggests
- rmarkdown * suggests
- testthat * suggests
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite