Type: Package
Title: Process Digital Cover Photography Images of Tree Crowns
Version: 1.0.0
Maintainer: Francesco Chianucci <fchianucci@gmail.com>
Description: Process Digital Cover Photography images of tree canopies to get canopy attributes like Foliage Cover and Leaf Area Index. Detailed description of the methods in Chianucci et al. (2022) <doi:10.1007/s00468-018-1666-3>.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.2.3
Imports: autothresholdr, dplyr, jpeg, lubridate, mgc, terra, stats, tidyr
Depends: R (≥ 4.1)
Language: en-US
Suggests: testthat (≥ 2.0.0)
Config/testthat/edition: 2
NeedsCompilation: no
Packaged: 2023-10-16 17:42:50 UTC; francescochianucci
Author: Francesco Chianucci ORCID iD [aut, cre], Nicola Puletti ORCID iD [aut], Carlotta Ferrara ORCID iD [aut]
Repository: CRAN
Date/Publication: 2023-10-17 09:50:05 UTC

coveR2: Process Digital Cover Photography Images of Tree Crowns

Description

Process Digital Cover Photography images of tree canopies to get canopy attributes like Foliage Cover and Leaf Area Index. Detailed description of the methods in doi:10.1007/s00468-018-1666-3.

The function calculates all the image processing steps and returns the output canopy attributes. It is also possible to export the classified image.

Usage

coveR2(
  filename,
  channel = 3,
  thdmethod = "Otsu",
  gapmethod = "macfarlane",
  thd = 1.3/100,
  k = 0.5,
  crop = NULL,
  export.image = FALSE,
  display = TRUE,
  message = TRUE
)

Arguments

filename

Character. The input image filename

channel

Integer. The band number corresponding to the blue channel. Default value is 3

thdmethod

Character. The method used to threshold the image, using the autothresholdr::auto_thresh() function. For details, see https://imagej.net/plugins/auto-threshold. Default = 'Otsu'.

gapmethod

Character. The method used to classify large and small gaps. Default = 'macfarlane'

thd

Numeric. The large gap threshold, as a function of the image size. Used only when method = 'macfarlane'. Default = 1.3/100

k

Numeric The extinction coefficient at the zenith. Default is 0.5 (spherical leaf angle distribution)

crop

Integer. The number of lines to be removed from the bottom side of the image. Useful to remove the 'timestamp' watermark in camera traps.

export.image

Logical. It allows exporting an image of the classified gaps

display

Logical. It allows displaying the result of image classification.

message

Logical. It allows displaying messages.

Author(s)

Maintainer: Francesco Chianucci fchianucci@gmail.com (ORCID)

Authors:

Examples

image <- file.path(system.file(package='coveR2'), 'extdata/IMG1.JPG')
res<-coveR2(image, gapmethod='macfarlane',thd=0.5/100, k=0.65)
res