powered by
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")
RGB vector
Image imported as a RasterStack.
Integer for downsampling used by redRes.
redRes
Vector c(xmin, xmax, ymin, ymax) that specifies the pixel coordinates to crop the original image.
Set 'point' to extract RGB from a single point or 'area' to extract from a square area defined by setting two points (default = 'point').
image <- raster::stack(system.file("extdata", "BC0077.jpg", package = "patternize")) RGB <- sampleRGB(image, resampleFactor = 1)
Run the code above in your browser using DataLab