View source: R/Lib_ImageProcess.R
get_random_subset_from_image | R Documentation |
extract random subset of pixels from an image
get_random_subset_from_image(
ImPath,
MaskPath,
nb_partitions,
Pix_Per_Partition,
kernel = NULL,
MaxRAM = 0.5
)
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. |
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
list, see Details
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.