shadow_based_seed_filter: Filter Seeds That Lack Shadows

Description Usage Arguments Value Examples

View source: R/shadow_based_seed_filter.R

Description

Remove spatial points that don't appear to have a tree-like shadow in a chosen spectral index or band.

Usage

1
2
shadow_based_seed_filter(seed_shp_fname, image_fname, shadow_mask, x_shift,
  y_shift, shadow_diameter = 6, bandnames = NULL, outp_seed_shp_fname)

Arguments

seed_shp_fname

Character. Filename for the input point shapefile.

image_fname

Filename of the image to run the tree detection on

shadow_mask

List. Uneven positions should provide index names or wavelength numbers. Even positions in the list should provide the cut-off value of the spectral index, below which, pixels are considered shadow. Default is list('NDVI',0,1).

x_shift

Numeric. Horizontal shift from crown to shadow in x_direction.

y_shift

Numeric. Horizontal shift from crown to shadow in y_direction.

shadow_diameter

Numeric. Maximum diameter of a crown. Default is 6 m.

bandnames

Character. In case the bands aren't named according to wavelength and following csic convention, they can be provided. Default is NULL in which cases bandnames are read from the image file and csic naming convention is assumed.

outp_seed_shp_fname

Character. Filename for the output point shapefile. Default is NA, which means output is not written away.

Value

A SpatialPoints object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
shadow_based_seed_filter(
seed_shp_fname = 'C:/Users/pieterbeck/Documents/temp/test_treedetection_seeds.shp',
image_fname = image_fname = 'E:/FISE/forest/CanopyHealthMonitoring/PWN/flights_final/150727_mca/150727_mca.bsq',
shadow_mask = list(800, 801),
x_shift = -4,
y_shift = 4,
shadow_diameter = 5,
outp_seed_shp_fname = 'C:/Users/pieterbeck/Documents/temp/test_treedetection_seeds_shadow_masked.shp' )

## End(Not run)

pieterbeck/CanHeMonR documentation built on May 25, 2019, 7:11 a.m.