pkgdown/custom.css

Skip to contents pkgdown/home.html

The function extracts and save .jpeg images for each crown at each date.

Usage

extract_crownsImages(
  path_images,
  path_crowns,
  out_dir_path,
  sites = NULL,
  dates = NULL,
  tempdir_custom = NULL,
  N_cores = 1,
  width = 720,
  height = 825
)

Arguments

path_images

list with the full paths to the RGB rasters.

path_crowns

chr. Path to the crown delinetion shapefile

out_dir_path

chr. The path to the directory use to stored the images. The function will create the folder, It doesn't need to exists.

sites

chr. name of the site, p.e 'Mbalmayo'.

dates

chr. Vector with dates (format should be '%Y_%m_%d', p.e '2022_09_25'). The order of the dates should match with the order of the dates of the image in the path_images

tempdir_custom

chr. Path where to store temporary files

N_cores

Number of cores use in the parallelisation proccess.

width

num. The width of the device

height

num. The height of the device

Details

The extract_crownsImages() create one folder per id and save the images. The folder names are 'crown_the idthe species name' for exemple 'crown_5_Lophira alata'. The the images names are 'crownthe idthe species namethe date.jpeg' for exemple 'crown_5_Lophira alata_2022-11-08.jpeg'. The function upload square image with neighbouring trees and the title is add at the top, image size is 720*825 pixels by defaut. The image size can be changed by specifying height and width parameters.

Examples


if (FALSE) { # \dontrun{

imgs = list.files('my-path-to-images', full.names = T)
path_crowns = "my-path-to-crowns-shapefile"
out_dir_path = "output-directory"

extract_crownsImages(
  path_images = imgs,
  path_crowns = path_crowns,
  out_dir_path =  out_dir_path
)
} # }

pkgdown/footer.html