Learn R Programming

imager (version 0.31)

grab: Select image regions interactively

Description

These functions let you select a shape in an image (a point, a line, or a rectangle) They either return the coordinates of the shape (default), or the contents. In case of lines contents are interpolated.

Usage

grabLine(im, coord = TRUE)
grabRect(im, coord = TRUE)
grabPoint(im, coord = TRUE)

Arguments

im
an image
coord
if TRUE, return coordinates. if FALSE, content

Value

either a vector of coordinates, or an image

See Also

display

Examples

Run this code
##Not run: interactive only 
##grabRect(boats)
##grabRect(boats,TRUE)

Run the code above in your browser using DataLab