coord.index {imager}R Documentation

Coordinates from pixel index

Description

Compute (x,y,z,cc) coordinates from linear pixel index.

Usage

coord.index(im, index)

Arguments

im

an image

index

a vector of indices

Value

a data.frame of coordinate values

Author(s)

Simon Barthelme

See Also

index.coord for the reverse operation

Examples


cind <- coord.index(boats,33)
#Returns (x,y,z,c) coordinates of the 33rd pixel in the array
cind
all.equal(boats[33],with(cind,at(boats,x,y,z,cc)))
all.equal(33,index.coord(boats,cind))

[Package imager version 1.0.2 Index]