Creates a polygon region of interest using point-in-polygon testing.
Arguments
- cube
An hsi_cube object.
- vertices
Matrix with columns
xandy(polygon vertices in pixel coordinates).
Examples
cube <- hs_example_cube()
verts <- matrix(c(5, 5, 15, 15, 5, 20, 5, 20), ncol = 2,
dimnames = list(NULL, c("x", "y")))
roi <- hs_roi_polygon(cube, verts)