sampleRGB: Interactive function to sample RGB value from pixel or square...

View source: R/sampleRGB.R

sampleRGBR 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)


patternize documentation built on Aug. 22, 2023, 5:07 p.m.