sampleRGB {patternize}R Documentation

Interactive function to sample RGB value from pixel or square area in an image.

Description

Interactive function to sample RGB value from pixel or square area in an image.

Usage

sampleRGB(image, resampleFactor = NULL, crop = c(0, 0, 0, 0), type = "point")

Arguments

image

Image imported as a RasterStack.

resampleFactor

Integer for downsampling used by redRes.

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').

Value

RGB vector

Examples

image <- raster::stack(system.file("extdata", "BC0077.jpg", package = "patternize"))
RGB <- sampleRGB(image, resampleFactor = 1)


[Package patternize version 0.0.5 Index]