get_random_subset_from_image: extract random subset of pixels from an image

Description Usage Arguments Details Value

View source: R/Lib_ImageProcess.R

Description

extract random subset of pixels from an image

Usage

1
2
3
4
5
6
7
8
get_random_subset_from_image(
  ImPath,
  MaskPath,
  nb_partitions,
  Pix_Per_Partition,
  kernel = NULL,
  MaxRAM = 0.5
)

Arguments

ImPath

character. path for the image to sample

MaskPath

character. path for the corresponding mask

nb_partitions

numeric. number of repetitions of kmeans

Pix_Per_Partition

numeric.

kernel

numeric.

MaxRAM

numeric.

Details

The returned list contains: - DataSubset: matrix of NxP of N samples and P bands - nbPix2Sample: integer giving the number of pixels sampled (only central pixel of kernel) - coordPix: a data.table with columns 'row', 'col' of pixel in the image corresponding to each row of DataSubset, and if kernel is not NULL Kind (Kernel index) and 'id' the sample ID to be used with the kernel

Value

list, see Details


floriandeboissieu/biodivMapR documentation built on March 11, 2021, 8:46 a.m.