Learn R Programming

Rvision (version 0.6.0)

pget: 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.

See Also

Image

Examples

Run this code
# NOT RUN {
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
pget(balloon, c(1, 100, 200), c(200, 100, 1))

# }

Run the code above in your browser using DataLab