pget: Return Pixel Value at Specified Locations

View source: R/ImageClass.R

pgetR Documentation

Return Pixel Value at Specified Locations

Description

pget returns the values of the pixels at the specified x and y coordinates in the image.

Usage

pget(image, x, y)

Arguments

image

An Image object.

x

A vector of x locations (columns) in the image.

y

A vector of y locations (rows) in the image.

Value

A matrix. The number of columns of the matrix depends on the number of channels in the image. Each row corresponds to a pair of x/y coordinates.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image

Examples

balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
pget(balloon, c(1, 100, 200), c(200, 100, 1))


swarm-lab/Rvision documentation built on Feb. 7, 2024, 4:59 a.m.