sampleRGB | R Documentation |
Interactive function to sample RGB value from pixel or square area in an image.
sampleRGB(image, resampleFactor = NULL, crop = c(0, 0, 0, 0), type = "point")
image |
Image imported as a RasterStack. |
resampleFactor |
Integer for downsampling used by |
crop |
Vector c(xmin, xmax, ymin, ymax) that specifies the pixel coordinates to crop the original image. |
type |
Set 'point' to extract RGB from a single point or 'area' to extract from a square area defined by setting two points (default = 'point'). |
RGB vector
image <- raster::stack(system.file("extdata", "BC0077.jpg", package = "patternize"))
RGB <- sampleRGB(image, resampleFactor = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.